feat(privacy): redact more provider key formats + classify Anthropic keys - #178
Merged
Conversation
…keys Adds redaction coverage for xAI (xai-), Groq (gsk_), and Google OAuth 2.0 access tokens (ya29.), and gives Anthropic keys (sk-ant-) their own pattern class ahead of the generic sk- family (as sk-or-v1- already has). Anthropic keys were already cut by the generic sk- pattern; this reports them under the precise class. Slack (xox), Google API (AIza), AWS (AKIA/ASIA) and GitHub/GitLab were already covered. Additive; tests extended.
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.
Expands the value-redaction coverage (agentacct redacts secrets it might see in captured agent activity):
xai-), Groq (gsk_), and Google OAuth 2.0 access tokens (ya29.) — none were matched before.sk-ant-: now reported under its ownanthropic_api_keyclass, ahead of the genericsk-family (mirrors the existingsk-or-v1-→openrouter_api_keyhandling). Anthropic keys were already cut by the genericsk-pattern; this just classifies them precisely.Already covered (no change needed): Slack
xox, Google APIAIza, AWSAKIA/ASIA, GitHub/GitLab, Stripe, HF, and more. Purely additive; redaction tests extended (33 pass).