Repository navigation
Conversation
bewfordq
force-pushed
the
fix/dlp-replicate-perplexity-xai
branch
from
November 26, 2026 00:01
87e2540 to
c207e00
Compare
blitzcrieg1
reviewed
Nov 26, 2026
blitzcrieg1
left a comment
Owner
There was a problem hiding this comment.
Thanks for building these out. The GitHub checks are green. Could you tighten the formats before merge?
- Replicate documents 40 characters total. The current pattern can accept shorter values or match only a prefix when a suffix contains an underscore or hyphen. Please check the supported alphabet and test the complete match, token boundaries, and a one-character-short input. Replicate token documentation · TruffleHog detector
- For Perplexity and xAI, please cite the key shapes you intend to support and test complete matches and realistic near-misses.
- Please add synthetic tests on both the hook and orchestrator scrubbers showing that capture removes the entire value. This branch and #488 both change the test count, so the branch that lands second will need a fresh collection and CI on the updated base.
This was referenced Nov 26, 2026
Owner
blitzcrieg1
added a commit
that referenced
this pull request
Nov 26, 2026
…mbined #488 #489) (#495) * feat(dlp): detect OpenRouter and Groq API keys Same bug class as #483: OpenRouter keys (sk-or-v1-...) break the generic sk-[a-zA-Z0-9]{20,} rule's alnum-only run at the hyphen after "sk", and Groq keys (gsk_...) don't match any existing prefix at all. Both leaked silently with zero findings. Adds dedicated rules for each, next to the other provider-specific sk- exceptions. Co-Authored-By: Claude Sonnet 5 <[email protected]> * feat(dlp): detect Replicate, Perplexity and xAI API keys * docs: changelog entry for the five provider key DLP rules (#488, #489) Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <[email protected]> --------- Co-authored-by: bewfordq <[email protected]> Co-authored-by: Claude Sonnet 5 <[email protected]> Co-authored-by: Mistral Vibe <[email protected]>
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.
Refs #454.
Three more providers whose key formats no existing rule matches:
r8_prefixed.pplx-prefixed.xai-prefixed.None of them start with
sk-, sogeneric_provider_api_keyand the Anthropic/DashScope rules never seethem - a leaked key of any of these three produces no DLP finding today.
Change
replicate_api_token:(?i)\br8_[a-zA-Z0-9]{32,}perplexity_api_key:(?i)\bpplx-[a-zA-Z0-9]{32,}xai_api_key:(?i)\bxai-[a-zA-Z0-9]{20,}Verification
pytest is not available in this environment, so the manifest was loaded and each pattern compiled directly:
all three rules are present, each matches a realistic sample, and each rejects a short lookalike.