The security check your AI coding agent runs for you.
uvx agentprint
npx agentprint-cli
Works inside: Claude Code · Codex · Cursor · Gemini CLI · Windsurf · Devin · OpenCode · Copilot · Hermes · Antigravity
Also scans: Cline · Claude Desktop · Kilo Code · Zed · Goose · Aider · Continue · Qwen Code · Crush · Kiro · Factory Droid · Augment · Amp · Junie
Docs · Get started · Checks · Use in CI
Why
- Agent files leak into packages. In April 2026 Lakera
reported that of about 46,500
npm packages it scanned, 428 shipped
.claude/settings.local.json, and 33 files in 30 packages held credentials. - We measured it too. Our pilot scan (5 November 2026, counts only) of the newest 1,976 npm packages and 1,997 PyPI releases found agent files in 2.1% of npm packages and 9.2% of PyPI releases. 1 npm and 6 PyPI packages shipped files that should never ship. No key-shaped strings turned up inside those agent files.
- History files keep what you paste. Agents save prompts as plain text in your home folder. A June 2026 Hermes Agent advisory (CVE-2026-53870) covers such files being created readable by every user on the machine.
Quickstart
uvx agentprint scan # sweep this machine and folder (keys masked)
uvx agentprint fix # make the safe fixes; shows the plan and asks first
uvx agentprint install # arm each agent it finds with the tripwire
uvx agentprint pack # preflight: what your package would publish
On Windows, install adds the MCP server and the note but no agent hook yet (the hooks run
through /bin/sh), so no agent hook blocks a publish or push there, and agentprint status
says "MCP and note; no hook on Windows yet". agentprint protect (below) still checks pushes
and npm publishes at git and npm themselves. scan, fix and pack work the same.
Get started has the details, including running from a clone of this repo.
For a team, a project config and baseline accept what you have already reviewed.
What it checks
| ID | What it finds | Severity |
|---|---|---|
| AP001 | An API key sits in an agent's history, transcript, paste cache, edit backups or chat database. | high |
| AP002 | An API key sits in an agent settings or allowlist file, or inside an agent file in a package or push. | critical |
| AP003 | An over-broad permission lets the agent run any command or skip every prompt, such as Bash(*) or bypassPermissions. | medium |
| AP004 | An agent hook calls the network, with curl, wget, nc, a pipe into a shell, or a URL. | medium |
| AP005 | An API key is written inline in an MCP server entry (env, headers, args, command or URL). | critical |
| AP006 | An agent file, such as .claude/settings.local.json, would ship in your npm or PyPI package. | high, medium or low, by file |
| AP007 | A personal agent file, such as CLAUDE.local.md, is in a git repo but not gitignored, or is already committed. | low |
| AP008 | Agent history, settings or a key store can be read by other users on this machine (macOS, Linux and Windows). | medium; high for key stores |
| AP009 | Source maps, original source or AI instruction files in your package hand an AI your code. | high to low by licence; no licence, UNLICENSED, SEE LICENSE IN, proprietary or only LicenseRef- choices count as closed; low for a private registry |
| AP010 | A skill, rule, plugin or hook an agent loads has hidden characters, sends a credential out, pipes a download to a shell or hides a command. | high; critical for a credential sent out, medium for a piped download (low in install docs), low for a stray character or an unfinished read |
| AP011 | An MCP server runs a package or image with no fixed version (npx, uvx, pipx run, docker run): each start gets whatever was published last. | medium |
Keys are found by pattern and are never used or sent anywhere: Anthropic, OpenAI, GitHub, AWS,
Stripe, Slack and Google, then 27 newer rules (and Slack xapp- tokens): Google OAuth client
secrets (GOCSPX-), publishing tokens (npm, PyPI, GitLab, Docker Hub), AI providers (Hugging
Face, Groq, OpenRouter, xAI, Perplexity, Replicate), developer platforms (Supabase, Cloudflare,
DigitalOcean, Linear, Notion, Shopify, Atlassian, Postman, SendGrid, Doppler, 1Password), and
DeepSeek, Twilio, Discord and Telegram only next to the provider's name. A generic "secret-looking
name = random-looking value" rule catches the rest. Format lengths for Docker Hub, Supabase
secret keys and Google OAuth secrets are from third-party scanners, not the vendor's docs.
It also finds keys hidden from ordinary secret scanners: split across strings, behind invisible characters, continued across lines, inside YAML blocks or base64. The benchmark scores agentprint, gitleaks and trufflehog the same way on a labelled corpus, with its method and limits stated.
Inside your AI agent
- A hook runs before the agent publishes a package or runs
git push, and checks what would go out. It follows what the command runs, too: shell scripts, make and just recipes,npm versionhooks. Not on Windows yet: thereinstalladds only the MCP server and the note. - An MCP server gives the agent tools to check on its own.
- If something would leak, the agent gets a brief: the fix steps, plus what to ask you (rotate a key).
- It only ever blocks (BLOCK or CLEAR); your agent's own approval rules still apply.
- Strict mode (
agentprint install --strict) also blocks a publish or push agentprint can't check. agentprint uninstalltakes out exactly whatinstalladded.agentprint protectadds a second check at git and npm themselves (a pre-push hook andprepublishOnly), so a push hidden from the agent hook is still caught.--undotakes it out.- Rather add it as a plugin? Claude Code, Codex, Copilot CLI, Gemini CLI, Cursor, Antigravity and Hermes each have one: see Plugins.
Details: Inside your agent.
More
Agents · Plugins · Use in CI · Privacy · Comparison · Census · How it works
Contributing · Security · License (MIT)
Built with Python 3.11+, uv, typer, rich, the MCP Python SDK, pytest and ruff; docs with Astro Starlight.
Metadata
Release files for agentprint 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agentprint-0.1.1.tar.gz | 691.0 kB | With provenance | Details for agentprint-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentprint-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for agentprint-0.1.1-py3-none-any.whl |
Total release size: 1.1 MB
Release files / agentprint-0.1.1.tar.gz
| Download URL | agentprint-0.1.1.tar.gz |
|---|---|
| Size | 691.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d2b7be7c4e8692f440fdcc955ee7bd219edf2f729b4fbb527733e92dca8ac600
|
|
BLAKE2b-256 checksum How to use checksums |
175e8fbe5007fcf6f0eb86b9e22b901cb4d3da89169768c8d945eeec7f53880a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logRelease files / agentprint-0.1.1-py3-none-any.whl
| Download URL | agentprint-0.1.1-py3-none-any.whl |
|---|---|
| Size | 402.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
773bf148ac2e4f10372224e4c54b61ffcca4129ee3754b2a681f00778306a2f7
|
|
BLAKE2b-256 checksum How to use checksums |
e13e2a211b55e7732959a0f0043dedb7646b3e692d48b90d7be91d8327cb2a07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logSecurity for agentprint 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for agentprint-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.