Where keys end up
- Session transcripts, which record every tool call and its output. Claude Code keeps them in
~/.claude/projects, Codex in~/.codex/sessions. - Prompt history, when a key was pasted into a prompt.
- File checkpoints, the copies agents keep so they can undo their own edits.
Secret scanners built for git, such as gitleaks or GitHub's secret scanning, look at your repository. They don't look in these folders, because they aren't part of any repository.
What the scan looks for
- API keys from Anthropic, OpenAI, AWS, GitHub, Stripe, Google, Slack, npm, SendGrid and Resend.
- Private keys in PEM format.
- Database URLs that contain a password.
- JSON Web Tokens and other secret-looking values, marked as possible findings.
What you can do with a finding
- Rotate it. Each finding links to the page where that kind of key is revoked and replaced. A key that reached a transcript should be treated as exposed.
- Overwrite it. Rollcage replaces the key in the file with a placeholder of the same length, so an agent that is still appending to that transcript isn't disturbed.
When it runs
Shortly after Rollcage launches and every 6 hours after that, or whenever you press Scan. The scan is local. Rollcage never stores the values it finds, only where they are.
Stop the leak at the source
The scan cleans up what already happened. The Guard stops agents from reading secret files and printing environment variables in the first place, and the network guard closes the easy routes for sending them anywhere.
Questions
Does the scan upload my transcripts or keys?
No. It runs on your Mac and nothing leaves it. Found values aren't stored either, only the file and position.
Is overwriting a key enough?
No. Overwriting removes the copy on your disk, but the key was already sent to the model provider as part of the conversation. Rotate it as well.
Will overwriting break my session history?
The replacement has the same length as the key, so the file's structure is unchanged. Only the key itself is gone.