Skip to content

Add high-precision secret detectors (Slack, Twilio, SendGrid, npm, PyPI)#208

Open
seonghobae wants to merge 1 commit into
developfrom
more-secret-rules
Open

Add high-precision secret detectors (Slack, Twilio, SendGrid, npm, PyPI)#208
seonghobae wants to merge 1 commit into
developfrom
more-secret-rules

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

Summary

Adds six low-false-positive hardcoded-secret detectors to scanner/rules/secrets.yml for providers not previously covered, each keyed on a distinctive prefix:

Rule id Prefix Severity
hardcoded-slack-token xox[baprs]-… CRITICAL
hardcoded-slack-webhook-url hooks.slack.com/services/… HIGH
hardcoded-twilio-credential AC…/SK… (32 hex) CRITICAL
hardcoded-sendgrid-api-key SG.… CRITICAL
hardcoded-npm-token npm_… CRITICAL
hardcoded-pypi-token pypi-AgEIcHlwaS… CRITICAL

All rules are languages: [generic] and carry cwe: [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 via SCAN_RULES, and severities checked.
  • Full suite: 229 passed.

Docs

  • CHANGELOG [Unreleased] updated (Korean).
  • README "Detects" section lists the new provider prefixes.

🤖 Generated with Claude Code

… 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
@seonghobae seonghobae enabled auto-merge (squash) July 6, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant