Skip to content

fix(registry): shorten the placeholder app id in catalog examples - #2686

Open
liangshuo-1 wants to merge 1 commit into
mainfrom
fix/catalog-example-app-id
Open

fix(registry): shorten the placeholder app id in catalog examples#2686
liangshuo-1 wants to merge 1 commit into
mainfrom
fix/catalog-example-app-id

Conversation

@liangshuo-1

@liangshuo-1 liangshuo-1 commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

main is red on the push scan for ad8766b61. Gitleaks reports four values in the committed catalog: the example app id from the open platform documentation, a public placeholder rather than a credential. What trips the rule is its shape, since cli_ plus exactly sixteen lowercase alphanumerics is what this repository's own lark-bot-app-id pattern looks for.

Shortening it to cli_example keeps the examples readable and takes them out of that shape. Four values, two in im.json and two in task.json.

Why the branch was green

A .gitleaksignore fingerprint is bound to a commit SHA. Squash-merging #2232 moved the same content into a new commit, so every entry stopped matching. Two of the four were never covered by a fingerprint at all and stayed quiet only because the branch's incremental scans no longer reached the commit that introduced them. Fixing the value means the next squash cannot bring the reports back, so the two fingerprints naming these task.json values are dropped with them.

Verification

Local gitleaks v8.18.4 with this repository's own config, same scope as the CI push scan: four reports on ad8766b61 matching the CI SARIF line for line, none on this commit, and none with .gitleaksignore removed entirely. The registry, cmd, service, schema and publiccontent packages pass, and manifest size and sha256 are recomputed so the embedded catalog still validates.

The three remaining fingerprints also name commits absent from main's history and cannot match anything either; worth cleaning up separately.

The example app id in the catalog is the public placeholder from the open
platform documentation, not a credential. Its shape is what causes trouble:
cli_ followed by exactly sixteen lowercase alphanumerics is what this
repository's own lark-bot-app-id detector looks for, so gitleaks reports the
four example values in im.json and task.json.

On the branch those reports were suppressed by .gitleaksignore fingerprints,
and a gitleaks fingerprint is bound to a commit SHA. Squash-merging #2232
moved the same content into a new commit, every fingerprint stopped matching,
and the push scan on main reported all four. Two of them were never covered
by a fingerprint at all; they stayed quiet only because the branch's
incremental scans no longer reached the commit that introduced them.

Shortening the placeholder to cli_example keeps the examples readable and
takes them out of the detector's shape, so the reports go away at the source
instead of being re-pinned to a SHA that the next squash would invalidate.
The two fingerprints that named these task.json values are dropped with them.

Verified with gitleaks v8.18.4 against this repository's own config: four
reports on the merge commit before the change, none after, and none with the
ignore file removed entirely. Manifest size and sha256 are recomputed for the
two shards.
@github-actions github-actions Bot added the size/M Single-domain feat or fix with limited business impact label Sep 10, 2026
@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 7b103a56-4496-441f-8ab2-0b3ef9bbee43

📥 Commits

Reviewing files that changed from the base of the PR and between ad8766b and 03781b2.

📒 Files selected for processing (4)
  • .gitleaksignore
  • internal/registry/catalog/manifest.json
  • internal/registry/catalog/services/im.json
  • internal/registry/catalog/services/task.json
💤 Files with no reviewable changes (1)
  • .gitleaksignore

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The service schemas now use cli_example for app_id examples. The catalog manifest reflects new im and task revisions, sizes, and checksums. Two obsolete secret-scan ignore entries were removed.

Changes

Catalog updates

Layer / File(s) Summary
Normalize service examples
internal/registry/catalog/services/im.json, internal/registry/catalog/services/task.json
The im and task service schemas replace the previous app_id examples with cli_example.
Synchronize catalog metadata
internal/registry/catalog/manifest.json, .gitleaksignore
The manifest updates the im and task revisions, sizes, and SHA-256 checksums. The obsolete task secret-scan ignore entries are removed.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: zhaojunlin0405

Merge Risk: ⚪ Minimal · up to 03781

Published IM and Task API examples now use a clearly synthetic app ID, with corresponding catalog metadata updated. No merge-blocking risk is evident.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the primary change: shortening the placeholder app ID in catalog examples.
Description check ✅ Passed The description explains the motivation, affected files, gitleaks behavior, verification results, and manifest updates. It omits explicit Changes and Related Issues sections, but the required informat…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/catalog-example-app-id

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@03781b23844f42dad86af6ece83efd5225e0f14e

🧩 Skill update

npx skills add larksuite/cli#fix/catalog-example-app-id -y -g

@codecov

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.37%. Comparing base (ad8766b) to head (03781b2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2686   +/-   ##
=======================================
  Coverage   76.37%   76.37%           
=======================================
  Files        1121     1121           
  Lines      128233   128233           
=======================================
  Hits        97932    97932           
  Misses      22458    22458           
  Partials     7843     7843           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant