feat(enrichment): detect AI-provider and more SaaS/CI credential formats in secret-scan - #3172
Conversation
…ats in secret-scan
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 Gittensory review result - reject/close recommendedReview updated: 2026-07-04 18:55:04 UTC
🛑 Suggested Action - Reject/Close
Review summary Blockers
Nits — 4 non-blocking
Why this is blocked
Review context
Contributor next steps
Signal definitions
🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
|
Gittensory is closing this pull request on the maintainer's behalf (AI reviewers agree on a likely critical defect: review-enrichment/src/analyzers/secret-scan.ts:274 uses `\b` to terminate the new Dropbox base64url token rule, so a real `sl.` token whose final body character is `-` will not match; change it to `re: /\bsl\.[A-Za-z0-9_-]{130,152}(?![A-Za-z0-9_-])/` or explain why Dropbox tokens cannot end in `-`.). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Summary
The secret-scan analyzer (
review-enrichment/src/analyzers/secret-scan.ts) flags credentials committed in aPR diff, citing
file:line+ kind only (never the value). This adds 16 more credential formats the scannercurrently misses — the current wave of AI-provider keys plus widely-used SaaS/CI tokens — continuing the
established
feat(enrichment)secret-format additions.Each new rule is a high-confidence, gitleaks/trufflehog-standard shape with a distinctive multi-character
literal prefix (or fixed marker/host) and a fixed or tightly-bounded length + charset, so the false-positive
rate against ordinary source, base64 blobs, hex hashes, and UUIDs is effectively zero:
groq_api_keygsk_+ 52 base62replicate_tokenr8_+ 37 base62perplexity_api_keypplx-+ ≥40 base62dropbox_tokensl.+ 130–152 base64urljfrog_api_keyAKCp8+ ≥69 base62duffel_tokenduffel_{test,live}_+ 43easypost_keyEZAK/EZTK+ 54 base62frameio_tokenfio-u-+ 64 base64urlcontentful_tokenCFPAT-+ 43 base64urlsonarqube_tokensqa_/sqp_/squ_+ 40 hexpulumi_tokenpul-+ 40 hexadafruit_io_keyaio_+ 28 base62readme_api_keyrdme_+ ≥70typeform_tokentfp_+ ≥40sentry_dsn@…sentry.io/<project id>newrelic_license_keyNRALsuffixNo existing rule is modified, so current findings are unchanged, and no analyzer descriptor changes (the
finding schema is unchanged) — so
analyzer-metadata.jsonand the generated UI mirror are untouched.No linked issue: additive detection-coverage for well-known credential formats, matching the established
feat(enrichment)secret-format additions; each rule is a self-evident real token shape with no publicAPI/schema/deploy surface change — fits the repo's
preferred(not required) linked-issue policy.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run typechecknpm run rees:test— the review-enrichment build + analyzer suite (see note below)npm run test:coverage(N/A — this file is inreview-enrichment/, outside the rootsrc/**Codecov scope)npm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
git diff --check(clean), the review-enrichment TypeScript build (exit 0), and the secret-scananalyzer test via
node --test— 44/44 pass, including a new table case that flags each of the 16formats at high confidence, plus a near-miss case asserting that one-character-short tokens produce no
finding — proving the prefixes/lengths are specific, not broad. All fixtures are assembled from string
fragments so the test file never contains a contiguous secret literal. The change is confined to
review-enrichment/, outside thesrc/**Codecov scope.metadata:checkstep ofrees:test. This change only addsscan rules, not any analyzer descriptor, so the committed
analyzer-metadata.json/UI mirror are unchanged (alocal regeneration produces a zero-content diff) and
metadata:checkpasses on CI (Linux). On this Windowsdev box
metadata:checkreports a spurious line-ending difference; it fails identically on unmodifiedmain.analyzer-metadata.jsonwas NOT modified.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.Notes
so current findings and
analyzer-metadata.jsonare unaffected. The scanner still returns onlyfile:line+kind, never the matched secret value.\bboundaries (or a negative-lookahead terminator where the body has no fixed end, as theexisting SendGrid/Anthropic/Square rules already do).
newrelic_license_keyis anchored by itsNRALsuffix and
sentry_dsnby itssentry.iohost, so neither can match a bare hash/URL.