Repository navigation
Add field filters to secrets detection - #134
Merged
Merged
Conversation
gandhipratik203
marked this pull request as ready for review
July 14, 2026 16:36
gandhipratik203
requested review from
lucarlig and
msureshkumar88
as code owners
July 14, 2026 16:36
Signed-off-by: Pratik Gandhi <gandhipratik203@gmail.com>
Signed-off-by: Pratik Gandhi <gandhipratik203@gmail.com>
Signed-off-by: Pratik Gandhi <gandhipratik203@gmail.com>
Signed-off-by: Pratik Gandhi <gandhipratik203@gmail.com>
gandhipratik203
force-pushed
the
fix/secrets-detection-field-filters
branch
from
July 15, 2026 13:04
aaf21ca to
56e4a34
Compare
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.
Summary
Adds configurable dotted field filters to the
cpex-secrets-detectionplugin so operators can scope scanning to specific payload fields and exclude known noisy or intentionally unscanned subtrees.What changed
field_allowlistandfield_denylistconfig options with validation for dotted field paths.cpex-secrets-detectionto0.3.9.Impact
Existing deployments are backward compatible: both lists default to empty, which preserves current scan behavior. When configured, denylist entries take precedence over allowlist entries.
Closes #132.
Validation
cargo test -p secrets_detectionpassed, 96 testscargo fmt -- --checkpassedcargo clippy -- -D warningspassedmake installpassedmake test-integrationpassed, 114 testsdetect-secrets audit --report --fail-on-unauditedpassed against a temporary updated baselinegit diff --checkpassedTo rerun the integration tests:
cd /Users/pratik/Desktop/work/new_mcf/cpex-plugins/plugins/rust/python-package/secrets_detection make test-integrationNote:
make check-allpreviously reached fmt and clippy successfully, then stopped locally becausecargo-nextestis not installed. The equivalent Rust test coverage was run withcargo test -p secrets_detection.Manual Wheel-Level Test
Built the
cpex-secrets-detectionwheel from this branch and tested the installed wheel from a clean virtualenv outside the repository checkout.Steps
Smoke script
Result
What This Verifies
/tmp, not from the repo checkout.0.3.9.field_allowlist=["accounts"]scans and redactsaccounts.keep.field_denylist=["accounts.skip"]excludesaccounts.skip.ignored, are not scanned.