fix(generic-api-key): exclude pnpm-workspace.yaml - #4041
Open
MgmClientGuy wants to merge 1 commit into
Open
Conversation
pnpm catalog entries pin dependency versions in this file, so a package name containing one of the rule's keywords plus a pre-release version suffix is reported as a hard-coded credential. Every other dependency manifest is already excluded. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
MgmClientGuy
marked this pull request as ready for review
August 19, 2026 08:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI Disclaimer: I created this PR with Claude after verifying the issue in our pnpm repos manually.
pnpm-workspace.yamlis pnpm's workspace manifest. Since pnpm 9.5 itscatalog:/catalogs:blocks pin dependency versions, which makes it a dependency manifest in the same sense as thepackage.jsonandpnpm-lockentries this rule'spaths.excludealready carries — catalogs are simply newer than the list.A catalog entry matches the rule when the package name happens to contain one of its keywords (
key,api,token,secret,client,auth,access, ...) and the pinned version is long enough to clear the value filters — which an ordinary semver string does as soon as it carries a pre-release or build-metadata suffix.Reproduction
pnpm-workspace.yaml:With this patch applied, the same file is clean:
widget-core(no keyword in the key) andwidget-auth: 30.0.0(value too short) stay silent in both runs, so the trigger is the keyword-plus-length combination rather than anything secret-shaped.Package names ending in
-api,-clientor-authare common, so during a pre-release cycle this reports every such pin as a hard-coded credential.No test change:
paths.excludeis path-based and the rule's test harness is a singlegeneric-api-key.txt, so the exclusion is not exercisable there.