Skip to main content

MCP server giving Claude Code native security scanning superpowers

Project description

๐Ÿ›ก๏ธ Security Autopilot

The security scanner that works while you code โ€” not after you ship.

Tests Python License MCP


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 Security Autopilot Does

Security Autopilot is an MCP server that plugs directly into Claude Code and gives it real security scanning superpowers. You talk to Claude naturally โ€” it runs the scans.

It catches the class of attacks that traditional tools miss:

What it catches How it catches it
๐Ÿ”ด Known-malicious packages (axios@1.14.1, plain-crypto-js@4.2.1) Blocklist checked before any install
๐ŸŸ  Maintainer account hijacks Detects publisher email changes between versions
๐ŸŸ  Postinstall script injection Flags any preinstall, install, postinstall, prepare lifecycle scripts
๐ŸŸก Recently published versions 72-hour cooldown gate on new releases
๐Ÿ”ต Floating version pins Flags ^ and ~ pins that allow silent upgrades
๐Ÿ”ต Missing SLSA provenance Detects packages published without cryptographic build attestations
๐ŸŸ  Exposed secrets & credentials Gitleaks scans every file for hardcoded API keys, tokens, passwords
๐ŸŸก CVEs in your dependencies Trivy scans against the full NVD vulnerability database
๐ŸŸก Code-level security bugs Semgrep catches eval(userInput), SQL injection, XSS, and 1000+ other patterns

How It Works

You type:  "is my supply chain safe?"
              โ”‚
              โ–ผ
        Claude Code calls scan_repo()
              โ”‚
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚   4 scanners run   โ”‚  โ† all in parallel, ~10 seconds total
    โ”‚   simultaneously   โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ”‚
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚  Supply Chain  โ”‚  Trivy  โ”‚  Gitleaks  โ”‚  Semgrep  โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ”‚
              โ–ผ
    Claude summarises findings in plain English
    with severity, location, and exact fix steps

Missing a scanner? Security Autopilot installs it for you automatically โ€” no setup required.


Quick Start

1. Install (one command)

curl -fsSL https://get.securityautopilot.dev | sh

This installs uv, the MCP server, all scanner CLIs (trivy, gitleaks, semgrep), and automatically patches ~/.claude/claude.json to register the plugin. Safe to run twice.

Telemetry: On first run you'll be asked whether to share anonymous usage data (OS + Python version). You can opt out at any time by deleting ~/.security-autopilot/telemetry_consent.

2. Restart Claude Code

That's it โ€” no manual config needed.

3. Just talk to Claude

"scan this project for security issues"
"any secrets exposed in this codebase?"
"is my supply chain safe?"
"check my dependencies for known vulnerabilities"
"watch this project and alert me to new issues"

What a Scan Looks Like

## Security Scan: `/your/project`
Scanners: supply_chain, trivy, gitleaks, semgrep  |  Duration: 8.3s
Found: 4 issues โ€” ๐Ÿ”ด 1 critical  ๐ŸŸ  2 high  ๐ŸŸก 0 medium  ๐Ÿ”ต 1 low

### ๐Ÿ”ด [CRITICAL] Known-malicious package: axios@1.14.1
Location: package.json
Scanner: supply_chain

axios@1.14.1 is on the known-bad blocklist.
Reason: supply chain RAT March 2026 โ€” postinstall dropper

Remediation: Remove axios@1.14.1 immediately. Downgrade to axios@1.14.0.
Rotate all secrets on affected machines โ€” this version installs a
remote access trojan.

### ๐ŸŸ  [HIGH] Exposed aws-secret-access-key secret in .env
Location: .env:3
Scanner: gitleaks

Rotate this credential immediately โ€” assume it is compromised.
Add `.env` to .gitignore to prevent future commits.

MCP Tools

Claude gets access to 4 tools automatically:

Tool What it does
scan_repo(path) Full scan โ€” all 4 scanners in parallel
scan_file(filepath) Scan a single file
get_findings(severity) Retrieve cached findings from previous scans
watch_project(path) Start a background daemon that re-scans on file changes

The background watcher also sends a desktop notification the moment a new critical or high finding is detected โ€” even if Claude Code isn't open.


Scanners

Scanner What it catches Auto-installed?
Supply Chain Known-bad versions, account hijacks, lifecycle scripts, floating pins, SLSA gaps โœ… 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

For Contributors

# Run tests
uv run pytest tests/ -v

# Start the MCP server manually
python -m mcp_server.server

# Add a new scanner
# โ†’ see CLAUDE.md for the exact pattern to follow

Adding a scanner takes ~50 lines

Every scanner follows the same pattern:

# mcp_server/tools/my_scanner.py
from .installer import ensure_installed

async def scan(project_path: str) -> list[dict]:
    if not await ensure_installed("my-tool"):
        return [_not_installed_finding()]
    # ... run subprocess, parse output, return findings

See schemas/finding.json for the unified finding schema all scanners must conform to.


Known-Bad Versions

The supply chain scanner ships with a blocklist that is updated as attacks are discovered:

# 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

security_autopilot-0.1.2.tar.gz (76.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

security_autopilot-0.1.2-py3-none-any.whl (33.3 kB view details)

Uploaded Python 3

File details

Details for the file security_autopilot-0.1.2.tar.gz.

File metadata

  • Download URL: security_autopilot-0.1.2.tar.gz
  • Upload date:
  • Size: 76.5 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

Hashes for security_autopilot-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e4026719942a42d53bd4a8348f8827300cfead5b911caaef0a5b6de09c9fdb34
MD5 38d1ed10037516682f3d7c853e78fe51
BLAKE2b-256 dd2a176935de09ae591b606b43514917d46dee6c5407852c2f3d326eaea85d9a

See more details on using hashes here.

File details

Details for the file security_autopilot-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: security_autopilot-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 33.3 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

Hashes for security_autopilot-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 313e67edd0bf19a7b95141c47e4b8929d3247f6ce96e790102ca3e50f5d3b72e
MD5 9d197341847b5df70220d6958ddf957f
BLAKE2b-256 00624cdbcf7762b9d5104f7783cd2cdaa545691fa31594ee326cfef210fa2c62

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page