MCP server giving Claude Code native security scanning superpowers
Project description
🛡️ Security Autopilot
Catches threats in your code. Fixes them automatically. Never asks you to do anything.
The Problem
On March 30, 2026, two malicious versions of axios — one of the most downloaded npm packages on the planet — were quietly published to npm.
They contained zero suspicious code inside axios itself. Any developer who inspected the source would have found nothing wrong.
Instead, they silently injected a fake dependency called plain-crypto-js that ran a postinstall script the moment you ran npm install. That script phoned home to a command-and-control server and dropped a remote access trojan tailored to your OS.
After delivering the payload, it deleted itself and swapped its own package.json for a clean decoy. No trace. No warning. No audit trail.
npm audit reported nothing. GitHub Dependabot reported nothing. Standard code review caught nothing.
This is the new shape of supply chain attacks — and your existing tools aren't built to catch them.
What It Does
Security Autopilot runs silently in the background on your machine from the moment you install it. You never have to open it, ask it anything, or remember it exists.
1. Scans all your existing projects on first install
The moment you install it, Security Autopilot walks through your development folders (~/projects, ~/code, ~/Desktop/projects, etc.), scans every project it finds, and sends you a single desktop notification with a summary. If anything critical is found, it tells you exactly what and where.
2. Watches every project forever after
After the initial scan, it keeps watching. The moment you add or update a package.json, requirements.txt, go.mod, Cargo.toml, or any lockfile — it scans automatically. No commands to run. No Claude Code required.
3. Auto-patches malicious packages
If it detects a known-malicious package (e.g. axios@1.14.1), it doesn't just warn you — it fixes it:
- Finds the highest safe version within the same major (semver-compatible, no breaking changes)
- Runs
npm install axios@1.14.0automatically - Sends you a desktop notification: "✅ Auto-patched: axios 1.14.1 → 1.14.0"
You never even see the bad version in your project.
4. Fires a loud alert for exposed secrets
If it finds an API key, token, or password committed to your codebase — it sends an immediate desktop notification with step-by-step rotation instructions specific to that credential type:
🚨 SECRET EXPOSED — Action Required AWS KEY exposed in .env. Go to AWS Console → IAM → Users → Security credentials → Delete key immediately.
Full instructions (all steps) are saved to ~/.security-autopilot/secret-alerts.log so you can refer back at any time. Covers AWS, GitHub, Stripe, Slack, SendGrid, Twilio, JWT, and more.
5. Plugs into Claude Code
When Claude Code is open, Security Autopilot exposes four tools Claude can use directly:
| Tool | What it does |
|---|---|
scan_repo(path) |
Full scan — all 4 scanners in parallel, results in plain English |
scan_file(filepath) |
Scan a single file |
get_findings(severity) |
Retrieve cached findings from previous scans |
watch_project(path) |
Start a background watcher on a specific project |
You can just say "scan this project" or "show my security findings" and Claude handles the rest.
What It Catches
| Threat | How |
|---|---|
| 🔴 Known-malicious packages | Blocklist of confirmed-bad versions updated as attacks happen |
| 🟠 Maintainer account hijacks | Detects publisher email changes between versions |
| 🟠 Postinstall script injection | Flags preinstall, postinstall, prepare lifecycle hooks |
| 🟠 Exposed secrets | API keys, tokens, passwords committed to any file |
| 🟡 CVEs in dependencies | Trivy scans against the full NVD vulnerability database |
| 🟡 Code-level bugs | Semgrep: SQL injection, XSS, eval(userInput), 1000+ patterns |
| 🟡 Recently published versions | 72-hour cooldown gate on brand-new releases |
| 🔵 Floating version pins | ^ and ~ pins that allow silent upgrades |
| 🔵 Missing SLSA provenance | Packages published without cryptographic build attestations |
Install
curl -fsSL https://raw.githubusercontent.com/Omar-Dahleh/security-autopilot/main/install.sh | sh
This single command:
- Installs
uv(Python package manager) if not present - Installs
security-autopilotfrom PyPI - Installs
trivy,gitleaks, andsemgrepscanner CLIs - Patches
~/.claude/claude.jsonto register the Claude Code plugin - Registers a background daemon that starts automatically at every login
- Immediately scans all your existing projects
Safe to run twice — fully idempotent.
Telemetry: On first run you'll be asked whether to share anonymous usage data (OS + Python version only). Opt out anytime by deleting
~/.security-autopilot/telemetry_consent.
What Happens After Install
Install completes
│
▼
Daemon starts immediately
│
├─▶ Scans all projects in ~/projects, ~/code, ~/Desktop/projects
│ └─▶ Desktop notification: "Scanned 8 projects — 2 critical issues found"
│
└─▶ Watches forever
│
├─▶ You run npm install axios@1.14.1
│ └─▶ Detected → auto-patched to 1.14.0 → "✅ Fixed automatically"
│
├─▶ You commit a file with an AWS key
│ └─▶ "🚨 SECRET EXPOSED — rotate immediately" + full steps
│
└─▶ New project appears in ~/projects
└─▶ Auto-detected → scanned within 60 seconds
Scanners
| Scanner | What it catches | Requires |
|---|---|---|
| Supply Chain | Known-bad versions, account hijacks, lifecycle scripts, floating pins | Built-in |
| Trivy | CVEs in npm, pip, Go, Rust, Java dependencies | Auto-installed |
| Gitleaks | Hardcoded secrets, API keys, tokens, passwords | Auto-installed |
| Semgrep | 1000+ SAST rules: injection, XSS, insecure patterns | Auto-installed |
Security Autopilot works with reduced coverage if a scanner is missing — it never crashes.
For Contributors
uv run pytest tests/ -v # run all tests
python -m mcp_server.server # start MCP server manually
See CLAUDE.md for the complete project context, coding rules, and how to add a new scanner.
Known-Bad Versions
# mcp_server/tools/supply_chain.py → KNOWN_BAD
[
{"name": "axios", "version": "1.14.1", "reason": "supply chain RAT March 2026"},
{"name": "axios", "version": "0.30.4", "reason": "supply chain RAT March 2026"},
{"name": "plain-crypto-js", "version": "4.2.1", "reason": "axios attack dropper"},
]
PRs to extend this list are welcome.
License
MIT — free to use, modify, and distribute.
Built in response to the March 2026 axios supply chain attack.
Because npm audit wasn't enough.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file security_autopilot-0.1.3.tar.gz.
File metadata
- Download URL: security_autopilot-0.1.3.tar.gz
- Upload date:
- Size: 78.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abf8d6edc83e06d0f0c35dc6fe4e35356546924053e1042c79f432dfba92af61
|
|
| MD5 |
92fa9b78711ac19b25f57ca13dfaf76b
|
|
| BLAKE2b-256 |
5e084ee215d4fe894c4a402ef10ea7721126343b91853eace031550917c38287
|
File details
Details for the file security_autopilot-0.1.3-py3-none-any.whl.
File metadata
- Download URL: security_autopilot-0.1.3-py3-none-any.whl
- Upload date:
- Size: 35.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.1 {"installer":{"name":"uv","version":"0.11.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0204d408b864a83c2f0def0f4dbe89ff6c085c7062faed2badc6aca3b84092b1
|
|
| MD5 |
11faaa02f92f4d41c37e38d01897202f
|
|
| BLAKE2b-256 |
cb4a10806bd290c0540d869274457d729111d4cc4ae5a6820ae444b3fc10cdd7
|