Add high-precision secret detectors (Slack, Twilio, SendGrid, npm, PyPI)#208
Open
seonghobae wants to merge 1 commit into
Open
Add high-precision secret detectors (Slack, Twilio, SendGrid, npm, PyPI)#208seonghobae wants to merge 1 commit into
seonghobae wants to merge 1 commit into
Conversation
… PyPI Add six low-false-positive hardcoded-secret rules keyed on distinctive provider prefixes not previously covered: Slack tokens (xox[baprs]-) and incoming webhook URLs, Twilio Account SID/API key (AC/SK + 32 hex), SendGrid API keys (SG.), npm tokens (npm_), and PyPI tokens (pypi-AgEIcHlwaS). Account-access tokens are CRITICAL; the Slack webhook is HIGH. All carry CWE-798 and OWASP A07:2021. Each pattern is verified with positive and negative cases in tests/test_more_secret_rules.py, which also asserts the rules load via SCAN_RULES and carry the correct severity. Full suite passes (229). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EywwS2Du8pimW7xqRP3An3
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
Adds six low-false-positive hardcoded-secret detectors to
scanner/rules/secrets.ymlfor providers not previously covered, each keyed on a distinctive prefix:hardcoded-slack-tokenxox[baprs]-…hardcoded-slack-webhook-urlhooks.slack.com/services/…hardcoded-twilio-credentialAC…/SK…(32 hex)hardcoded-sendgrid-api-keySG.…hardcoded-npm-tokennpm_…hardcoded-pypi-tokenpypi-AgEIcHlwaS…All rules are
languages: [generic]and carrycwe: [CWE-798],owasp: [A07:2021]. No overlap with existing OpenAI/Anthropic/Stripe/AWS/GitHub/Google/PEM/generic detectors.Testing
tests/test_more_secret_rules.py: each pattern verified against positive and negative cases, rules asserted to load viaSCAN_RULES, and severities checked.229 passed.Docs
[Unreleased]updated (Korean).🤖 Generated with Claude Code