scan-for-secrets 0.1

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

Why it matters

Anyone publishing AI coding-agent logs, like Claude Code transcripts, now has a one-command way to catch accidentally exposed API keys before release.

Read this as

Programmer Simon Willison released scan-for-secrets 0.1, a free Python tool that checks files for accidentally exposed secret passwords, like API keys, before you share them. You hand it your actual keys and a folder, and it scans not only for the exact keys but also for common disguised forms, such as backslash or JSON escaping. It is useful for anyone publishing detailed logs from AI coding sessions, such as transcripts made with his claude-code-transcripts tool. It was built largely by the Claude Code AI assistant from a detailed README, following red/green test-driven development.

Simon Willison has released scan-for-secrets 0.1, a free open-source utility addressing a real reputational risk: leaking API credentials when publishing logs or transcripts of AI coding sessions. Run via 'uvx scan-for-secrets' against a directory, it detects secrets in literal and common escaped (JSON, backslash) forms. Teams that share agent transcripts can adopt it immediately. A config file lets users permanently protect a standard set of keys, including AWS credentials.

scan-for-secrets 0.1 scans a directory for supplied secret strings, matching not only literal values but also common escaping schemes (backslash, JSON) documented in its README. Invocation is 'uvx scan-for-secrets $OPENAI_API_KEY -d logs-to-publish/', defaulting to the current directory without '-d'. Persistent secret sets are configured via shell echo commands in '~/.scan-for-secrets.conf.sh', e.g. 'llm keys get openai' or awk extraction of AWS keys. Willison developed it with README-driven development, delegating implementation to Claude Code using red/green TDD.

Read the original

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

Key terms

scan-for-secrets 0.1 claude-code-transcripts Claude Code uvx AWS credentials ~/.scan-for-secrets.conf.sh

Was this summary useful?

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

Related reading