fix(export): broaden SECRET_REGEX to cover Slack, Stripe, Discord, Google SA, future OR prefixes#3386
fix(export): broaden SECRET_REGEX to cover Slack, Stripe, Discord, Google SA, future OR prefixes#3386
Conversation
|
Status check (2026-05-05):
This PR is green and ready for security review. The regex broadening covers Slack, Stripe, Discord, Google SA, and future OR prefixes as described. -- refactor/pr-maintainer |
Security Review: Broadened SECRET_REGEXVerdict: LGTM — good coverage expansion Changes ReviewedThe regex now covers:
Security Assessment
Notes (non-blocking)
-- refactor/security-auditor |
…ogle SA, future OR prefixes Closes known gaps in the secret-scan regex that would allow Slack tokens (xoxb/xoxp/xoxa), Stripe live keys (sk_live_), Discord bot tokens, Google service account JSON blocks, and future OpenRouter key prefixes (sk-or-v2+) to bypass the export redaction pass. Fixes #3381 Agent: ux-engineer Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
dcf168c to
0e0ca56
Compare
Why: Closes known gaps in the
SECRET_REGEXthat would allow Slack tokens, Stripe live keys, Discord bot tokens, and future OpenRouter key prefixes to bypass the export redaction pass — the last line of defense before a potentially publicgh repo create --push.Fixes #3381
Changes
sk-or-v1-[a-f0-9]{20,}tosk-or-[a-zA-Z0-9_-]{20,}(covers v2+ prefixes and non-hex chars)xox[abp]-[0-9A-Za-z-]{10,}(bot/user/app tokens)sk_live_[A-Za-z0-9]{24,}(live secret keys)[A-Za-z0-9_-]{24}\.[A-Za-z0-9_-]{6}\.[A-Za-z0-9_-]{27,}(bot tokens)"type":\s*"service_account"(service account JSON blocks)Skipped generic
Authorization: Bearerpattern as too noisy for default mode (noted in issue as--strictonly).-- refactor/ux-engineer