agentprint 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agentprint-0.1.0/.gitignore +37 -0
- agentprint-0.1.0/LICENSE +21 -0
- agentprint-0.1.0/PKG-INFO +124 -0
- agentprint-0.1.0/README.md +108 -0
- agentprint-0.1.0/agentprint/__init__.py +3 -0
- agentprint-0.1.0/agentprint/advice.py +408 -0
- agentprint-0.1.0/agentprint/agents/__init__.py +31 -0
- agentprint-0.1.0/agentprint/agents/antigravity.py +162 -0
- agentprint-0.1.0/agentprint/agents/base.py +225 -0
- agentprint-0.1.0/agentprint/agents/claude_code.py +147 -0
- agentprint-0.1.0/agentprint/agents/codex.py +126 -0
- agentprint-0.1.0/agentprint/agents/copilot.py +233 -0
- agentprint-0.1.0/agentprint/agents/cursor.py +171 -0
- agentprint-0.1.0/agentprint/agents/gemini.py +131 -0
- agentprint-0.1.0/agentprint/agents/hermes.py +144 -0
- agentprint-0.1.0/agentprint/agents/opencode.py +114 -0
- agentprint-0.1.0/agentprint/agents/scan_only.py +246 -0
- agentprint-0.1.0/agentprint/agents/windsurf.py +106 -0
- agentprint-0.1.0/agentprint/badge.py +53 -0
- agentprint-0.1.0/agentprint/checks/__init__.py +28 -0
- agentprint-0.1.0/agentprint/checks/ap001_history_secret.py +12 -0
- agentprint-0.1.0/agentprint/checks/ap002_settings_secret.py +13 -0
- agentprint-0.1.0/agentprint/checks/ap003_overbroad_permission.py +62 -0
- agentprint-0.1.0/agentprint/checks/ap004_network_hook.py +93 -0
- agentprint-0.1.0/agentprint/checks/ap005_mcp_inline_secret.py +80 -0
- agentprint-0.1.0/agentprint/checks/ap006_package_leak.py +60 -0
- agentprint-0.1.0/agentprint/checks/ap007_local_not_ignored.py +115 -0
- agentprint-0.1.0/agentprint/checks/ap008_readable_by_others.py +223 -0
- agentprint-0.1.0/agentprint/checks/ap009_source_exposure.py +505 -0
- agentprint-0.1.0/agentprint/checks/base.py +89 -0
- agentprint-0.1.0/agentprint/cli.py +828 -0
- agentprint-0.1.0/agentprint/commands.py +467 -0
- agentprint-0.1.0/agentprint/files.py +56 -0
- agentprint-0.1.0/agentprint/fix.py +1381 -0
- agentprint-0.1.0/agentprint/fixreport.py +257 -0
- agentprint-0.1.0/agentprint/gitcheck.py +129 -0
- agentprint-0.1.0/agentprint/guard.py +209 -0
- agentprint-0.1.0/agentprint/hook.py +47 -0
- agentprint-0.1.0/agentprint/install.py +635 -0
- agentprint-0.1.0/agentprint/integrations/__init__.py +29 -0
- agentprint-0.1.0/agentprint/integrations/antigravity.py +141 -0
- agentprint-0.1.0/agentprint/integrations/base.py +483 -0
- agentprint-0.1.0/agentprint/integrations/claude_code.py +115 -0
- agentprint-0.1.0/agentprint/integrations/codex.py +142 -0
- agentprint-0.1.0/agentprint/integrations/copilot.py +132 -0
- agentprint-0.1.0/agentprint/integrations/cursor.py +150 -0
- agentprint-0.1.0/agentprint/integrations/gemini.py +125 -0
- agentprint-0.1.0/agentprint/integrations/hermes.py +176 -0
- agentprint-0.1.0/agentprint/integrations/opencode.py +162 -0
- agentprint-0.1.0/agentprint/integrations/windsurf.py +196 -0
- agentprint-0.1.0/agentprint/mcp_server.py +86 -0
- agentprint-0.1.0/agentprint/models.py +108 -0
- agentprint-0.1.0/agentprint/pack.py +288 -0
- agentprint-0.1.0/agentprint/report.py +134 -0
- agentprint-0.1.0/agentprint/roster.py +59 -0
- agentprint-0.1.0/agentprint/safewrite.py +44 -0
- agentprint-0.1.0/agentprint/sanitize.py +63 -0
- agentprint-0.1.0/agentprint/sarif.py +215 -0
- agentprint-0.1.0/agentprint/scanner.py +40 -0
- agentprint-0.1.0/agentprint/secrets.py +104 -0
- agentprint-0.1.0/agentprint/sqlite_text.py +81 -0
- agentprint-0.1.0/agentprint/structured.py +150 -0
- agentprint-0.1.0/agentprint/ui/__init__.py +0 -0
- agentprint-0.1.0/agentprint/ui/detect.py +96 -0
- agentprint-0.1.0/agentprint/ui/fixview.py +239 -0
- agentprint-0.1.0/agentprint/ui/layout.py +95 -0
- agentprint-0.1.0/agentprint/ui/mascot.py +63 -0
- agentprint-0.1.0/agentprint/ui/menu.py +361 -0
- agentprint-0.1.0/agentprint/ui/results.py +102 -0
- agentprint-0.1.0/agentprint/ui/sweep.py +59 -0
- agentprint-0.1.0/agentprint/ui/theme.py +73 -0
- agentprint-0.1.0/agentprint/ui/welcome.py +117 -0
- agentprint-0.1.0/pyproject.toml +71 -0
- agentprint-0.1.0/tests/__init__.py +0 -0
- agentprint-0.1.0/tests/action_fixtures.py +46 -0
- agentprint-0.1.0/tests/conftest.py +326 -0
- agentprint-0.1.0/tests/data/sarif-schema-2.1.0.NOTICE.txt +34 -0
- agentprint-0.1.0/tests/data/sarif-schema-2.1.0.json +3389 -0
- agentprint-0.1.0/tests/data/snapshots/fix.agent.txt +13 -0
- agentprint-0.1.0/tests/data/snapshots/pack.agent.txt +11 -0
- agentprint-0.1.0/tests/data/snapshots/pack.json +28 -0
- agentprint-0.1.0/tests/data/snapshots/scan.agent.txt +59 -0
- agentprint-0.1.0/tests/data/snapshots/scan.json +148 -0
- agentprint-0.1.0/tests/data/snapshots/scan.sarif +291 -0
- agentprint-0.1.0/tests/fakes.py +27 -0
- agentprint-0.1.0/tests/live/__init__.py +0 -0
- agentprint-0.1.0/tests/live/harness.py +177 -0
- agentprint-0.1.0/tests/live/install_clis.py +70 -0
- agentprint-0.1.0/tests/live/mock_model.py +382 -0
- agentprint-0.1.0/tests/live/runner.py +254 -0
- agentprint-0.1.0/tests/live/test_live_claude_code.py +81 -0
- agentprint-0.1.0/tests/live/test_live_codex.py +97 -0
- agentprint-0.1.0/tests/live/test_live_copilot.py +87 -0
- agentprint-0.1.0/tests/live/test_live_gemini.py +93 -0
- agentprint-0.1.0/tests/live/test_live_hermes.py +100 -0
- agentprint-0.1.0/tests/live/test_live_opencode.py +104 -0
- agentprint-0.1.0/tests/live/test_mock_model.py +158 -0
- agentprint-0.1.0/tests/live/test_runner_checks.py +101 -0
- agentprint-0.1.0/tests/test_action.py +350 -0
- agentprint-0.1.0/tests/test_advice.py +225 -0
- agentprint-0.1.0/tests/test_agent_antigravity.py +111 -0
- agentprint-0.1.0/tests/test_agent_config.py +200 -0
- agentprint-0.1.0/tests/test_agent_copilot.py +120 -0
- agentprint-0.1.0/tests/test_agent_cursor.py +79 -0
- agentprint-0.1.0/tests/test_agent_gemini.py +73 -0
- agentprint-0.1.0/tests/test_agent_hermes.py +73 -0
- agentprint-0.1.0/tests/test_agent_opencode.py +80 -0
- agentprint-0.1.0/tests/test_agent_windsurf.py +54 -0
- agentprint-0.1.0/tests/test_agents.py +60 -0
- agentprint-0.1.0/tests/test_agents_scan_only.py +114 -0
- agentprint-0.1.0/tests/test_ap005_review.py +47 -0
- agentprint-0.1.0/tests/test_ap009.py +1090 -0
- agentprint-0.1.0/tests/test_badge.py +134 -0
- agentprint-0.1.0/tests/test_badge_workflow.py +193 -0
- agentprint-0.1.0/tests/test_brand.py +182 -0
- agentprint-0.1.0/tests/test_check_ap003.py +66 -0
- agentprint-0.1.0/tests/test_check_ap004.py +95 -0
- agentprint-0.1.0/tests/test_check_ap005.py +64 -0
- agentprint-0.1.0/tests/test_check_ap007.py +106 -0
- agentprint-0.1.0/tests/test_check_ap008.py +253 -0
- agentprint-0.1.0/tests/test_checks.py +52 -0
- agentprint-0.1.0/tests/test_cli.py +131 -0
- agentprint-0.1.0/tests/test_cli_bare.py +578 -0
- agentprint-0.1.0/tests/test_cli_fix.py +576 -0
- agentprint-0.1.0/tests/test_cli_format_auto.py +224 -0
- agentprint-0.1.0/tests/test_cli_status.py +94 -0
- agentprint-0.1.0/tests/test_commands.py +106 -0
- agentprint-0.1.0/tests/test_commands_review.py +135 -0
- agentprint-0.1.0/tests/test_demo.py +220 -0
- agentprint-0.1.0/tests/test_docs_pages.py +193 -0
- agentprint-0.1.0/tests/test_e2e_hostile_names.py +112 -0
- agentprint-0.1.0/tests/test_ecoscan_budget.py +125 -0
- agentprint-0.1.0/tests/test_ecoscan_detect.py +84 -0
- agentprint-0.1.0/tests/test_ecoscan_merge.py +94 -0
- agentprint-0.1.0/tests/test_ecoscan_net.py +225 -0
- agentprint-0.1.0/tests/test_ecoscan_registries.py +322 -0
- agentprint-0.1.0/tests/test_ecoscan_run.py +162 -0
- agentprint-0.1.0/tests/test_ecoscan_shard.py +138 -0
- agentprint-0.1.0/tests/test_ecoscan_summary.py +169 -0
- agentprint-0.1.0/tests/test_files.py +78 -0
- agentprint-0.1.0/tests/test_fix_changes.py +400 -0
- agentprint-0.1.0/tests/test_fix_mask.py +397 -0
- agentprint-0.1.0/tests/test_fix_pack.py +208 -0
- agentprint-0.1.0/tests/test_fix_steps_review.py +56 -0
- agentprint-0.1.0/tests/test_fix_text_review.py +61 -0
- agentprint-0.1.0/tests/test_gen_docs.py +262 -0
- agentprint-0.1.0/tests/test_gitcheck.py +89 -0
- agentprint-0.1.0/tests/test_gitcheck_review.py +39 -0
- agentprint-0.1.0/tests/test_guard.py +96 -0
- agentprint-0.1.0/tests/test_guard_review.py +157 -0
- agentprint-0.1.0/tests/test_home_artifacts.py +18 -0
- agentprint-0.1.0/tests/test_hooks.py +287 -0
- agentprint-0.1.0/tests/test_install.py +254 -0
- agentprint-0.1.0/tests/test_install_new_agents.py +220 -0
- agentprint-0.1.0/tests/test_install_regressions.py +398 -0
- agentprint-0.1.0/tests/test_install_robust_review.py +212 -0
- agentprint-0.1.0/tests/test_landing.py +156 -0
- agentprint-0.1.0/tests/test_launcher.py +102 -0
- agentprint-0.1.0/tests/test_launcher_missing.py +120 -0
- agentprint-0.1.0/tests/test_mcp.py +107 -0
- agentprint-0.1.0/tests/test_npm_package.py +65 -0
- agentprint-0.1.0/tests/test_output_snapshots.py +65 -0
- agentprint-0.1.0/tests/test_own_package.py +26 -0
- agentprint-0.1.0/tests/test_pack.py +242 -0
- agentprint-0.1.0/tests/test_precommit_hooks.py +35 -0
- agentprint-0.1.0/tests/test_prepublic_audit.py +190 -0
- agentprint-0.1.0/tests/test_quality_workflows.py +188 -0
- agentprint-0.1.0/tests/test_readme.py +70 -0
- agentprint-0.1.0/tests/test_release_workflow.py +69 -0
- agentprint-0.1.0/tests/test_report.py +99 -0
- agentprint-0.1.0/tests/test_roster.py +53 -0
- agentprint-0.1.0/tests/test_sanitize.py +33 -0
- agentprint-0.1.0/tests/test_sarif.py +260 -0
- agentprint-0.1.0/tests/test_secrets.py +83 -0
- agentprint-0.1.0/tests/test_site_config.py +148 -0
- agentprint-0.1.0/tests/test_sqlite_text.py +76 -0
- agentprint-0.1.0/tests/test_structured.py +103 -0
- agentprint-0.1.0/tests/test_ui_detect.py +80 -0
- agentprint-0.1.0/tests/test_ui_fixview.py +145 -0
- agentprint-0.1.0/tests/test_ui_layout.py +67 -0
- agentprint-0.1.0/tests/test_ui_mascot.py +33 -0
- agentprint-0.1.0/tests/test_ui_menu.py +398 -0
- agentprint-0.1.0/tests/test_ui_results.py +267 -0
- agentprint-0.1.0/tests/test_ui_styles.py +188 -0
- agentprint-0.1.0/tests/test_ui_theme.py +67 -0
- agentprint-0.1.0/tests/test_ui_welcome.py +235 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
.venv/
|
|
5
|
+
.pytest_cache/
|
|
6
|
+
.ruff_cache/
|
|
7
|
+
.mypy_cache/
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
*.egg-info/
|
|
11
|
+
.coverage
|
|
12
|
+
htmlcov/
|
|
13
|
+
|
|
14
|
+
# Env / secrets
|
|
15
|
+
.env
|
|
16
|
+
.env.*
|
|
17
|
+
|
|
18
|
+
# OS / editors
|
|
19
|
+
.DS_Store
|
|
20
|
+
.idea/
|
|
21
|
+
.vscode/
|
|
22
|
+
|
|
23
|
+
# Agent footprints — this repo must never ship its own
|
|
24
|
+
.claude/settings.local.json
|
|
25
|
+
|
|
26
|
+
# Scan output (may contain real findings — never commit)
|
|
27
|
+
scans/
|
|
28
|
+
|
|
29
|
+
# Copied into npm/ by the release workflow, never committed
|
|
30
|
+
npm/README.md
|
|
31
|
+
npm/LICENSE
|
|
32
|
+
|
|
33
|
+
# Docs site
|
|
34
|
+
node_modules/
|
|
35
|
+
site/.astro/
|
|
36
|
+
coverage.json
|
|
37
|
+
site/public/coverage.json
|
agentprint-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 adighatakdas-cloud
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: agentprint
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Find the secrets and risky permissions AI coding agents leave behind — on your machine and in the packages you publish.
|
|
5
|
+
Author-email: adighatakdas-cloud <adi65das@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Keywords: ai-agents,claude-code,codex,npm,pypi,secrets,security
|
|
9
|
+
Requires-Python: >=3.11
|
|
10
|
+
Requires-Dist: mcp>=2.3.0
|
|
11
|
+
Requires-Dist: pyyaml>=6.0.3
|
|
12
|
+
Requires-Dist: rich>=15.0.0
|
|
13
|
+
Requires-Dist: ruamel-yaml>=0.19.1
|
|
14
|
+
Requires-Dist: typer>=0.27.3
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
<p align="center">
|
|
18
|
+
<picture>
|
|
19
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/adighatakdas-cloud/agentprint/main/docs/brand/logo-dark.svg">
|
|
20
|
+
<img alt="agentprint" src="https://raw.githubusercontent.com/adighatakdas-cloud/agentprint/main/docs/brand/logo-light.svg" width="440">
|
|
21
|
+
</picture>
|
|
22
|
+
</p>
|
|
23
|
+
|
|
24
|
+
<h3 align="center">The security check your AI coding agent runs for you.</h3>
|
|
25
|
+
|
|
26
|
+
<p align="center">
|
|
27
|
+
<a href="https://github.com/adighatakdas-cloud/agentprint/actions/workflows/ci.yml"><img alt="tests" src="https://img.shields.io/github/actions/workflow/status/adighatakdas-cloud/agentprint/ci.yml?branch=main&label=tests&style=flat-square&labelColor=050B14&color=FFB020"></a>
|
|
28
|
+
<a href="https://adighatakdas-cloud.github.io/agentprint/coverage.json"><img alt="coverage" src="https://img.shields.io/endpoint?url=https://adighatakdas-cloud.github.io/agentprint/coverage.json&style=flat-square"></a>
|
|
29
|
+
<a href="https://github.com/microsoft/pyright"><img alt="types: pyright" src="https://img.shields.io/badge/types-pyright-FFB020?style=flat-square&labelColor=050B14"></a>
|
|
30
|
+
<a href="https://pypi.org/project/agentprint/"><img alt="PyPI" src="https://img.shields.io/pypi/v/agentprint?style=flat-square&labelColor=050B14&color=FFB020"></a>
|
|
31
|
+
<a href="https://www.npmjs.com/package/agentprint-cli"><img alt="npm" src="https://img.shields.io/npm/v/agentprint-cli?style=flat-square&labelColor=050B14&color=FFB020"></a>
|
|
32
|
+
<a href="https://github.com/adighatakdas-cloud/agentprint/blob/main/LICENSE"><img alt="license: MIT" src="https://img.shields.io/badge/license-MIT-FFB020?style=flat-square&labelColor=050B14"></a>
|
|
33
|
+
</p>
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
uvx agentprint
|
|
37
|
+
npx agentprint-cli
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
<p align="center">
|
|
41
|
+
<img alt="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" src="https://raw.githubusercontent.com/adighatakdas-cloud/agentprint/main/docs/demo.gif">
|
|
42
|
+
</p>
|
|
43
|
+
|
|
44
|
+
<p align="center">
|
|
45
|
+
<sub>Works inside: Claude Code · Codex · Cursor · Gemini CLI · Windsurf · Devin · OpenCode · Copilot · Hermes · Antigravity</sub>
|
|
46
|
+
</p>
|
|
47
|
+
|
|
48
|
+
<p align="center">
|
|
49
|
+
<a href="https://adighatakdas-cloud.github.io/agentprint/">Docs</a> ·
|
|
50
|
+
<a href="https://adighatakdas-cloud.github.io/agentprint/get-started/">Get started</a> ·
|
|
51
|
+
<a href="https://adighatakdas-cloud.github.io/agentprint/checks/">Checks</a> ·
|
|
52
|
+
<a href="https://adighatakdas-cloud.github.io/agentprint/ci/">Use in CI</a>
|
|
53
|
+
</p>
|
|
54
|
+
|
|
55
|
+
## Why
|
|
56
|
+
|
|
57
|
+
- **Agent files leak into packages.** In April 2026 Lakera
|
|
58
|
+
[reported](https://bdtechtalks.com/2026/04/27/claude-code-api-token-leak/) that of about 46,500
|
|
59
|
+
npm packages it scanned, 428 shipped `.claude/settings.local.json`, and 33 files in 30
|
|
60
|
+
packages held credentials.
|
|
61
|
+
- **We measured it too.** Our [pilot scan](https://adighatakdas-cloud.github.io/agentprint/census/pilot-2026-11/)
|
|
62
|
+
(5 November 2026, counts only) of the newest 1,976 npm packages and 1,997 PyPI releases found
|
|
63
|
+
agent files in 2.1% of npm packages and 9.2% of PyPI releases. 1 npm and 6 PyPI packages
|
|
64
|
+
shipped files that should never ship. No key-shaped strings turned up inside those agent files.
|
|
65
|
+
- **History files keep what you paste.** Agents save prompts as plain text in your home folder.
|
|
66
|
+
A June 2026 Hermes Agent advisory
|
|
67
|
+
([CVE-2026-53870](https://github.com/advisories/GHSA-99f9-j8r3-p853)) covers such files being
|
|
68
|
+
created readable by every user on the machine.
|
|
69
|
+
|
|
70
|
+
## Quickstart
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
uvx agentprint scan # sweep this machine and folder (keys masked)
|
|
74
|
+
uvx agentprint fix # make the safe fixes; shows the plan and asks first
|
|
75
|
+
uvx agentprint install # arm each agent it finds with the tripwire
|
|
76
|
+
uvx agentprint pack # preflight: what your package would publish
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
[Get started](https://adighatakdas-cloud.github.io/agentprint/get-started/) has the details,
|
|
80
|
+
including running from a clone of this repo.
|
|
81
|
+
|
|
82
|
+
## What it checks
|
|
83
|
+
|
|
84
|
+
<!-- checks:start -->
|
|
85
|
+
| ID | What it finds | Severity |
|
|
86
|
+
|---|---|---|
|
|
87
|
+
| [AP001](https://adighatakdas-cloud.github.io/agentprint/checks/ap001/) | An API key sits in an agent's history, transcript, paste cache, edit backups or chat database. | high |
|
|
88
|
+
| [AP002](https://adighatakdas-cloud.github.io/agentprint/checks/ap002/) | An API key sits in an agent settings or allowlist file, or inside an agent file in a package or push. | critical |
|
|
89
|
+
| [AP003](https://adighatakdas-cloud.github.io/agentprint/checks/ap003/) | An over-broad permission lets the agent run any command or skip every prompt, such as Bash(\*) or bypassPermissions. | medium |
|
|
90
|
+
| [AP004](https://adighatakdas-cloud.github.io/agentprint/checks/ap004/) | An agent hook calls the network, with curl, wget, nc, a pipe into a shell, or a URL. | medium |
|
|
91
|
+
| [AP005](https://adighatakdas-cloud.github.io/agentprint/checks/ap005/) | An API key is written inline in an MCP server entry (env, headers, args, command or URL). | critical |
|
|
92
|
+
| [AP006](https://adighatakdas-cloud.github.io/agentprint/checks/ap006/) | An agent file, such as .claude/settings.local.json, would ship in your npm or PyPI package. | high, medium or low, by file |
|
|
93
|
+
| [AP007](https://adighatakdas-cloud.github.io/agentprint/checks/ap007/) | A personal agent file, such as CLAUDE.local.md, is in a git repo but not gitignored, or is already committed. | low |
|
|
94
|
+
| [AP008](https://adighatakdas-cloud.github.io/agentprint/checks/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 |
|
|
95
|
+
| [AP009](https://adighatakdas-cloud.github.io/agentprint/checks/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 |
|
|
96
|
+
<!-- checks:end -->
|
|
97
|
+
|
|
98
|
+
Keys are found by pattern (Anthropic, OpenAI, GitHub, AWS, Stripe, Slack and Google formats, plus
|
|
99
|
+
a generic "secret-looking name = random-looking value" rule) and are never used or sent anywhere.
|
|
100
|
+
|
|
101
|
+
## Inside your AI agent
|
|
102
|
+
|
|
103
|
+
- A hook runs before the agent publishes a package or runs `git push`, and checks what would go out.
|
|
104
|
+
- An MCP server gives the agent tools to check on its own.
|
|
105
|
+
- If something would leak, the agent gets a brief: the fix steps, plus what to ask you (rotate a key).
|
|
106
|
+
- It only ever blocks (BLOCK or CLEAR); your agent's own approval rules still apply.
|
|
107
|
+
- `agentprint uninstall` takes out exactly what `install` added.
|
|
108
|
+
|
|
109
|
+
Details: [Inside your agent](https://adighatakdas-cloud.github.io/agentprint/inside-your-agent/).
|
|
110
|
+
|
|
111
|
+
## More
|
|
112
|
+
|
|
113
|
+
[Agents](https://adighatakdas-cloud.github.io/agentprint/agents/) ·
|
|
114
|
+
[Use in CI](https://adighatakdas-cloud.github.io/agentprint/ci/) ·
|
|
115
|
+
[Privacy](https://adighatakdas-cloud.github.io/agentprint/privacy/) ·
|
|
116
|
+
[Comparison](https://adighatakdas-cloud.github.io/agentprint/comparison/) ·
|
|
117
|
+
[Census](https://adighatakdas-cloud.github.io/agentprint/census/) ·
|
|
118
|
+
[How it works](https://adighatakdas-cloud.github.io/agentprint/how-it-works/)
|
|
119
|
+
|
|
120
|
+
[Contributing](https://github.com/adighatakdas-cloud/agentprint/blob/main/CONTRIBUTING.md) ·
|
|
121
|
+
[Security](https://github.com/adighatakdas-cloud/agentprint/blob/main/SECURITY.md) ·
|
|
122
|
+
[License (MIT)](https://github.com/adighatakdas-cloud/agentprint/blob/main/LICENSE)
|
|
123
|
+
|
|
124
|
+
Built with Python 3.11+, uv, typer, rich, the MCP Python SDK, pytest and ruff; docs with Astro Starlight.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/adighatakdas-cloud/agentprint/main/docs/brand/logo-dark.svg">
|
|
4
|
+
<img alt="agentprint" src="https://raw.githubusercontent.com/adighatakdas-cloud/agentprint/main/docs/brand/logo-light.svg" width="440">
|
|
5
|
+
</picture>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<h3 align="center">The security check your AI coding agent runs for you.</h3>
|
|
9
|
+
|
|
10
|
+
<p align="center">
|
|
11
|
+
<a href="https://github.com/adighatakdas-cloud/agentprint/actions/workflows/ci.yml"><img alt="tests" src="https://img.shields.io/github/actions/workflow/status/adighatakdas-cloud/agentprint/ci.yml?branch=main&label=tests&style=flat-square&labelColor=050B14&color=FFB020"></a>
|
|
12
|
+
<a href="https://adighatakdas-cloud.github.io/agentprint/coverage.json"><img alt="coverage" src="https://img.shields.io/endpoint?url=https://adighatakdas-cloud.github.io/agentprint/coverage.json&style=flat-square"></a>
|
|
13
|
+
<a href="https://github.com/microsoft/pyright"><img alt="types: pyright" src="https://img.shields.io/badge/types-pyright-FFB020?style=flat-square&labelColor=050B14"></a>
|
|
14
|
+
<a href="https://pypi.org/project/agentprint/"><img alt="PyPI" src="https://img.shields.io/pypi/v/agentprint?style=flat-square&labelColor=050B14&color=FFB020"></a>
|
|
15
|
+
<a href="https://www.npmjs.com/package/agentprint-cli"><img alt="npm" src="https://img.shields.io/npm/v/agentprint-cli?style=flat-square&labelColor=050B14&color=FFB020"></a>
|
|
16
|
+
<a href="https://github.com/adighatakdas-cloud/agentprint/blob/main/LICENSE"><img alt="license: MIT" src="https://img.shields.io/badge/license-MIT-FFB020?style=flat-square&labelColor=050B14"></a>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
uvx agentprint
|
|
21
|
+
npx agentprint-cli
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
<p align="center">
|
|
25
|
+
<img alt="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" src="https://raw.githubusercontent.com/adighatakdas-cloud/agentprint/main/docs/demo.gif">
|
|
26
|
+
</p>
|
|
27
|
+
|
|
28
|
+
<p align="center">
|
|
29
|
+
<sub>Works inside: Claude Code · Codex · Cursor · Gemini CLI · Windsurf · Devin · OpenCode · Copilot · Hermes · Antigravity</sub>
|
|
30
|
+
</p>
|
|
31
|
+
|
|
32
|
+
<p align="center">
|
|
33
|
+
<a href="https://adighatakdas-cloud.github.io/agentprint/">Docs</a> ·
|
|
34
|
+
<a href="https://adighatakdas-cloud.github.io/agentprint/get-started/">Get started</a> ·
|
|
35
|
+
<a href="https://adighatakdas-cloud.github.io/agentprint/checks/">Checks</a> ·
|
|
36
|
+
<a href="https://adighatakdas-cloud.github.io/agentprint/ci/">Use in CI</a>
|
|
37
|
+
</p>
|
|
38
|
+
|
|
39
|
+
## Why
|
|
40
|
+
|
|
41
|
+
- **Agent files leak into packages.** In April 2026 Lakera
|
|
42
|
+
[reported](https://bdtechtalks.com/2026/04/27/claude-code-api-token-leak/) that of about 46,500
|
|
43
|
+
npm packages it scanned, 428 shipped `.claude/settings.local.json`, and 33 files in 30
|
|
44
|
+
packages held credentials.
|
|
45
|
+
- **We measured it too.** Our [pilot scan](https://adighatakdas-cloud.github.io/agentprint/census/pilot-2026-11/)
|
|
46
|
+
(5 November 2026, counts only) of the newest 1,976 npm packages and 1,997 PyPI releases found
|
|
47
|
+
agent files in 2.1% of npm packages and 9.2% of PyPI releases. 1 npm and 6 PyPI packages
|
|
48
|
+
shipped files that should never ship. No key-shaped strings turned up inside those agent files.
|
|
49
|
+
- **History files keep what you paste.** Agents save prompts as plain text in your home folder.
|
|
50
|
+
A June 2026 Hermes Agent advisory
|
|
51
|
+
([CVE-2026-53870](https://github.com/advisories/GHSA-99f9-j8r3-p853)) covers such files being
|
|
52
|
+
created readable by every user on the machine.
|
|
53
|
+
|
|
54
|
+
## Quickstart
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
uvx agentprint scan # sweep this machine and folder (keys masked)
|
|
58
|
+
uvx agentprint fix # make the safe fixes; shows the plan and asks first
|
|
59
|
+
uvx agentprint install # arm each agent it finds with the tripwire
|
|
60
|
+
uvx agentprint pack # preflight: what your package would publish
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
[Get started](https://adighatakdas-cloud.github.io/agentprint/get-started/) has the details,
|
|
64
|
+
including running from a clone of this repo.
|
|
65
|
+
|
|
66
|
+
## What it checks
|
|
67
|
+
|
|
68
|
+
<!-- checks:start -->
|
|
69
|
+
| ID | What it finds | Severity |
|
|
70
|
+
|---|---|---|
|
|
71
|
+
| [AP001](https://adighatakdas-cloud.github.io/agentprint/checks/ap001/) | An API key sits in an agent's history, transcript, paste cache, edit backups or chat database. | high |
|
|
72
|
+
| [AP002](https://adighatakdas-cloud.github.io/agentprint/checks/ap002/) | An API key sits in an agent settings or allowlist file, or inside an agent file in a package or push. | critical |
|
|
73
|
+
| [AP003](https://adighatakdas-cloud.github.io/agentprint/checks/ap003/) | An over-broad permission lets the agent run any command or skip every prompt, such as Bash(\*) or bypassPermissions. | medium |
|
|
74
|
+
| [AP004](https://adighatakdas-cloud.github.io/agentprint/checks/ap004/) | An agent hook calls the network, with curl, wget, nc, a pipe into a shell, or a URL. | medium |
|
|
75
|
+
| [AP005](https://adighatakdas-cloud.github.io/agentprint/checks/ap005/) | An API key is written inline in an MCP server entry (env, headers, args, command or URL). | critical |
|
|
76
|
+
| [AP006](https://adighatakdas-cloud.github.io/agentprint/checks/ap006/) | An agent file, such as .claude/settings.local.json, would ship in your npm or PyPI package. | high, medium or low, by file |
|
|
77
|
+
| [AP007](https://adighatakdas-cloud.github.io/agentprint/checks/ap007/) | A personal agent file, such as CLAUDE.local.md, is in a git repo but not gitignored, or is already committed. | low |
|
|
78
|
+
| [AP008](https://adighatakdas-cloud.github.io/agentprint/checks/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 |
|
|
79
|
+
| [AP009](https://adighatakdas-cloud.github.io/agentprint/checks/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 |
|
|
80
|
+
<!-- checks:end -->
|
|
81
|
+
|
|
82
|
+
Keys are found by pattern (Anthropic, OpenAI, GitHub, AWS, Stripe, Slack and Google formats, plus
|
|
83
|
+
a generic "secret-looking name = random-looking value" rule) and are never used or sent anywhere.
|
|
84
|
+
|
|
85
|
+
## Inside your AI agent
|
|
86
|
+
|
|
87
|
+
- A hook runs before the agent publishes a package or runs `git push`, and checks what would go out.
|
|
88
|
+
- An MCP server gives the agent tools to check on its own.
|
|
89
|
+
- If something would leak, the agent gets a brief: the fix steps, plus what to ask you (rotate a key).
|
|
90
|
+
- It only ever blocks (BLOCK or CLEAR); your agent's own approval rules still apply.
|
|
91
|
+
- `agentprint uninstall` takes out exactly what `install` added.
|
|
92
|
+
|
|
93
|
+
Details: [Inside your agent](https://adighatakdas-cloud.github.io/agentprint/inside-your-agent/).
|
|
94
|
+
|
|
95
|
+
## More
|
|
96
|
+
|
|
97
|
+
[Agents](https://adighatakdas-cloud.github.io/agentprint/agents/) ·
|
|
98
|
+
[Use in CI](https://adighatakdas-cloud.github.io/agentprint/ci/) ·
|
|
99
|
+
[Privacy](https://adighatakdas-cloud.github.io/agentprint/privacy/) ·
|
|
100
|
+
[Comparison](https://adighatakdas-cloud.github.io/agentprint/comparison/) ·
|
|
101
|
+
[Census](https://adighatakdas-cloud.github.io/agentprint/census/) ·
|
|
102
|
+
[How it works](https://adighatakdas-cloud.github.io/agentprint/how-it-works/)
|
|
103
|
+
|
|
104
|
+
[Contributing](https://github.com/adighatakdas-cloud/agentprint/blob/main/CONTRIBUTING.md) ·
|
|
105
|
+
[Security](https://github.com/adighatakdas-cloud/agentprint/blob/main/SECURITY.md) ·
|
|
106
|
+
[License (MIT)](https://github.com/adighatakdas-cloud/agentprint/blob/main/LICENSE)
|
|
107
|
+
|
|
108
|
+
Built with Python 3.11+, uv, typer, rich, the MCP Python SDK, pytest and ruff; docs with Astro Starlight.
|