Repository navigation
How should we manage credential redaction? #3991
Replies: 1 comment 2 replies
|
I would put a detector behind the existing redaction interface, then compare it with the current rules before replacing them. Pin the detector version so it can be replaced behind that interface. Two integration details matter. Its baseline JSON stores a hash and line metadata, not replacement spans. Live findings are per line and retain the matched value, so replacement needs to happen in memory before serializing the result. Its plugins and filters also target source-code scanning. For outgoing artifacts, I would explicitly choose the filters and omit the verification filter, which can send candidate credentials to provider APIs. Do not inherit baseline exclusions or let an allowlist comment decide what is safe to publish. Configure plugins and filters once at startup, and check that a synthetic canary is detected. Defaults can leave the plugin list empty. Settings are process-global, and Keep structural handling for URL userinfo, Authorization headers and known credential fields, since those can contain low entropy values. Use the detector to extend coverage for bare tokens. Before switching, run both against a synthetic corpus containing those existing cases, multiline values, escaped strings and benign high entropy identifiers. Compare missed redactions, damaged non-secret text and latency on realistically sized artifacts. Neither entropy nor a curated catalogue establishes that arbitrary output is secret-free. |
Uh oh!
There was an error while loading. Please reload this page.
redact_credentials(git_provider.py:159) and the artifact redaction proposed in #3989 match credentials with hand-written patterns, so anything outside the list passes through, and each new format means another regex. Should we keep growing our own patterns, or adopt a maintained detector with a curated rule set plus entropy checks? detect-secrets (Yelp, pure Python) is the obvious candidate, though its last release was May 2024. presidio is maintained but aimed at personal data and heavy. Any switch adds a runtime dependency, so views welcome before anyone opens a PR.All reactions