Repository navigation
feat(plugins): Add secrets-scanner plugin for credential exposure detection - #22594
Open
stevenelliottjr wants to merge 2 commits into
Open
stevenelliottjr wants to merge 2 commits into
stevenelliottjr wants to merge 2 commits into
Conversation
…ection Addresses issues: - anthropics#18223: Claude displayed sensitive .env credentials - anthropics#22548: Auto-mask API keys in VS Code extension - anthropics#21528: Environment Variable Redaction for Hook Security This plugin provides real-time detection of exposed secrets in Claude Code output, warning users immediately when sensitive data is detected. Features: - Detects 35+ secret patterns (API keys, tokens, private keys, connection strings) - Severity levels: critical, high, medium, low - Covers major providers: AWS, Google, GitHub, Stripe, Slack, OpenAI, Anthropic - Detects database connection strings with embedded credentials - Identifies private key headers (RSA, SSH, PGP, EC) - Warns when accessing sensitive file paths (.env, credentials, etc.) - Security logging without persisting actual secret values - Graceful error handling (never blocks operations) Tested patterns: - AWS Access Key ID and Secret Access Key - GitHub tokens (classic and fine-grained) - Stripe live/test keys - PostgreSQL/MySQL/MongoDB connection strings - RSA/SSH private keys - JWTs and Bearer tokens Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This was referenced Feb 2, 2026
…h filter Fixed bug where sensitive file paths (.env, credentials, etc.) were not being detected when file content was short (<20 chars). Now checks file path sensitivity BEFORE applying content length filter, ensuring warnings are shown even for small config files. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
@claude please review this 🤖 Generated with Claude Code |
mrmrcode
approved these changes
Feb 10, 2026
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.
Summary
This PR adds a secrets-scanner plugin that provides real-time detection of exposed secrets in Claude Code output, warning users immediately when sensitive data is detected.
Addresses Issues:
Why This Plugin?
When Claude Code reads files or executes commands, sensitive credentials can be exposed in:
~/.claude/projects/)This plugin provides defense-in-depth by scanning all tool output and alerting users immediately.
Features
Example Warning
Test plan
About the Author
I'm a CIO with 19 years of experience implementing AI in regulated environments (HIPAA, SOC 2, ERISA). This plugin addresses real security concerns I've encountered deploying AI coding tools in enterprise settings.
🤖 Generated with Claude Code