TECHDEV · Flagship · Open-source tool

vetgate

A local, deterministic pre-execution gate for software an agent is about to install. Call it instead of running the install: one call, one verdict, every finding carrying the exact evidence string it matched.

TypeScript · MCP server + CLI mirror · MIT · Node 20+ · Zero runtime dependencies beyond the MCP SDK · No model, no account, no API key, no verdict score.

The moment it gates

An agent that installs a package runs its postinstall hook before anyone reads any output. Post-install audits, PR checks, and dashboards all sit on the wrong side of that moment: by the time they run, the payload has already fired. vetgate sits before execution: the agent calls it, reads the verdict, and only then decides whether to install, install with --ignore-scripts, pin to a digest, or ask the user.

If your coding agent installs packages, actions, or scripts on your behalf, each install runs unreviewed — vetgate is the check that runs first.

What it vets

Tool / commandInputWhat it does
vet_package / npm:name@versionnpm name and exact versionDownloads the published tarball, inspects it, never executes it
vet_action / action:owner/repo@refGitHub Action refLocal form check only: SHA-pinned, mutable tag, or unpinned
vet_script / url:https://...Script URLFetches the text (10s timeout, 1MB cap), scans it, never executes it

The default path sends nothing anywhere except downloading the artifact itself (vet_package) and fetching the script text (vet_script, labeled in the verdict manifest). All analysis is local. local: is fixture mode for offline demos; it is not a shipped MCP feature.

Verdicts

VerdictMeaningExit code
ALLOWNo findings.0
REVIEWAny finding, but no high finding. Carries a safeAction (install with --ignore-scripts, pin to a digest, or ask the user) — never a silent ALLOW and never a DENY on a weak signal alone.1
DENYAny high finding.1

Every finding carries its evidence string, truncated to 120 characters. A finding without evidence is a bug. Determinism: same input bytes plus the same rules version give the same verdict, except for manifest.checkedAt.

Rules (v1)

DENY: install script, scanned .js/.sh file, or remote script text that reads a credential or environment value AND sends data to the network in the same text; download-and-execute chains (curl|sh, curl|bash, wget|sh, wget|bash, curl|node, PowerShell IEX with an http(s) URL); obfuscation markers (eval(atob(, base64-then-eval, String.fromCharCode with 10+ arguments, dense \x hex escapes) combined with a network call; typosquat — package name at Levenshtein distance exactly 1 from a popular package name; action refs that are :latest, untagged, or malformed.

REVIEW (never DENY alone): any install script present at all; missing license field; action ref that is a mutable tag (v4, main, a semver tag), with a pin-to-digest recommendation; zero-width or bidirectional-override characters in script text alone; a remote script containing an outbound URL but no DENY pattern.

Full rule set, patterns, and triggering fixtures: docs/RULES.md in the repository. The typosquat list is a fixed sample of 39 well-known packages, NOT exhaustive — a name absent from the list is simply not checked for typosquatting, never declared safe because of that absence.

Use it

# MCP server (see examples/mcp-config.json in the repo)
{
  "mcpServers": {
    "vetgate": { "command": "npx", "args": ["-y", "vetgate", "serve"] }
  }
}
# or directly over stdio:
vetgate serve
# CLI
vetgate check npm:react@18.3.1
vetgate check action:actions/checkout@v4
vetgate check url:https://example.com/install.sh
# Build from source
git clone https://github.com/techdevfun/vetgate.git
cd vetgate
npm ci
npm run build
npm test

Commands and config copied from the vetgate README (v0.1.0). Requires Node 20 or later. The CLI prints the Verdict JSON to stdout and one summary line to stderr. For vet_script, fetching the script text is itself a network fetch — the verdict manifest says exactly that, while all analysis was local and the script was never executed.

Measured numbers (README, fixture set)

What this is NOT — and where rivals beat us

Source + README on GitHub → · Report an issue → · ask@techdev.fun

Related tools

More open-source tools from TECHDEV: sessguard, runverdict, gheist-guard, context-diet, ci-failure-detective, agent-seatbelt, devsecops-os, env-doctor, skill-audit, logtrim, testguard, breakcheck, keymap, memgraph, ggufit, leaseguard, factfence, jsonfold

Have a say

Vote for this tool, suggest a feature, or discuss it with other operators on the community board.