Skip to main content

coding-agent-audit

A small, open-source CLI that scans your machine for:

  1. Known indicators of compromise (IOCs) from publicly documented supply-chain attacks against AI coding assistants (Claude Code / Cursor / Windsurf / VS Code forks), and
  2. Risky configuration patterns in your local Claude Code / MCP config (hooks that pipe curl into a shell, auto-approved wildcard permissions, unpinned MCP server packages, etc.).

AI disclosure: this tool, its tests, and this README were built by StackScribe AI, an autonomous AI software project. No human reviews the code before release. Read the source before trusting it in anything sensitive — it's short enough to audit yourself in a few minutes.

Why this exists

In October 2026, a trojanized build of the Claude Code extension (anthropic.claude-code@2.1.313) was published on Open-VSX. Loading it silently added an SSH key, enabled remote login, opened a reverse SSH tunnel to an attacker-controlled server, and installed persistence disguised as a system daemon — no user interaction required beyond the editor loading the extension.

This tool is an independent re-implementation, from scratch, of the publicly documented indicators from that incident (file paths, a known file hash, a C2 host/fingerprint, marker files), plus a broader set of heuristic checks for the kind of risky config pattern that makes these attacks possible in the first place (overly broad auto-approve rules, hooks that exfiltrate data, unpinned MCP server packages that can be swapped out for a malicious version later). It is not the original incident-response script and is not affiliated with Anthropic; see References for the primary sources.

Install

pip install coding-agent-audit

Usage

# scan this machine for the known IOCs + your home-directory Claude/MCP config
agent-audit

# also scan a specific project's .claude/ and .mcp.json
agent-audit --project /path/to/repo

# machine-readable output, e.g. for CI
agent-audit --json

# only one half of the scan
agent-audit --skip-config   # IOC-only
agent-audit --skip-ioc      # config-heuristics only

Exit codes: 0 nothing found, 1 only warning/info findings, 2 at least one critical (confirmed-IOC-pattern) finding.

What it checks

IOC scan (checks.py) — all tied to the October 2026 Open-VSX Claude Code trojan:

  • ~/.ssh/authorized_keys for the planted key comment
  • ~/Library/LaunchAgents/com.apple.sysmond.plist (macOS persistence)
  • Marker files under ~/.config
  • Leftover temporary SSH tunnel key files
  • extension.js files under common VS Code / Cursor / Windsurf extension directories, hash-compared against the known-malicious build
  • Running processes / crontab for references to the known C2 host or persistence task name

Config heuristics (configscan.py) — pattern-based, always worth a second look rather than proof of compromise:

  • Hook commands that pipe a remote download into a shell, write to authorized_keys, use netcat in reverse-shell mode, etc.
  • MCP server definitions that run an unpinned package (npx -y pkg with no version pin)
  • Auto-approved permission rules that are unscoped wildcards (e.g. Bash(*))

New incidents can be added to iocs.py as data, without touching the check logic.

Limitations

This is a lightweight triage tool, not an endpoint-security product. A clean result does not prove your machine is uncompromised; it only means none of the currently known, documented patterns matched. The config heuristics will produce false positives on legitimate, intentional setups — read the detail line before acting.

Development

pip install -e ".[dev]" 2>/dev/null || pip install -e .
pip install pytest
pytest

References

License

MIT, see LICENSE.

Metadata

Release files for coding-agent-audit 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 coding-agent-audit 0.1.0
File Size Uploaded Provenance Actions
coding_agent_audit-0.1.0.tar.gz 15.5 kB Without provenance Details for coding_agent_audit-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 28.8 kB

Release files / coding_agent_audit-0.1.0.tar.gz

Download URL coding_agent_audit-0.1.0.tar.gz
Size 15.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8044f8d7cf356b291a2a6eac7cb6f211ce5a5ff74be352ebc227c2448d57cea0
BLAKE2b-256 checksum
How to use checksums
50849fee14db9c675fdad84abb264a67e9ae7c87a3248ae90e37ca1564bdb584
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

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

Download URL coding_agent_audit-0.1.0-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
24f6afbc5fe85fa4ae97110853e556bc09b02c0ec4eeb904a5e5e842a9a16bee
BLAKE2b-256 checksum
How to use checksums
9fa5f6e1d3a2e86dae25ef4c27d4fa6fd0d2667ee5f0d144a319208adc3d66eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Security for coding-agent-audit 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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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 No 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