Field noteNov 1, 20265 min read1 source

keysprawl v0.1.0: offline scanner that finds copies of OpenAI, Anthropic and GitHub keys in coding-agent configs

In one minute

keysprawl is a single-file Python utility for finding local copies of OpenAI, Anthropic and GitHub keys across coding-agent configuration files and related locations. Its value is operational: after a key exposure, it can show where copies remain and produce a checklist for cleanup. The README labels v0.1.0 unreleased and documents narrow testing.

What changed: A new offline, read-only scanner targets copied OpenAI, Anthropic and GitHub keys across coding-agent configs, distinct from reports of exposed keys in the OpenCode breach.

What happened

The GitHub repository describes keysprawl as a read-only, offline scanner for API-key copies on a local machine. The README says it looks for OpenAI, Anthropic and GitHub keys in configuration and credential files associated with OpenCode, Claude Code and Codex, as well as shell startup files, PowerShell profiles, .env files and backups. For OpenCode, it includes auth.json, opencode.json and opencode.db; the SQLite database is opened in read-only, immutable mode. The tool also reads the current process environment unless that check is disabled.

For each match, keysprawl reports the key type, a masked value, the number of copies and their locations. Output can be JSON, or a Markdown revocation checklist. The checklist is intended to help an operator track follow-up steps such as revoking and replacing a key and updating the locations where it was stored. The source says existing checklist files are not overwritten unless the user explicitly supplies --force.

The project is a single keysprawl.py file with no third-party runtime dependencies. The README says the code is written for Python 3.9 or later, while the only stated real-machine testing was on Python 3.13 under Linux. macOS and Windows are not yet tested on real machines. The repository lists an MIT license. The README labels the version v0.1.0 and says it is unreleased.

The utility does not connect to the network, validate whether a key still works, revoke or replace keys, alter scanned files, inspect the system keychain or scan Git history. It is therefore an inventory and response aid, not a leak detector that prevents exposure or a complete incident-response system. The repository connects its use case to reports of provider keys in OpenCode workspaces and to cases where credentials in opencode.db may take precedence over configuration values; the scanner's own README cautions that full coverage of those scenarios is not established.

What the archive adds

New Runtime has covered adjacent security tools: Anthropic's opt-in OSS Scanner and OpenQodex. Those stories concern vulnerability scanning and code review, not locating leaked credentials. keysprawl is a new, narrower response tool in the broader AI-development security thread, rather than a restatement of either product.

Trend signal

This supports agent security moves to runtime boundaries weakly: coding-agent credentials are part of the local execution environment and need deliberate inventory and handling. But keysprawl is a cleanup utility, not a runtime control that constrains agent access or authorization, so it does not demonstrate that the boundary has shifted in practice.

Why now

The repository frames the scanner as a response to recent reports of exposed provider keys in OpenCode workspaces and to credentials that may persist in its local database. That context makes locating residual copies timely, but the source does not establish that keysprawl itself has been validated against every reported exposure scenario.

Why it matters

A key can remain usable in more than one local file even after an operator changes a setting in the place they first notice it. A read-only inventory that identifies masked copies and their paths can make the manual sequence of revoking, replacing and updating credentials less dependent on memory. It may be especially useful where coding agents have accumulated configuration, backups and project-level .env files.

The limits matter as much as the convenience. Teams still need provider-side revocation, replacement, usage review and a secure distribution process for the new secret. The scan cannot establish whether a key is valid or compromised, and its stated platform testing is limited. A team should review the code and run it against a controlled environment before relying on its coverage in incident response.

Limits and uncertainty

The source does not establish that the scanner finds every possible credential location, nor that it detects every key format or all application-specific storage mechanisms. It explicitly excludes Git history and system keychains, and its README says macOS and Windows have not been tested on real machines. The claimed handling of OpenCode database credentials is a practical motivation, not proof that all reported cases are covered. The repository also labels v0.1.0 unreleased, so the material does not establish a stable release or long-term maintenance.

Skill to build now

Create a small credential-response runbook for coding-agent workstations: identify approved key locations, assign an owner for revocation and replacement, and require a post-rotation check of local configs, backups and usage dashboards. If evaluating keysprawl, test it first with synthetic keys in a disposable environment; confirm which paths it scans and that the masked output is suitable for sharing with responders.

Reader takeaway

keysprawl makes one part of key rotation more concrete: finding local copies that might otherwise be missed. Treat it as a read-only inventory aid, not proof that a workstation is clean or a substitute for revoking exposed credentials. Its unreleased status and Linux-only stated testing call for cautious evaluation.

Evidence / sources

  1. 1github.com/quzheng130/keysprawl
All Field Notes

Next reads

Read next

Open the graph
  1. 01topicAnthropicExplore the anthropic topic hub.
  2. 02topicGithubExplore the github topic hub.
  3. 03topicClaudeExplore the claude topic hub.
  4. 04archiveField NotesOpen the latest editorial analysis.
  5. 05source ledgerSource LedgerInspect the public source evidence graph.
Who read this page?Machine requests, hidden until opened

Loading the privacy-safe route aggregate...

Open the JSON contract