feat(development-codebase-tools): add scan-secrets skill#461
feat(development-codebase-tools): add scan-secrets skill#461
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🤖 Claude Code Review
SummaryThis PR adds a new The documentation updates (CLAUDE.md, README.md, plugin.json) are consistent and complete. The SKILL.md is well-structured with clear steps, a comprehensive pattern library, and thoughtful false-positive filtering. FeedbackUUID pattern labeled as "Critical" will generate heavy false positivesThe "Heroku API key" pattern on SKILL.md line 140: This is a standard UUID v4 format. UUIDs are ubiquitous in codebases (database record IDs, correlation IDs, trace IDs, config identifiers, etc.). Labeling every UUID match as Critical will flood results with noise and erode trust in the scanner. Consider either:
Base64 blob pattern is very broadThe pattern Minor:
|
📚 Documentation Check ✅Verdict: Passed Plugin version was bumped (2.1.1 → 2.2.0), CLAUDE.md and README.md were updated, and the new SKILL.md was created. All required documentation is present. PR #461 Documentation ReviewThis PR adds the
Two minor/informational items noted below. Missing Updates
Suggestions (2)
🤖 Generated by Claude Documentation Validator | Mode: |
There was a problem hiding this comment.
📋 Review verdict: APPROVE
👆 The main review comment above is the source of truth for this PR review. It is automatically updated on each review cycle, so always refer to it for the most current feedback.
This formal review submission is for the verdict only. 2 inline comment(s) are attached below.
| -----BEGIN (RSA |EC |OPENSSH |PRIVATE |PGP PRIVATE )KEY----- | ||
|
|
||
| # Heroku API key | ||
| [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} |
There was a problem hiding this comment.
This UUID pattern ([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}) will match every UUID in the codebase and is classified as Critical. UUIDs are used extensively for non-secret purposes (database IDs, trace/correlation IDs, config identifiers). This will generate heavy false positives and undermine the scanner's credibility.
Consider either removing it or requiring a credential-related variable name context, e.g.:
(heroku_api_key|HEROKU_API_KEY)\s*[:=]\s*["']?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}["']?
| https?:\/\/[^:@\s]+:[^@\s"']+@ | ||
|
|
||
| # Private RSA/PEM material inline (base64 blob ≥64 chars) | ||
| [A-Za-z0-9+/]{64,}={0,2} |
There was a problem hiding this comment.
The pattern [A-Za-z0-9+/]{64,}={0,2} is extremely broad — it matches any 64+ character base64 string. This will flag encoded images, hashes, serialized data, minified code, and many other non-secret values as High severity.
Consider requiring a credential-related variable name or assignment context to reduce false positives, e.g.:
(private_key|secret|credential|pem)\s*[:=]\s*["'][A-Za-z0-9+/]{64,}={0,2}["']
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eb3a4a0dc0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| -o -name "*.yml" -o -name "*.yaml" -o -name "*.toml" -o -name "*.ini" \ | ||
| -o -name "*.conf" -o -name "*.config" -o -name "*.json" \ | ||
| -o -name "*.sh" -o -name "*.bash" -o -name "Makefile" -o -name "Dockerfile" \) \ |
There was a problem hiding this comment.
Exclude lockfiles from file enumeration
The skill states that *.lock files should always be skipped, but the find recipe still includes *.json/*.yaml without any filename-level exclusions for package-lock.json, yarn.lock, or pnpm-lock.yaml. In practice this makes scans process large lockfiles and can produce noisy secret matches, which contradicts the documented behavior and the test plan expectation that lock files are excluded.
Useful? React with 👍 / 👎.
| -----BEGIN (RSA |EC |OPENSSH |PRIVATE |PGP PRIVATE )KEY----- | ||
|
|
||
| # Heroku API key | ||
| [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} |
There was a problem hiding this comment.
Narrow Heroku token regex to avoid UUID matches
The Heroku pattern is currently a bare UUID regex, so any ordinary UUID literal (IDs in config, fixtures, migrations, etc.) will be classified as a critical secret. Because UUIDs are common and this pattern has no surrounding key/context constraint, the scanner will generate high-confidence false positives and desensitize users to real leaks.
Useful? React with 👍 / 👎.
What gap this fills
The
development-codebase-toolsplugin had no credential scanning capability. Whilesecurity-analyzer-agentperforms high-level threat modeling and architectural security analysis, there was no skill for the very common task of scanning source files for hardcoded secrets, API keys, passwords, and tokens.This is a critical pre-release and pre-OSS-publish gap — hardcoded credentials are one of the most common and damaging security mistakes developers make.
How it was identified
During capability gap analysis, the secrets hygiene dimension was entirely absent. The existing
security-analyzer-agentis for full threat modeling sessions — it's not suitable for quick, targeted "do I have any hardcoded API keys?" scans. No other skill in any plugin addresses this.What it does
The
scan-secretsskill:TODO,CHANGEME,YOUR_, etc.), test/fixture files (downgraded severity), short/trivial valuescritical/high/medium) and secret category--history) for secrets committed in past commits that may have been removed but are still exposedExample usage
Test plan
node_modules/,.git/,dist/, lock filesYOUR_API_KEY,CHANGEME,${VAR}) are filtered--historyflag triggers git log scan--scope src/limits scan to that directory--severity criticalonly reports critical findings***instead of real value)node scripts/validate-plugin.cjs packages/plugins/development-codebase-toolsAI-Generated Description
Summary
scan-secretsskill to thedevelopment-codebase-toolsplugin for scanning codebases for hardcoded secrets, API keys, tokens, and credentialssecurity-analyzer-agenthandles high-level threat modeling but not targeted secret detectionWhat it does
The
scan-secretsskill:TODO,CHANGEME,YOUR_), test/fixture files (downgraded severity), short/trivial valuescritical/high/medium) and secret category--history) for secrets committed in past commitsChanges
packages/plugins/development-codebase-tools/skills/scan-secrets/SKILL.mdpackages/plugins/development-codebase-tools/.claude-plugin/plugin.jsonscan-secretsto skills array; bump version 2.1.1 → 2.2.0packages/plugins/development-codebase-tools/CLAUDE.mdpackages/plugins/development-codebase-tools/README.mdTest plan
node_modules/,.git/,dist/, lock filesYOUR_API_KEY,CHANGEME,${VAR}) are filtered--historyflag triggers git log scan--scope src/limits scan to that directory--severity criticalonly reports critical findings***instead of real value)node scripts/validate-plugin.cjs packages/plugins/development-codebase-tools