feat(health): vendor-shaped credential detection — twelve families that were invisible #5616
ccantynzAI Reviewcommented 1d ago
AI Triage
(no summary)
Priority: medium Risk area: mixed
Suggested labels: (no label suggestions) Suggested reviewers: (no reviewer suggestions)
Suggestions only — nothing has been applied. The PR author stays in control.
gluecron[bot]🤖 botAI Reviewcommented 1d ago
AI review unavailable
The platform's AI balance is exhausted, so AI generation is temporarily unavailable. Nothing was lost. You can queue this as a repair for the internal agent from the repository's Health page, or try again once the balance is restored. The PR is otherwise unchanged.
Cross-repo impact
See what breaks downstream if this PR merges.
⮌ Merged
This pull request was merged into main.
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts
Prompted by the GateTest engine's mirror-direction check: can a reassuring variable NAME silence a real credential? Measuring that exposed something bigger.
Measured before building
Of fourteen common credential families, the scanner detected two — AWS access keys and RSA/EC PEM. Invisible, in source and docs alike: GitHub tokens (
ghp_/github_pat_), Stripe live keys, Slack tokens, Google API keys, OpenAI, Anthropic, GitLab PATs, npm tokens, SendGrid keys, andOPENSSH/DSA/PGPprivate keys.OPENSSHhas been ssh-keygen's default output since 7.8 — three of the five common private-key headers were invisible to a rule namedno-private-keys.Why this family is different
The prefix and charset are the credential. No value heuristic, no language scoping, no prose scoping:
placeholder_secretholding a real Stripe key still fires, because nothing consults the name — the exact inverse of theCELITECH_TOKEN_URLbugsk_live_YOUR_KEY_HEREcannot fire: the charsets exclude_/-inside the random run where the vendor's alphabet does, so templates break before the length requirementsk_test_is in half the payment tutorials ever writtenThe first attempt shipped dead
A tooling step turned every
\bword boundary into a literal 0x08 BACKSPACE character. The file compiled, the regexes were valid, and each matched only lines containing a backspace — nothing, ever. A standalone probe of "the same" regex passed because it was typed fresh, so the tool and its probe disagreed untilcat -Ashowed^H.A rule that cannot match is indistinguishable from a rule with no bug to find — same family as the deleted fallback scan and GateTest's unreachable
+3bonus. The suite now asserts the entire rules module is free of C0 control bytes.Verification