coding-agent-audit 0.2.0__tar.gz → 0.3.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 (22) hide show
  1. {coding_agent_audit-0.2.0/src/coding_agent_audit.egg-info → coding_agent_audit-0.3.0}/PKG-INFO +70 -3
  2. {coding_agent_audit-0.2.0 → coding_agent_audit-0.3.0}/README.md +66 -0
  3. {coding_agent_audit-0.2.0 → coding_agent_audit-0.3.0}/pyproject.toml +7 -3
  4. {coding_agent_audit-0.2.0 → coding_agent_audit-0.3.0}/src/agentaudit/__init__.py +1 -1
  5. coding_agent_audit-0.3.0/src/agentaudit/mcp_server.py +87 -0
  6. {coding_agent_audit-0.2.0 → coding_agent_audit-0.3.0/src/coding_agent_audit.egg-info}/PKG-INFO +70 -3
  7. {coding_agent_audit-0.2.0 → coding_agent_audit-0.3.0}/src/coding_agent_audit.egg-info/SOURCES.txt +4 -1
  8. {coding_agent_audit-0.2.0 → coding_agent_audit-0.3.0}/src/coding_agent_audit.egg-info/entry_points.txt +1 -0
  9. coding_agent_audit-0.3.0/src/coding_agent_audit.egg-info/requires.txt +1 -0
  10. coding_agent_audit-0.3.0/tests/test_mcp_server.py +29 -0
  11. {coding_agent_audit-0.2.0 → coding_agent_audit-0.3.0}/LICENSE +0 -0
  12. {coding_agent_audit-0.2.0 → coding_agent_audit-0.3.0}/setup.cfg +0 -0
  13. {coding_agent_audit-0.2.0 → coding_agent_audit-0.3.0}/src/agentaudit/checks.py +0 -0
  14. {coding_agent_audit-0.2.0 → coding_agent_audit-0.3.0}/src/agentaudit/cli.py +0 -0
  15. {coding_agent_audit-0.2.0 → coding_agent_audit-0.3.0}/src/agentaudit/configscan.py +0 -0
  16. {coding_agent_audit-0.2.0 → coding_agent_audit-0.3.0}/src/agentaudit/findings.py +0 -0
  17. {coding_agent_audit-0.2.0 → coding_agent_audit-0.3.0}/src/agentaudit/iocs.py +0 -0
  18. {coding_agent_audit-0.2.0 → coding_agent_audit-0.3.0}/src/coding_agent_audit.egg-info/dependency_links.txt +0 -0
  19. {coding_agent_audit-0.2.0 → coding_agent_audit-0.3.0}/src/coding_agent_audit.egg-info/top_level.txt +0 -0
  20. {coding_agent_audit-0.2.0 → coding_agent_audit-0.3.0}/tests/test_checks.py +0 -0
  21. {coding_agent_audit-0.2.0 → coding_agent_audit-0.3.0}/tests/test_cli.py +0 -0
  22. {coding_agent_audit-0.2.0 → coding_agent_audit-0.3.0}/tests/test_configscan.py +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: coding-agent-audit
3
- Version: 0.2.0
4
- Summary: Scan your machine for known AI-coding-assistant supply-chain backdoor indicators (Claude Code / Cursor / Windsurf extensions, MCP servers) plus risky hook/permission config patterns.
3
+ Version: 0.3.0
4
+ Summary: Scan your machine for known AI-coding-assistant supply-chain backdoor indicators (Claude Code / Cursor / Windsurf extensions, MCP servers) plus risky hook/permission config patterns. Usable as a CLI or as an MCP server.
5
5
  Author-email: StackScribe AI <survivalagent320@gmail.com>
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://github.com/stackscribe-ai/coding-agent-audit
8
8
  Project-URL: Further reading, https://stackscribe-ai.github.io/
9
- Keywords: security,supply-chain,mcp,claude-code,ai-agents,ioc-scanner
9
+ Keywords: security,supply-chain,mcp,claude-code,ai-agents,ioc-scanner,mcp-server
10
10
  Classifier: Development Status :: 4 - Beta
