You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dlp: OpenAI project/service-account keys (sk-proj-, sk-svcacct-, sk-admin-) have no DLP rule #478
Follows the bounty program in #454 (community detection/DLP rules with corpus fixtures).
The gap
apps/orchestrator/agentmetry/policies/dlp/manifest.yaml has no rule that
matches OpenAI's newer key formats: project keys (sk-proj-...),
service-account keys (sk-svcacct-...) and admin keys (sk-admin-...).
generic_provider_api_key is the rule whose description claims this territory
("OpenAI-shaped provider API keys"), but its pattern is (?i)\\bsk-[a-zA-Z0-9]{20,}\\b: no hyphens allowed in the 20+ char run right
after sk-. proj, svcacct and admin are each only a few letters before
the next hyphen, so the rule never reaches the required run length and never
fires on any of these three formats. A legacy sk-<random> key (what the rule
was written for) still matches fine.
This is the same bug class the repo already fixed once for Anthropic: see the anthropic_api_key rule's comment in manifest.yaml, and core/audit/redaction.py's comment on _SECRET_PATTERNS: "Until 0.12.2 sk-[A-Za-z0-9]{20,} stopped at the second hyphen, which left OpenAI project
keys (sk-proj-) and Anthropic keys (sk-ant-) stored as typed." The
redaction scrubber was fixed for all four OpenAI/Anthropic prefixes
(sk-(?:ant|proj|svcacct|admin)-...) in 0.12.2, and anthropic_api_key got
its own DLP rule for the ant prefix — but no equivalent DLP rule exists for proj/svcacct/admin, so a leaked OpenAI project or service-account key in
a tool argument currently produces no DLP finding at all.
Proposed fix
Add a dedicated DLP rule (openai_project_api_key or similar), category credentials, severity critical, matching sk-(?:proj|svcacct|admin)-[A-Za-z0-9_-]{20,} (mirrors the redaction.py
pattern, minus ant since that already has its own rule). Update generic_provider_api_key's description to note the carve-out, same as it
already does for Anthropic and DashScope. Per CONTRIBUTING.md this is a
regex-only DLP pattern (policies/dlp/manifest.yaml), not a change to any
frozen detection file, with a fires-test and a does-not-fire test in tests/test_dlp_scanner.py.
Fixed by #483 (from #482, @bewfordq): new openai_project_api_key rule matches sk-proj-, sk-svcacct- and sk-admin- keys, with a near-miss test that must stay silent.
Activity
blitzcrieg1 commentedon Nov 25, 2026
Fixed by #483 (from #482, @bewfordq): new openai_project_api_key rule matches sk-proj-, sk-svcacct- and sk-admin- keys, with a near-miss test that must stay silent.
docs: list @bewfordq in CONTRIBUTORS.md (#483, bounty #478) (#484)