Skip to main content

agentprint

The security check your AI coding agent runs for you.

tests coverage types: pyright PyPI npm license: MIT

uvx agentprint
npx agentprint-cli

agentprint's welcome screen and menu, a scan that finds keys and risky settings left by AI agents and ends on BLOCK, and the BLOCK verdict with fix steps an AI agent gets for a package that would leak a key

Works inside: Claude Code · Codex · Cursor · Gemini CLI · Windsurf · Devin · OpenCode · Copilot · Hermes · Antigravity

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

Get started has the details, including running from a clone of this repo.

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 and Linux). 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

Keys are found by pattern (Anthropic, OpenAI, GitHub, AWS, Stripe, Slack and Google formats, plus a generic "secret-looking name = random-looking value" rule) and are never used or sent anywhere.

Inside your AI agent

  • A hook runs before the agent publishes a package or runs git push, and checks what would go out.
  • 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.
  • agentprint uninstall takes out exactly what install added.

Details: Inside your agent.

More

Agents · 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.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentprint 0.1.0
File Size Uploaded Provenance Actions
agentprint-0.1.0.tar.gz 327.6 kB With provenance Details for agentprint-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agentprint 0.1.0
File Interpreter ABI Platform Actions
agentprint-0.1.0-py3-none-any.whl Python 3 none any Details for agentprint-0.1.0-py3-none-any.whl

Total release size: 511.5 kB

Release files / agentprint-0.1.0.tar.gz

Download URL agentprint-0.1.0.tar.gz
Size 327.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d0da866acbf18e0e8f07f266e7648e8b3d1c67b3323089ebc8a7864c4a63c9fd
BLAKE2b-256 checksum
How to use checksums
5c048dc8fe470dc91f01b110018f72fd945e6ee7aa7c8f29477e6754708840bb
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 7, 2026.

Transparency log

Release files / agentprint-0.1.0-py3-none-any.whl

Download URL agentprint-0.1.0-py3-none-any.whl
Size 183.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b5675e853ba816bddf3bc35d0347d978e73a90736bc27a07852a17f6dd435a7c
BLAKE2b-256 checksum
How to use checksums
ee574744f52fd5830955568c67d7fa20684f567a596d0085519151c3c517dbb8
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 7, 2026.

Transparency log

Security for agentprint 0.1.0

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.

Select from 2 files

Attestation for agentprint-0.1.0.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 7, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page