Open Source — MIT License

Guardrail
Stop vulnerable packages
before they enter.

Guardrail wraps your package manager and checks every package against the OSV vulnerability database — before it touches your lockfile, before code review, before CI. Shift-left security that fits in your existing workflow.

Download View Source
$ grail npm install express@4.17.0
🔴 CRITICAL CVE-2024-1234   pkg:npm/express@4.17.0
Prototype pollution via crafted request header
✦ Patch: upgrade to 4.18.2
✅ SAFE pkg:npm/lodash@4.17.21 (no CVEs found)
❌ Installation blocked. Fix CVEs or add ignore rules.

Why Guardrail?

Most security tools run too late. Guardrail runs first.

🚫

Blocks at Install Time

By the time a lock file scanner runs, the vulnerable package is already committed. Guardrail stops it the moment you type npm install — before anything lands in your repo.

🛡️

Powered by OSV.dev

Queries the open-source OSV vulnerability database — the same data behind GitHub's Dependabot. No account required, no API key, no rate limits.

⚡

Local Cache

Results are cached locally for 24 hours. After the first check, repeated installs of the same package are instant. Point the cache at a shared NFS path to share it across your whole team.

🧠

LLM Impact Analysis

Optional Claude-powered analysis checks whether your code actually calls the vulnerable function before blocking. Reduces false positives without compromising security.

🔧

Remediation Built-in

Guardrail doesn't just report — it tells you the minimum safe version to install. When no patch exists, it finds the last version that predates the vulnerability.

📋

Ignore Rules

Reviewed a CVE and accepted the risk? Add an ignore rule with a reason and optional expiry date. Rules auto-expire so accepted risks get re-evaluated over time.


How it works

Five steps between your command and the real package manager.

1

Parse & resolve

Guardrail reads the package names from your install command and resolves any missing versions from the package registry.

2

Check the cache

Each package is looked up in the local cache. Results less than 24 hours old are used immediately — no network call needed.

3

Query OSV

Cache misses are batched into a single request to the OSV API. Results are saved to the local cache for next time.

4

Evaluate & report

CVEs are matched against your severity threshold and ignore rules. A full report is printed to the terminal.

5

Block or pass through

If any package is blocked, the install exits. Otherwise Guardrail hands off to the real package manager — completely transparent to your workflow.


Install

One binary. No runtime dependencies.

$ brew install ChengaDev/tap/grail
↓ Binary download go install Shell alias setup

Built with

A minimal, auditable stack.

Go OSV.dev Claude API cobra npm PyPI crates.io macOS Linux Windows amd64 arm64 MIT License