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.
Files changed (186) hide show
  1. agentprint-0.1.0/.gitignore +37 -0
  2. agentprint-0.1.0/LICENSE +21 -0
  3. agentprint-0.1.0/PKG-INFO +124 -0
  4. agentprint-0.1.0/README.md +108 -0
  5. agentprint-0.1.0/agentprint/__init__.py +3 -0
  6. agentprint-0.1.0/agentprint/advice.py +408 -0
  7. agentprint-0.1.0/agentprint/agents/__init__.py +31 -0
  8. agentprint-0.1.0/agentprint/agents/antigravity.py +162 -0
  9. agentprint-0.1.0/agentprint/agents/base.py +225 -0
  10. agentprint-0.1.0/agentprint/agents/claude_code.py +147 -0
  11. agentprint-0.1.0/agentprint/agents/codex.py +126 -0
  12. agentprint-0.1.0/agentprint/agents/copilot.py +233 -0
  13. agentprint-0.1.0/agentprint/agents/cursor.py +171 -0
  14. agentprint-0.1.0/agentprint/agents/gemini.py +131 -0
  15. agentprint-0.1.0/agentprint/agents/hermes.py +144 -0
  16. agentprint-0.1.0/agentprint/agents/opencode.py +114 -0
  17. agentprint-0.1.0/agentprint/agents/scan_only.py +246 -0
  18. agentprint-0.1.0/agentprint/agents/windsurf.py +106 -0
  19. agentprint-0.1.0/agentprint/badge.py +53 -0
  20. agentprint-0.1.0/agentprint/checks/__init__.py +28 -0
  21. agentprint-0.1.0/agentprint/checks/ap001_history_secret.py +12 -0
  22. agentprint-0.1.0/agentprint/checks/ap002_settings_secret.py +13 -0
  23. agentprint-0.1.0/agentprint/checks/ap003_overbroad_permission.py +62 -0
  24. agentprint-0.1.0/agentprint/checks/ap004_network_hook.py +93 -0
  25. agentprint-0.1.0/agentprint/checks/ap005_mcp_inline_secret.py +80 -0
  26. agentprint-0.1.0/agentprint/checks/ap006_package_leak.py +60 -0
  27. agentprint-0.1.0/agentprint/checks/ap007_local_not_ignored.py +115 -0
  28. agentprint-0.1.0/agentprint/checks/ap008_readable_by_others.py +223 -0
  29. agentprint-0.1.0/agentprint/checks/ap009_source_exposure.py +505 -0
  30. agentprint-0.1.0/agentprint/checks/base.py +89 -0
  31. agentprint-0.1.0/agentprint/cli.py +828 -0
  32. agentprint-0.1.0/agentprint/commands.py +467 -0
  33. agentprint-0.1.0/agentprint/files.py +56 -0
  34. agentprint-0.1.0/agentprint/fix.py +1381 -0
  35. agentprint-0.1.0/agentprint/fixreport.py +257 -0
  36. agentprint-0.1.0/agentprint/gitcheck.py +129 -0
  37. agentprint-0.1.0/agentprint/guard.py +209 -0
  38. agentprint-0.1.0/agentprint/hook.py +47 -0
  39. agentprint-0.1.0/agentprint/install.py +635 -0
  40. agentprint-0.1.0/agentprint/integrations/__init__.py +29 -0
  41. agentprint-0.1.0/agentprint/integrations/antigravity.py +141 -0
  42. agentprint-0.1.0/agentprint/integrations/base.py +483 -0
  43. agentprint-0.1.0/agentprint/integrations/claude_code.py +115 -0
  44. agentprint-0.1.0/agentprint/integrations/codex.py +142 -0
  45. agentprint-0.1.0/agentprint/integrations/copilot.py +132 -0
  46. agentprint-0.1.0/agentprint/integrations/cursor.py +150 -0
  47. agentprint-0.1.0/agentprint/integrations/gemini.py +125 -0
  48. agentprint-0.1.0/agentprint/integrations/hermes.py +176 -0
  49. agentprint-0.1.0/agentprint/integrations/opencode.py +162 -0
  50. agentprint-0.1.0/agentprint/integrations/windsurf.py +196 -0
  51. agentprint-0.1.0/agentprint/mcp_server.py +86 -0
  52. agentprint-0.1.0/agentprint/models.py +108 -0
  53. agentprint-0.1.0/agentprint/pack.py +288 -0
  54. agentprint-0.1.0/agentprint/report.py +134 -0
  55. agentprint-0.1.0/agentprint/roster.py +59 -0
  56. agentprint-0.1.0/agentprint/safewrite.py +44 -0
  57. agentprint-0.1.0/agentprint/sanitize.py +63 -0
  58. agentprint-0.1.0/agentprint/sarif.py +215 -0
  59. agentprint-0.1.0/agentprint/scanner.py +40 -0
  60. agentprint-0.1.0/agentprint/secrets.py +104 -0
  61. agentprint-0.1.0/agentprint/sqlite_text.py +81 -0
  62. agentprint-0.1.0/agentprint/structured.py +150 -0
  63. agentprint-0.1.0/agentprint/ui/__init__.py +0 -0
  64. agentprint-0.1.0/agentprint/ui/detect.py +96 -0
  65. agentprint-0.1.0/agentprint/ui/fixview.py +239 -0
  66. agentprint-0.1.0/agentprint/ui/layout.py +95 -0
  67. agentprint-0.1.0/agentprint/ui/mascot.py +63 -0
  68. agentprint-0.1.0/agentprint/ui/menu.py +361 -0
  69. agentprint-0.1.0/agentprint/ui/results.py +102 -0
  70. agentprint-0.1.0/agentprint/ui/sweep.py +59 -0
  71. agentprint-0.1.0/agentprint/ui/theme.py +73 -0
  72. agentprint-0.1.0/agentprint/ui/welcome.py +117 -0
  73. agentprint-0.1.0/pyproject.toml +71 -0
  74. agentprint-0.1.0/tests/__init__.py +0 -0
  75. agentprint-0.1.0/tests/action_fixtures.py +46 -0
  76. agentprint-0.1.0/tests/conftest.py +326 -0
  77. agentprint-0.1.0/tests/data/sarif-schema-2.1.0.NOTICE.txt +34 -0
  78. agentprint-0.1.0/tests/data/sarif-schema-2.1.0.json +3389 -0
  79. agentprint-0.1.0/tests/data/snapshots/fix.agent.txt +13 -0
  80. agentprint-0.1.0/tests/data/snapshots/pack.agent.txt +11 -0
  81. agentprint-0.1.0/tests/data/snapshots/pack.json +28 -0
  82. agentprint-0.1.0/tests/data/snapshots/scan.agent.txt +59 -0
  83. agentprint-0.1.0/tests/data/snapshots/scan.json +148 -0
  84. agentprint-0.1.0/tests/data/snapshots/scan.sarif +291 -0
  85. agentprint-0.1.0/tests/fakes.py +27 -0
  86. agentprint-0.1.0/tests/live/__init__.py +0 -0
  87. agentprint-0.1.0/tests/live/harness.py +177 -0
  88. agentprint-0.1.0/tests/live/install_clis.py +70 -0
  89. agentprint-0.1.0/tests/live/mock_model.py +382 -0
  90. agentprint-0.1.0/tests/live/runner.py +254 -0
  91. agentprint-0.1.0/tests/live/test_live_claude_code.py +81 -0
  92. agentprint-0.1.0/tests/live/test_live_codex.py +97 -0
  93. agentprint-0.1.0/tests/live/test_live_copilot.py +87 -0
  94. agentprint-0.1.0/tests/live/test_live_gemini.py +93 -0
  95. agentprint-0.1.0/tests/live/test_live_hermes.py +100 -0
  96. agentprint-0.1.0/tests/live/test_live_opencode.py +104 -0
  97. agentprint-0.1.0/tests/live/test_mock_model.py +158 -0
  98. agentprint-0.1.0/tests/live/test_runner_checks.py +101 -0
  99. agentprint-0.1.0/tests/test_action.py +350 -0
  100. agentprint-0.1.0/tests/test_advice.py +225 -0
  101. agentprint-0.1.0/tests/test_agent_antigravity.py +111 -0
  102. agentprint-0.1.0/tests/test_agent_config.py +200 -0
  103. agentprint-0.1.0/tests/test_agent_copilot.py +120 -0
  104. agentprint-0.1.0/tests/test_agent_cursor.py +79 -0
  105. agentprint-0.1.0/tests/test_agent_gemini.py +73 -0
  106. agentprint-0.1.0/tests/test_agent_hermes.py +73 -0
  107. agentprint-0.1.0/tests/test_agent_opencode.py +80 -0
  108. agentprint-0.1.0/tests/test_agent_windsurf.py +54 -0
  109. agentprint-0.1.0/tests/test_agents.py +60 -0
  110. agentprint-0.1.0/tests/test_agents_scan_only.py +114 -0
  111. agentprint-0.1.0/tests/test_ap005_review.py +47 -0
  112. agentprint-0.1.0/tests/test_ap009.py +1090 -0
  113. agentprint-0.1.0/tests/test_badge.py +134 -0
  114. agentprint-0.1.0/tests/test_badge_workflow.py +193 -0
  115. agentprint-0.1.0/tests/test_brand.py +182 -0
  116. agentprint-0.1.0/tests/test_check_ap003.py +66 -0
  117. agentprint-0.1.0/tests/test_check_ap004.py +95 -0
  118. agentprint-0.1.0/tests/test_check_ap005.py +64 -0
  119. agentprint-0.1.0/tests/test_check_ap007.py +106 -0
  120. agentprint-0.1.0/tests/test_check_ap008.py +253 -0
  121. agentprint-0.1.0/tests/test_checks.py +52 -0
  122. agentprint-0.1.0/tests/test_cli.py +131 -0
  123. agentprint-0.1.0/tests/test_cli_bare.py +578 -0
  124. agentprint-0.1.0/tests/test_cli_fix.py +576 -0
  125. agentprint-0.1.0/tests/test_cli_format_auto.py +224 -0
  126. agentprint-0.1.0/tests/test_cli_status.py +94 -0
  127. agentprint-0.1.0/tests/test_commands.py +106 -0
  128. agentprint-0.1.0/tests/test_commands_review.py +135 -0
  129. agentprint-0.1.0/tests/test_demo.py +220 -0
  130. agentprint-0.1.0/tests/test_docs_pages.py +193 -0
  131. agentprint-0.1.0/tests/test_e2e_hostile_names.py +112 -0
  132. agentprint-0.1.0/tests/test_ecoscan_budget.py +125 -0
  133. agentprint-0.1.0/tests/test_ecoscan_detect.py +84 -0
  134. agentprint-0.1.0/tests/test_ecoscan_merge.py +94 -0
  135. agentprint-0.1.0/tests/test_ecoscan_net.py +225 -0
  136. agentprint-0.1.0/tests/test_ecoscan_registries.py +322 -0
  137. agentprint-0.1.0/tests/test_ecoscan_run.py +162 -0
  138. agentprint-0.1.0/tests/test_ecoscan_shard.py +138 -0
  139. agentprint-0.1.0/tests/test_ecoscan_summary.py +169 -0
  140. agentprint-0.1.0/tests/test_files.py +78 -0
  141. agentprint-0.1.0/tests/test_fix_changes.py +400 -0
  142. agentprint-0.1.0/tests/test_fix_mask.py +397 -0
  143. agentprint-0.1.0/tests/test_fix_pack.py +208 -0
  144. agentprint-0.1.0/tests/test_fix_steps_review.py +56 -0
  145. agentprint-0.1.0/tests/test_fix_text_review.py +61 -0
  146. agentprint-0.1.0/tests/test_gen_docs.py +262 -0
  147. agentprint-0.1.0/tests/test_gitcheck.py +89 -0
  148. agentprint-0.1.0/tests/test_gitcheck_review.py +39 -0
  149. agentprint-0.1.0/tests/test_guard.py +96 -0
  150. agentprint-0.1.0/tests/test_guard_review.py +157 -0
  151. agentprint-0.1.0/tests/test_home_artifacts.py +18 -0
  152. agentprint-0.1.0/tests/test_hooks.py +287 -0
  153. agentprint-0.1.0/tests/test_install.py +254 -0
  154. agentprint-0.1.0/tests/test_install_new_agents.py +220 -0
  155. agentprint-0.1.0/tests/test_install_regressions.py +398 -0
  156. agentprint-0.1.0/tests/test_install_robust_review.py +212 -0
  157. agentprint-0.1.0/tests/test_landing.py +156 -0
  158. agentprint-0.1.0/tests/test_launcher.py +102 -0
  159. agentprint-0.1.0/tests/test_launcher_missing.py +120 -0
  160. agentprint-0.1.0/tests/test_mcp.py +107 -0
  161. agentprint-0.1.0/tests/test_npm_package.py +65 -0
  162. agentprint-0.1.0/tests/test_output_snapshots.py +65 -0
  163. agentprint-0.1.0/tests/test_own_package.py +26 -0
  164. agentprint-0.1.0/tests/test_pack.py +242 -0
  165. agentprint-0.1.0/tests/test_precommit_hooks.py +35 -0
  166. agentprint-0.1.0/tests/test_prepublic_audit.py +190 -0
  167. agentprint-0.1.0/tests/test_quality_workflows.py +188 -0
  168. agentprint-0.1.0/tests/test_readme.py +70 -0
  169. agentprint-0.1.0/tests/test_release_workflow.py +69 -0
  170. agentprint-0.1.0/tests/test_report.py +99 -0
  171. agentprint-0.1.0/tests/test_roster.py +53 -0
  172. agentprint-0.1.0/tests/test_sanitize.py +33 -0
  173. agentprint-0.1.0/tests/test_sarif.py +260 -0
  174. agentprint-0.1.0/tests/test_secrets.py +83 -0
  175. agentprint-0.1.0/tests/test_site_config.py +148 -0
  176. agentprint-0.1.0/tests/test_sqlite_text.py +76 -0
  177. agentprint-0.1.0/tests/test_structured.py +103 -0
  178. agentprint-0.1.0/tests/test_ui_detect.py +80 -0
  179. agentprint-0.1.0/tests/test_ui_fixview.py +145 -0
  180. agentprint-0.1.0/tests/test_ui_layout.py +67 -0
  181. agentprint-0.1.0/tests/test_ui_mascot.py +33 -0
  182. agentprint-0.1.0/tests/test_ui_menu.py +398 -0
  183. agentprint-0.1.0/tests/test_ui_results.py +267 -0
  184. agentprint-0.1.0/tests/test_ui_styles.py +188 -0
  185. agentprint-0.1.0/tests/test_ui_theme.py +67 -0
  186. 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
@@ -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.
@@ -0,0 +1,3 @@
1
+ """agentprint: audit what AI coding agents leave behind."""
2
+
3
+ __version__ = "0.1.0"