Secret-Scanning Tool Expands Into Redaction And Integration Surface
Sources: 1 • Confidence: Medium • Updated: 2026-04-06 03:42
Key takeaways
- scan-for-secrets version 0.3 has been released.
- scan-for-secrets 0.3 adds a -r/--redact option that lists secret matches, asks for confirmation, and then replaces each match with the string "REDACTED" while respecting escaping rules.
- scan-for-secrets 0.3 adds a Python function redact_file(file_path: str | Path, secrets: list[str], replacement: str = "REDACTED") that returns an int.
Sections
Secret-Scanning Tool Expands Into Redaction And Integration Surface
- scan-for-secrets version 0.3 has been released.
- scan-for-secrets 0.3 adds a -r/--redact option that lists secret matches, asks for confirmation, and then replaces each match with the string "REDACTED" while respecting escaping rules.
- scan-for-secrets 0.3 adds a Python function redact_file(file_path: str | Path, secrets: list[str], replacement: str = "REDACTED") that returns an int.
Unknowns
- What are the precise semantics of the int returned by the Python redaction function (e.g., status code, count of redactions, or error indicator)?
- Does the -r/--redact workflow modify files in place, and if so what backup/rollback behavior (if any) exists?
- What exactly does "respecting escaping rules" mean in the redaction mechanism (which escaping forms, and in which file/content contexts)?
- Is the CLI redaction confirmation step optional or automatable (e.g., for CI), and what non-interactive behavior is supported?
- What, if any, backwards-incompatible changes accompany the 0.3 release (CLI flags, output formats, detection rules)?