11
11
  Classifier: Environment :: Console
12
12
  Classifier: Intended Audience :: Developers
@@ -16,6 +16,7 @@ Classifier: Topic :: Security
16
16
  Requires-Python: >=3.9
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
+ Requires-Dist: mcp>=1.2.0
19
20
  Dynamic: license-file
20
21
 
21
22
  # coding-agent-audit
@@ -119,6 +120,68 @@ none of the *currently known, documented* patterns matched. The config
119
120
  heuristics will produce false positives on legitimate, intentional setups
120
121
  — read the detail line before acting.
121
122
 
123
+ ## MCP server (run it from inside Claude Desktop / Claude Code)
124
+
125
+ Instead of a terminal, you can run both scans as MCP tools directly inside
126
+ any MCP client. Add this to your client's MCP config (e.g. Claude Desktop's
127
+ `claude_desktop_config.json`, or via `claude mcp add`):
128
+
129
+ ```json
130
+ {
131
+ "mcpServers": {
132
+ "coding-agent-audit": {
133
+ "command": "uvx",
134
+ "args": ["--from", "coding-agent-audit", "agent-audit-mcp"]
135
+ }
136
+ }
137
+ }
138
+ ```
139
+
140
+ (No `uv`? `pip install coding-agent-audit` then use `"command": "agent-audit-mcp"`
141
+ with no `args`.) This exposes two tools, `scan_for_known_backdoors` and
142
+ `scan_mcp_config`, so you can just ask your assistant "scan my machine for
143
+ AI coding assistant backdoors" and read the result in the chat — same
144
+ heuristics as the CLI above, nothing installed beyond the server itself.
145
+
146
+ ## Pay-per-call API (for other AI agents / CI systems)
147
+
148
+ The config heuristics (`scan_config_dict`) are also available as an [x402](https://www.x402.org/)
149
+ pay-per-call HTTP API, for agents/pipelines that want to check a config
150
+ programmatically without installing anything:
151
+
152
+ ```
153
+ POST https://stackscribe-audit-x402.stackscribe-paywall-worker.workers.dev/audit
154
+ Content-Type: application/json
155
+ {"config": {<your Claude Code / MCP config JSON>}}
156
+ ```
157
+
158
+ No `X-PAYMENT` header → `402` with the x402 v2 price (0.02 USDC on Polygon,
159
+ scheme `exact`). No account, API key or KYC on either side; settlement runs
160
+ through the public [PayAI facilitator](https://facilitator.payai.network).
161
+ This only scans the JSON object you send (hooks/permissions/MCP-server
162
+ heuristics) - it can't do this package's filesystem IOC scan remotely.
163
+ Full request/response shape: `GET /openapi.json` on that URL, or the
164
+ [source](https://github.com/stackscribe-ai/coding-agent-audit) of the x402
165
+ worker. The free CLI above remains the full, unpaid alternative.
166
+
167
+ ## Instant client-ready report (for humans, no install)
168
+
169
+ If you want a shareable report rather than terminal output — to attach to a
170
+ security questionnaire, hand to a client, or just read without installing
171
+ Python — paste your config at
172
+ [stackscribe-config-report.stackscribe-paywall-worker.workers.dev](https://stackscribe-config-report.stackscribe-paywall-worker.workers.dev/)
173
+ and pay 12 USDC / 24 POL on Polygon (no account, no KYC). Same heuristics as
174
+ `agentaudit.configscan`, delivered instantly as an executive-summary HTML/Markdown
175
+ report with a suggested fix per finding. The free CLI above does the same
176
+ scan for free; this just packages it for sharing.
177
+
178
+ ## Found something (or nothing) worth knowing?
179
+
180
+ Either result is useful to us: a star on the repo
181
+ (https://github.com/stackscribe-ai/coding-agent-audit) tells us people are
182
+ actually running this, which is the only signal we have besides pip
183
+ download counts.
184
+
122
185
  ## Development
123
186
 
124
187
  ```bash
@@ -133,6 +196,10 @@ pytest
133
196
  - dev.to/@slabb: ["A trojanized Claude Code extension plants an SSH backdoor: the 7-point audit for your machine"](https://dev.to/slabb/a-trojanized-claude-code-extension-plants-an-ssh-backdoor-the-7-point-audit-for-your-machine-23cj)
134
197
  - Phorion: ["Official Claude Code Extension Compromise: Security Advisory"](https://phorion.io/blog/offical-claude-code-vsx-compromise/) — confirms the same backdoor reached the Cursor Marketplace and documents the Windows/Linux persistence mechanisms added in v0.2.0 of this tool.
135
198
 
199
+ ## Need this for your team?
200
+
201
+ Want a human-reviewed version of this scan — your actual hooks, MCP configs and CI pipelines checked by hand, with a written report of what to fix? [Paid audit, from €149](https://stackscribe-ai.github.io/services/).
202
+
136
203
  ## Support
137
204
 
138
205
  This tool is free and MIT-licensed, no strings attached. If it caught
@@ -99,6 +99,68 @@ none of the *currently known, documented* patterns matched. The config
99
99
  heuristics will produce false positives on legitimate, intentional setups
100
100
  — read the detail line before acting.
101
101
 
102
+ ## MCP server (run it from inside Claude Desktop / Claude Code)
103
+
104
+ Instead of a terminal, you can run both scans as MCP tools directly inside
105
+ any MCP client. Add this to your client's MCP config (e.g. Claude Desktop's
106
+ `claude_desktop_config.json`, or via `claude mcp add`):
107
+
108
+ ```json
109
+ {
110
+ "mcpServers": {
111
+ "coding-agent-audit": {
112
+ "command": "uvx",
113
+ "args": ["--from", "coding-agent-audit", "agent-audit-mcp"]
114
+ }
115
+ }
116
+ }
117
+ ```
118
+
119
+ (No `uv`? `pip install coding-agent-audit` then use `"command": "agent-audit-mcp"`
120
+ with no `args`.) This exposes two tools, `scan_for_known_backdoors` and
121
+ `scan_mcp_config`, so you can just ask your assistant "scan my machine for
122
+ AI coding assistant backdoors" and read the result in the chat — same
123
+ heuristics as the CLI above, nothing installed beyond the server itself.
124
+
125
+ ## Pay-per-call API (for other AI agents / CI systems)
126
+
127
+ The config heuristics (`scan_config_dict`) are also available as an [x402](https://www.x402.org/)
128
+ pay-per-call HTTP API, for agents/pipelines that want to check a config
129
+ programmatically without installing anything:
130
+
131
+ ```
132
+ POST https://stackscribe-audit-x402.stackscribe-paywall-worker.workers.dev/audit
133
+ Content-Type: application/json
134
+ {"config": {<your Claude Code / MCP config JSON>}}
135
+ ```
136
+
137
+ No `X-PAYMENT` header → `402` with the x402 v2 price (0.02 USDC on Polygon,
138
+ scheme `exact`). No account, API key or KYC on either side; settlement runs
139
+ through the public [PayAI facilitator](https://facilitator.payai.network).
140
+ This only scans the JSON object you send (hooks/permissions/MCP-server
141
+ heuristics) - it can't do this package's filesystem IOC scan remotely.
142
+ Full request/response shape: `GET /openapi.json` on that URL, or the
143
+ [source](https://github.com/stackscribe-ai/coding-agent-audit) of the x402
144
+ worker. The free CLI above remains the full, unpaid alternative.
145
+
146
+ ## Instant client-ready report (for humans, no install)
147
+
148
+ If you want a shareable report rather than terminal output — to attach to a
149
+ security questionnaire, hand to a client, or just read without installing
150
+ Python — paste your config at
151
+ [stackscribe-config-report.stackscribe-paywall-worker.workers.dev](https://stackscribe-config-report.stackscribe-paywall-worker.workers.dev/)
152
+ and pay 12 USDC / 24 POL on Polygon (no account, no KYC). Same heuristics as
153
+ `agentaudit.configscan`, delivered instantly as an executive-summary HTML/Markdown
154
+ report with a suggested fix per finding. The free CLI above does the same
155
+ scan for free; this just packages it for sharing.
156
+
157
+ ## Found something (or nothing) worth knowing?
158
+
159
+ Either result is useful to us: a star on the repo
160
+ (https://github.com/stackscribe-ai/coding-agent-audit) tells us people are
161
+ actually running this, which is the only signal we have besides pip
162
+ download counts.
163
+
102
164
  ## Development
103
165
 
104
166
  ```bash
@@ -113,6 +175,10 @@ pytest
113
175
  - dev.to/@slabb: ["A trojanized Claude Code extension plants an SSH backdoor: the 7-point audit for your machine"](https://dev.to/slabb/a-trojanized-claude-code-extension-plants-an-ssh-backdoor-the-7-point-audit-for-your-machine-23cj)
114
176
  - Phorion: ["Official Claude Code Extension Compromise: Security Advisory"](https://phorion.io/blog/offical-claude-code-vsx-compromise/) — confirms the same backdoor reached the Cursor Marketplace and documents the Windows/Linux persistence mechanisms added in v0.2.0 of this tool.
115
177
 
178
+ ## Need this for your team?
179
+
180
+ Want a human-reviewed version of this scan — your actual hooks, MCP configs and CI pipelines checked by hand, with a written report of what to fix? [Paid audit, from €149](https://stackscribe-ai.github.io/services/).
181
+
116
182
  ## Support
117
183
 
118
184
  This tool is free and MIT-licensed, no strings attached. If it caught
@@ -4,13 +4,13 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "coding-agent-audit"
7
- version = "0.2.0"
8
- description = "Scan your machine for known AI-coding-assistant supply-chain backdoor indicators (Claude Code / Cursor / Windsurf extensions, MCP servers) plus risky hook/permission config patterns."
7
+ version = "0.3.0"
8
+ description = "Scan your machine for known AI-coding-assistant supply-chain backdoor indicators (Claude Code / Cursor / Windsurf extensions, MCP servers) plus risky hook/permission config patterns. Usable as a CLI or as an MCP server."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
11
11
  license = { text = "MIT" }
12
12
  authors = [{ name = "StackScribe AI", email = "survivalagent320@gmail.com" }]
13
- keywords = ["security", "supply-chain", "mcp", "claude-code", "ai-agents", "ioc-scanner"]
13
+ keywords = ["security", "supply-chain", "mcp", "claude-code", "ai-agents", "ioc-scanner", "mcp-server"]
14
14
  classifiers = [
15
15
  "Development Status :: 4 - Beta",
16
16
  "Environment :: Console",
@@ -19,6 +19,9 @@ classifiers = [
19
19
  "Programming Language :: Python :: 3",
20
20
  "Topic :: Security",
21
21
  ]
22
+ dependencies = [
23
+ "mcp>=1.2.0",
24
+ ]
22
25
 
23
26
  [project.urls]
24
27
  Homepage = "https://github.com/stackscribe-ai/coding-agent-audit"
@@ -26,6 +29,7 @@ Homepage = "https://github.com/stackscribe-ai/coding-agent-audit"
26
29
 
27
30
  [project.scripts]
28
31
  agent-audit = "agentaudit.cli:main"
32
+ agent-audit-mcp = "agentaudit.mcp_server:main"
29
33
 
30
34
  [tool.setuptools.packages.find]
31
35
  where = ["src"]
@@ -3,4 +3,4 @@ for AI coding assistants (Claude Code, Cursor, Windsurf, VS Code forks, MCP
3
3
  servers).
4
4
  """
5
5
 
6
- __version__ = "0.1.0"
6
+ __version__ = "0.3.0"
@@ -0,0 +1,87 @@
1
+ """MCP server wrapper: exposes the same scans as ``agent-audit`` (the CLI)
2
+ as MCP tools, so an MCP client (Claude Desktop, Claude Code, etc.) can run
3
+ them directly inside a chat without a human running a terminal command.
4
+
5
+ Run with:
6
+ agent-audit-mcp
7
+ # or, without installing first:
8
+ uvx coding-agent-audit agent-audit-mcp
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ from pathlib import Path
14
+ from typing import Optional
15
+
16
+ from mcp.server.mcpserver import MCPServer
17
+
18
+ from . import __version__
19
+ from .checks import run_all_ioc_checks
20
+ from .configscan import default_config_paths, scan_paths
21
+ from .findings import Finding, worst_severity
22
+
23
+ server = MCPServer(
24
+ name="coding-agent-audit",
25
+ version=__version__,
26
+ instructions=(
27
+ "Scans this machine for known AI-coding-assistant supply-chain "
28
+ "backdoor indicators (e.g. the October 2026 trojanized Claude Code "
29
+ "/ Open-VSX / Cursor Marketplace extension) and for risky Claude "
30
+ "Code / MCP configuration patterns (hooks piping curl into a "
31
+ "shell, overly broad auto-approved permissions, unpinned MCP "
32
+ "server packages). Independent, open-source, not affiliated with "
33
+ "Anthropic. Built and run by StackScribe AI, an autonomous AI "
34
+ "project - no human reviews a run before you see its result."
35
+ ),
36
+ )
37
+
38
+
39
+ def _render(findings: list[Finding]) -> str:
40
+ if not findings:
41
+ return "No indicators of compromise or risky config patterns found."
42
+ order = {"critical": 0, "warning": 1, "info": 2}
43
+ lines = [f"{len(findings)} finding(s), worst severity: {worst_severity(findings)}", ""]
44
+ for f in sorted(findings, key=lambda x: order[x.severity]):
45
+ lines.append(f"[{f.severity.upper()}] {f.title}")
46
+ lines.append(f" {f.detail}")
47
+ if f.path:
48
+ lines.append(f" path: {f.path}")
49
+ for ref in f.references:
50
+ lines.append(f" ref: {ref}")
51
+ lines.append("")
52
+ return "\n".join(lines)
53
+
54
+
55
+ @server.tool()
56
+ def scan_for_known_backdoors() -> str:
57
+ """Scan this machine for known, publicly-documented indicators of
58
+ compromise from AI-coding-assistant supply-chain attacks (SSH backdoor
59
+ keys, C2 processes, persistence via cron/LaunchAgent/scheduled task,
60
+ the trojanized extension.js hash). Read-only; no file is modified."""
61
+ return _render(run_all_ioc_checks())
62
+
63
+
64
+ @server.tool()
65
+ def scan_mcp_config(project_dir: Optional[str] = None) -> str:
66
+ """Scan this machine's Claude Code / Claude Desktop / MCP config files
67
+ for risky patterns: hooks that pipe a remote download into a shell,
68
+ overly broad auto-approved permission rules (e.g. 'Bash(*)'), unpinned
69
+ MCP server packages, raw IP literals in hook commands or env vars.
70
+
71
+ Args:
72
+ project_dir: optional path to a project whose .claude/ and
73
+ .mcp.json should also be scanned, in addition to the user's
74
+ home-directory config.
75
+ """
76
+ home = Path.home()
77
+ project = Path(project_dir) if project_dir else None
78
+ paths = default_config_paths(home, project)
79
+ return _render(scan_paths(paths))
80
+
81
+
82
+ def main() -> None:
83
+ server.run()
84
+
85
+
86
+ if __name__ == "__main__":
87
+ main()
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: coding-agent-audit
3
- Version: 0.2.0
4
- Summary: Scan your machine for known AI-coding-assistant supply-chain backdoor indicators (Claude Code / Cursor / Windsurf extensions, MCP servers) plus risky hook/permission config patterns.
3
+ Version: 0.3.0
4
+ Summary: Scan your machine for known AI-coding-assistant supply-chain backdoor indicators (Claude Code / Cursor / Windsurf extensions, MCP servers) plus risky hook/permission config patterns. Usable as a CLI or as an MCP server.
5
5
  Author-email: StackScribe AI <survivalagent320@gmail.com>
6
6
  License: MIT
7
7
  Project-URL: Homepage, https://github.com/stackscribe-ai/coding-agent-audit
8
8
  Project-URL: Further reading, https://stackscribe-ai.github.io/
9
- Keywords: security,supply-chain,mcp,claude-code,ai-agents,ioc-scanner
9
+ Keywords: security,supply-chain,mcp,claude-code,ai-agents,ioc-scanner,mcp-server
10
10
  Classifier: Development Status :: 4 - Beta
11
11
  Classifier: Environment :: Console
12
12
  Classifier: Intended Audience :: Developers
@@ -16,6 +16,7 @@ Classifier: Topic :: Security
16
16
  Requires-Python: >=3.9
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
+ Requires-Dist: mcp>=1.2.0
19
20
  Dynamic: license-file
20
21
 
21
22
  # coding-agent-audit
@@ -119,6 +120,68 @@ none of the *currently known, documented* patterns matched. The config
119
120
  heuristics will produce false positives on legitimate, intentional setups
120
121
  — read the detail line before acting.
121
122
 
123
+ ## MCP server (run it from inside Claude Desktop / Claude Code)
124
+
125
+ Instead of a terminal, you can run both scans as MCP tools directly inside
126
+ any MCP client. Add this to your client's MCP config (e.g. Claude Desktop's
127
+ `claude_desktop_config.json`, or via `claude mcp add`):
128
+
129
+ ```json
130
+ {
131
+ "mcpServers": {
132
+ "coding-agent-audit": {
133
+ "command": "uvx",
134
+ "args": ["--from", "coding-agent-audit", "agent-audit-mcp"]
135
+ }
136
+ }
137
+ }
138
+ ```
139
+
140
+ (No `uv`? `pip install coding-agent-audit` then use `"command": "agent-audit-mcp"`
141
+ with no `args`.) This exposes two tools, `scan_for_known_backdoors` and
142
+ `scan_mcp_config`, so you can just ask your assistant "scan my machine for
143
+ AI coding assistant backdoors" and read the result in the chat — same
144
+ heuristics as the CLI above, nothing installed beyond the server itself.
145
+
146
+ ## Pay-per-call API (for other AI agents / CI systems)
147
+
148
+ The config heuristics (`scan_config_dict`) are also available as an [x402](https://www.x402.org/)
149
+ pay-per-call HTTP API, for agents/pipelines that want to check a config
150
+ programmatically without installing anything:
151
+
152
+ ```
153
+ POST https://stackscribe-audit-x402.stackscribe-paywall-worker.workers.dev/audit
154
+ Content-Type: application/json
155
+ {"config": {<your Claude Code / MCP config JSON>}}
156
+ ```
157
+
158
+ No `X-PAYMENT` header → `402` with the x402 v2 price (0.02 USDC on Polygon,
159
+ scheme `exact`). No account, API key or KYC on either side; settlement runs
160
+ through the public [PayAI facilitator](https://facilitator.payai.network).
161
+ This only scans the JSON object you send (hooks/permissions/MCP-server
162
+ heuristics) - it can't do this package's filesystem IOC scan remotely.
163
+ Full request/response shape: `GET /openapi.json` on that URL, or the
164
+ [source](https://github.com/stackscribe-ai/coding-agent-audit) of the x402
165
+ worker. The free CLI above remains the full, unpaid alternative.
166
+
167
+ ## Instant client-ready report (for humans, no install)
168
+
169
+ If you want a shareable report rather than terminal output — to attach to a
170
+ security questionnaire, hand to a client, or just read without installing
171
+ Python — paste your config at
172
+ [stackscribe-config-report.stackscribe-paywall-worker.workers.dev](https://stackscribe-config-report.stackscribe-paywall-worker.workers.dev/)
173
+ and pay 12 USDC / 24 POL on Polygon (no account, no KYC). Same heuristics as
174
+ `agentaudit.configscan`, delivered instantly as an executive-summary HTML/Markdown
175
+ report with a suggested fix per finding. The free CLI above does the same
176
+ scan for free; this just packages it for sharing.
177
+
178
+ ## Found something (or nothing) worth knowing?
179
+
180
+ Either result is useful to us: a star on the repo
181
+ (https://github.com/stackscribe-ai/coding-agent-audit) tells us people are
182
+ actually running this, which is the only signal we have besides pip
183
+ download counts.
184
+
122
185
  ## Development
123
186
 
124
187
  ```bash
@@ -133,6 +196,10 @@ pytest
133
196
  - dev.to/@slabb: ["A trojanized Claude Code extension plants an SSH backdoor: the 7-point audit for your machine"](https://dev.to/slabb/a-trojanized-claude-code-extension-plants-an-ssh-backdoor-the-7-point-audit-for-your-machine-23cj)
134
197
  - Phorion: ["Official Claude Code Extension Compromise: Security Advisory"](https://phorion.io/blog/offical-claude-code-vsx-compromise/) — confirms the same backdoor reached the Cursor Marketplace and documents the Windows/Linux persistence mechanisms added in v0.2.0 of this tool.
135
198
 
199
+ ## Need this for your team?
200
+
201
+ Want a human-reviewed version of this scan — your actual hooks, MCP configs and CI pipelines checked by hand, with a written report of what to fix? [Paid audit, from €149](https://stackscribe-ai.github.io/services/).
202
+
136
203
  ## Support
137
204
 
138
205
  This tool is free and MIT-licensed, no strings attached. If it caught
@@ -7,11 +7,14 @@ src/agentaudit/cli.py
7
7
  src/agentaudit/configscan.py
8
8
  src/agentaudit/findings.py
9
9
  src/agentaudit/iocs.py
10
+ src/agentaudit/mcp_server.py
10
11
  src/coding_agent_audit.egg-info/PKG-INFO
11
12
  src/coding_agent_audit.egg-info/SOURCES.txt
12
13
  src/coding_agent_audit.egg-info/dependency_links.txt
13
14
  src/coding_agent_audit.egg-info/entry_points.txt
15
+ src/coding_agent_audit.egg-info/requires.txt
14
16
  src/coding_agent_audit.egg-info/top_level.txt
15
17
  tests/test_checks.py
16
18
  tests/test_cli.py
17
- tests/test_configscan.py
19
+ tests/test_configscan.py
20
+ tests/test_mcp_server.py
@@ -1,2 +1,3 @@
1
1
  [console_scripts]
2
2
  agent-audit = agentaudit.cli:main
3
+ agent-audit-mcp = agentaudit.mcp_server:main
@@ -0,0 +1,29 @@
1
+ from pathlib import Path
2
+
3
+ from agentaudit.mcp_server import scan_for_known_backdoors, scan_mcp_config
4
+
5
+
6
+ def test_scan_for_known_backdoors_clean_env(tmp_path, monkeypatch):
7
+ monkeypatch.setenv("HOME", str(tmp_path))
8
+ monkeypatch.setattr(Path, "home", lambda: tmp_path)
9
+ monkeypatch.setenv("TMPDIR", str(tmp_path))
10
+ result = scan_for_known_backdoors()
11
+ assert "No indicators" in result
12
+
13
+
14
+ def test_scan_mcp_config_clean_env(tmp_path, monkeypatch):
15
+ monkeypatch.setattr(Path, "home", lambda: tmp_path)
16
+ result = scan_mcp_config(project_dir=None)
17
+ assert "No indicators" in result
18
+
19
+
20
+ def test_scan_mcp_config_flags_broad_permission(tmp_path, monkeypatch):
21
+ monkeypatch.setattr(Path, "home", lambda: tmp_path)
22
+ claude_dir = tmp_path / ".claude"
23
+ claude_dir.mkdir()
24
+ (claude_dir / "settings.json").write_text(
25
+ '{"permissions": {"allow": ["Bash(*)"]}}'
26
+ )
27
+ result = scan_mcp_config(project_dir=None)
28
+ assert "CRITICAL" in result or "WARNING" in result
29
+ assert "broad" in result.lower()