Live
Black Hat USAAI BusinessBlack Hat AsiaAI BusinessHow the Amazon Echo learned to talk — and listenThe Verge AIHere's when poker tactics secured Microsoft’s DeepMind deal - The News InternationalGoogle News: DeepMind🔥 sponsors/atilaahmettanerGitHub Trending🔥 google-ai-edge/galleryGitHub Trending🔥 google-deepmind/gemmaGitHub Trending🔥 google-ai-edge/LiteRT-LMGitHub Trending🔥 HKUDS/RAG-AnythingGitHub Trending🔥 sponsors/badlogicGitHub TrendingEverything Works, But Users Are Still Confused: What SaaS Teams Are MissingDEV CommunityARTIFICIAL INTELLIGENCE KEYNOTE SPEAKER FOR CORPORATE EVENTS & AI CONFERENCES - futuristsspeakers.comGoogle News: AI"Be Anything You Want" — OK, Here's How (Technically)DEV CommunityWashington sets new rules for artificial intelligence - seattlered.comGoogle News: AIBlack Hat USAAI BusinessBlack Hat AsiaAI BusinessHow the Amazon Echo learned to talk — and listenThe Verge AIHere's when poker tactics secured Microsoft’s DeepMind deal - The News InternationalGoogle News: DeepMind🔥 sponsors/atilaahmettanerGitHub Trending🔥 google-ai-edge/galleryGitHub Trending🔥 google-deepmind/gemmaGitHub Trending🔥 google-ai-edge/LiteRT-LMGitHub Trending🔥 HKUDS/RAG-AnythingGitHub Trending🔥 sponsors/badlogicGitHub TrendingEverything Works, But Users Are Still Confused: What SaaS Teams Are MissingDEV CommunityARTIFICIAL INTELLIGENCE KEYNOTE SPEAKER FOR CORPORATE EVENTS & AI CONFERENCES - futuristsspeakers.comGoogle News: AI"Be Anything You Want" — OK, Here's How (Technically)DEV CommunityWashington sets new rules for artificial intelligence - seattlered.comGoogle News: AI
AI NEWS HUBbyEIGENVECTOREigenvector

scan-for-secrets 0.1

Simon Willison BlogApril 5, 20262 min read0 views
Source Quiz

Release: scan-for-secrets 0.1 I like publishing transcripts of local Claude Code sessions using my claude-code-transcripts tool but I'm often paranoid that one of my API keys or similar secrets might inadvertently be revealed in the detailed log files. I built this new Python scanning tool to help reassure me. You can feed it secrets and have it scan for them in a specified directory: uvx scan-for-secrets $OPENAI_API_KEY -d logs-to-publish/ If you leave off the -d it defaults to the current directory. It doesn't just scan for the literal secrets - it also scans for common encodings of those secrets e.g. backslash or JSON escaping, as described in the README . If you have a set of secrets you always want to protect you can list commands to echo them in a ~/.scan-for-secrets.conf.sh file. Mi

I like publishing transcripts of local Claude Code sessions using my claude-code-transcripts tool but I'm often paranoid that one of my API keys or similar secrets might inadvertently be revealed in the detailed log files.

I built this new Python scanning tool to help reassure me. You can feed it secrets and have it scan for them in a specified directory:

uvx scan-for-secrets $OPENAI_API_KEY -d logs-to-publish/

If you leave off the -d it defaults to the current directory.

It doesn't just scan for the literal secrets - it also scans for common encodings of those secrets e.g. backslash or JSON escaping, as described in the README.

If you have a set of secrets you always want to protect you can list commands to echo them in a ~/.scan-for-secrets.conf.sh file. Mine looks like this:

llm keys get openai llm keys get anthropic llm keys get gemini llm keys get mistral awk -F= '/aws_secret_access_key/{print $2}' ~/.aws/credentials | xargs

I built this tool using README-driven-development: I carefully constructed the README describing exactly how the tool should work, then dumped it into Claude Code and told it to build the actual tool (using red/green TDD, naturally.)

Was this article helpful?

Sign in to highlight and annotate this article

AI
Ask AI about this article
Powered by Eigenvector · full article context loaded
Ready

Conversation starters

Ask anything about this article…

Daily AI Digest

Get the top 5 AI stories delivered to your inbox every morning.

Knowledge Map

Knowledge Map
TopicsEntitiesSource
scan-for-se…claudegeminimistralreleaseagenticagentSimon Willi…

Connected Articles — Knowledge Graph

This article is connected to other articles through shared AI topics and tags.

Knowledge Graph100 articles · 162 connections
Scroll to zoom · drag to pan · click to open

Discussion

Sign in to join the discussion

No comments yet — be the first to share your thoughts!