scan-for-secrets 0.3

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

Anyone sharing code or logs can now automatically scrub secrets from files before publishing, replacing the error-prone manual find-and-replace that leaks API keys.

Read this as

Developer Simon Willison updated his open-source tool scan-for-secrets to version 0.3 on 6th April 2026. The tool finds sensitive items like passwords or API keys, called secrets, in files you plan to share. Version 0.3 adds a --redact option that lists what it found, asks you to confirm, and replaces every match with the word REDACTED, handling tricky text-escaping rules. The tool is free to use today.

scan-for-secrets 0.3, released 6th April 2026, addresses the common and costly mistake of accidentally publishing API keys or passwords in shared code. The new --redact mode shows matches, requires human confirmation, then rewrites files safely, reducing risk that secrets reach public repositories. It is a free, small open-source utility; no pricing, adoption figures or vendor involvement are mentioned.

scan-for-secrets 0.3 adds a -r/--redact CLI flag that prints all secret matches, prompts for confirmation, and rewrites each match as REDACTED while respecting escaping rules. It also exposes a Python API: redact_file(file_path: str | Path, secrets: list[str], replacement: str = "REDACTED") -> int, returning a count. No benchmark data or performance figures are provided in the post.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

scan-for-secrets Simon Willison WorkOS Datasette Pyodide Claude

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading