How a package firewall works

Chainsaw is a firewall for your package installs.

Every npm install, pip install and docker pull meets the package firewall's policy engine on its way to your machine.

  1. 01 · Your package manager

    npm install <pkg>

    registry URL points at Chainsaw

  2. 02 · Chainsaw proxy

    • CVE, CVSS, EPSS, KEV
    • license and version rules
    • provenance
    • supply-chain signals

    before any bytes reach the client

  3. Refused

    the error names the rule that fired

    Allowed

    streamed through the content-addressed cache

Unchanged: npm install, lockfiles, CI jobs, IDE tooling and registry auth.

Why this exists

Why don't CVE scanners catch supply-chain attacks?

CVE scanners miss supply-chain attacks because a malicious release has no CVE at install time. event-stream, xz-utils and the March 2025 tj-actions/changed-files compromise reached developer machines before any CVE existed. Chainsaw is a package firewall that decides on the install request itself.

01

Setup · one-time

Point one URL at Chainsaw

~/.npmrc
registry=https://registry.npmjs.org/
registry=https://chain305.com/chainproxy/repository/@default/npmjs/
//chain305.com/chainproxy/repository/@default/npmjs/:_authToken=CLIENT_ID:CLIENT_SECRET

One URL per ecosystem, no SDK or CI plugin. Per-ecosystem guides →

02

Every install · runtime

Rules run in parallel, then allow or refuse

Rules are evaluated on the request itself, before the package is served.

Supply-chain signals, by ecosystem
Install-script exfiltrationnpm / pip / rubygems / cargo / composer
Maintainer-account takeovernpm / pip / rubygems / nuget / maven / gradle
Publish-velocity burstsnpm / pip / rubygems / nuget
Hidden characters in packagesource-archive ecosystems
Typosquat across 15 ecosystemsnot APT / Yum / DNF
Version anomaliesevery SemVer ecosystem
Reserved-namespace dependency confusionuniversal
Container-image malware feedDocker
Per-layer image enforcementDocker
OS-package hash-chain provenanceAPT / Yum / DNF
Repo liveness + ownership matchtrust-score input
Checksum fail-closed enforcementnpm / pip / rubygems / composer / maven / gradle / nuget / cargo
03

Rollout · ongoing

Monitor first, enforce when ready

policy.yaml
name: "Block critical vulnerabilities"
mode: "monitor"  # week 1–2: just record what would fire
mode: "block"    # week 3+: block the install
conditions:
  cvssMin: 9.0
  epssMin: 0.5

Flip per rule, per repo or per team. Every decision is logged.

Where every decision lands

Where do Chainsaw's decisions show up?

Every Chainsaw decision shows up in four places, and the first is the developer's terminal, where a refused install fails with an error naming the rule that fired.

One refused install of crossenv, a typosquat of cross-env, shows up in four places at once: the developer's terminal, the dashboard, a signed audit row recording who, which repo, which rule and when, and a Slack alert.

Each install, allowed, monitored or blocked, leaves a signed audit row. Webhooks post to any endpoint when an install is blocked or a policy changes, with five per user on the Free plan. On Enterprise, the audit log also streams to Splunk HEC, Microsoft Sentinel or IBM QRadar. Every install also lands in a queryable inventory, and a CycloneDX 1.6 SBOM exports per repository on demand.

Chainsaw Overview dashboard showing blocked, allowed, and flagged install counts as sparklines, supply-chain firewall posture, and a patch-priority queue.
Overview Block, allow and flag counts, posture and the patch-priority queue. Demo org, 30 days of synthetic install traffic.

Questions

How does the Chainsaw local guard stop a malicious install?

Chainsaw by Chain305 is a package firewall, not the Windows event-log forensics tool or the Kubernetes testing tool that share the name. Chainsaw's free local guard is a shell hook for npm, pip, cargo, gem and go, with no daemon, and the installer turns it on. When a developer runs a normal install, Chainsaw checks the package first and refuses a malicious or typosquatted one before it downloads, so the tarball never reaches disk. The malicious and typosquat seeds ship inside the binary, which is why the check works offline: with the wifi off, npm install crossenv, a known typosquat of cross-env, is still refused. The reason is logged on the machine, and the engine is open source at github.com/chain305/chainsaw-core.

Where does a Chainsaw policy get enforced?

A Chainsaw policy is a signed Rego policy bundle, and Chainsaw enforces the same bundle at five surfaces: the pull request, the install path, publish, Kubernetes admission and the developer's laptop. All five read the same rule. The first surface, the pull-request check, runs as a GitHub Action and fails on the dependency diff. The proxy refuses the fetch with the reason and the exception path, publish refuses an upload from your own build that fails policy, the admission webhook refuses a pod whose image fails the same Rego, and the local guard refuses on the laptop even where the proxy was bypassed. The PR check sees only the manifest diff, so CVSS, malware and other byte-level rules apply from the install on.

How does Chainsaw cover a whole organisation?

For a team, Chainsaw is a registry proxy between your developers and the upstream registries, so the policy holds on every machine that installs through Chainsaw, including laptops that never ran the CLI. The free local guard covers 5 ecosystems on one machine. The proxy covers 17: npm, pip, cargo, gem and go, plus Maven, Composer, NuGet, Hugging Face, CocoaPods, Swift, pub, Docker, APT, yum, DNF and Homebrew. Every decision is made against one signed policy and recorded as one signed audit row.

Which rules does a new Chainsaw org block from day one?

A new Chainsaw org blocks on five seeded rules from day one, and the other seeded rules start in monitor mode. First, a version with a CVE in the CISA Known Exploited Vulnerabilities catalog is refused at any CVSS score. For example, a version carrying CVE-2023-44487, the HTTP/2 Rapid Reset flaw, is refused whatever its score. Second, a package first published less than 1 day ago is refused. Third, an install script that fetches a remote URL is refused. The last two block rules cover import-time execution of fetched or decoded code and bidi-override hidden Unicode. Two editable demo rules also block from the start: known malware from the OpenSSF malicious-packages feed, and suspected typosquats such as lodahs for lodash. Monitor mode is a dry run: the match is recorded and the install still succeeds. The seeded monitor rules cover any known advisory, a changed publisher set, a version under 10 days old and hidden Unicode of any kind. Separately from the seeded rules, the proxy holds every new version for 48 hours by default. On npm, PyPI and Composer it hides versions younger than the hold, so a version range resolves to an older release; on most other formats, including Maven, Go and Cargo, an exact pin to a younger version is refused. The 1-day rule asks how old the package is; the hold and the 10-day monitor ask how old the requested version is.

What does Chainsaw check the first time a package version is requested?

The first request for a package version is decided on the bytes Chainsaw has just fetched, before any reach the client. Chainsaw runs its byte detectors inline on that first download and returns allow or refuse on the same request. The inline detectors cover install scripts that fetch remote URLs, indicator-of-compromise sinks, import-time execution of fetched or decoded code, and Cargo build.rs execution. Block rules on those conditions therefore fire on request one, not after a background scan. The malware check reads the live in-memory index of the OpenSSF malicious-packages feed, which syncs every 6 hours, so a newly listed package is refused without waiting for a rescan. A version whose bytes later change, detected by a SHA-256 mismatch, is rescanned instead of keeping its old verdict. In practice, an npm package whose postinstall hook runs curl against a remote URL is refused on its first install, before the hook can run.

When things go wrong

What happens to builds when something fails?

A degraded feed fails open by default and an upstream outage is served from cache, but installs pointed at an unreachable hosted proxy fail, because npm and pip have no automatic fallback.

What failsWhat happens
Threat-intel feed or advisory database degradedFails open and writes the gap to the audit trail. Set CHAINSAW_COVERAGE_MODE=closed and name your mandatory sources to refuse anything they could not check.
The hosted proxy is unreachableInstalls fail; npm and pip have no automatic fallback. Use the break-glass client config in the package-manager guide.
Your self-hosted proxy is downRun it HA. That is a deployment question, not a policy one.
Upstream registry is downThe cache serves previously allowed versions. New ones fail with the upstream's own error.
A rule is too aggressiveOne-click exception with a reviewer, a reason and an expiry.
Read the getting-started guides →

In depth

What changes for developers when Chainsaw is on the install path?

Almost nothing changes for developers when Chainsaw sits on the install path. There is no SDK, no laptop agent and no CI plugin: npm install, lockfiles, CI jobs, IDE tooling and registry auth stay as they are, and the only edit is one registry URL per ecosystem pointing at the Chainsaw proxy. A package that passes policy installs as usual, streamed through Chainsaw’s content-addressed cache, and the developer sees the usual added 1 package. The visible difference is that a bad package fails, with an error in the developer’s own terminal naming the rule that fired and the exception contact. If the rule is wrong for that install, the developer asks for an exception that carries a reviewer, a reason and an expiry date, with no escalation to platform engineering.

Why does Chainsaw refuse at install time instead of scanning afterwards?

Chainsaw refuses at install time because the supply-chain attacks that matter most shipped before any CVE existed. event-stream, ua-parser-js, xz-utils and the March 2025 tj-actions/changed-files GitHub Action compromise all reached developer machines before any vulnerability scanner had a CVE to match. A post-hoc SCA tool finds the bad package after the package is on disk, sometimes after the postinstall script has already run. Chainsaw is a package firewall: Chainsaw decides on the install request itself, before the package is served, on rules you can read and change. The supply-chain rules cover install-script exfiltration, maintainer-account takeover, publish-velocity bursts, typosquats and the other supply-chain signals, up to 25 depending on the ecosystem, alongside the usual vulnerability, license, version and provenance gates. In practice, an npm package whose postinstall hook runs curl against a remote URL is refused on its first install, before the hook can run.

How does Chainsaw work, step by step?

How do you point a package manager at Chainsaw?

You point a package manager at Chainsaw by changing one registry URL in the config the package manager already reads. For npm, the file is ~/.npmrc: replace registry=https://registry.npmjs.org/ with your org’s Chainsaw proxy URL and add the _authToken line with your client credentials. Nothing else changes: no SDK, no laptop agent, no CI plugin and no new build step. The same pattern covers pip.conf for pip, settings.xml for Maven, FROM lines in a Dockerfile, and the registry settings for NuGet, Cargo, Go, Composer and APT, with one URL per ecosystem across the 17 ecosystems Chainsaw proxies. A pip user sets index-url in pip.conf to the Chainsaw PyPI URL. Developers keep running npm install or pip install as before, and lockfiles, CI jobs and registry auth stay unchanged. Per-ecosystem setup guides.

How does Chainsaw decide whether to allow or block a package?

On every request, Chainsaw evaluates the package in parallel against your rules before forwarding to the upstream registry or returning an error.

  • Allow path: rules pass in parallel: vulnerability gates, licenses, versions, provenance (who published it, signed by whom), plus up to 25 supply-chain attack signals, depending on the ecosystem (all 25 on npm and PyPI). The package streams back through the content-addressed cache (deduped by hash — the second install of the same version is faster than upstream), and the developer sees the usual added 1 package.
  • Block path: the developer sees the exact rule that fired, in their own terminal.

EPSS is the likelihood of real-world exploitation — it filters out the long tail of “technically a CVE, nobody exploits it” noise.

What are Chainsaw’s six rule families?

Chainsaw’s six rule families are vulnerability gates, licenses, versions, provenance, client context and exceptions. For example, a vulnerability gate can refuse any version with a CVE in the CISA Known Exploited Vulnerabilities catalog, whatever its CVSS score.

  • Vulnerability gates: CVE, CVSS, EPSS, KEV.
  • Licenses: SPDX allowlist/denylist per ecosystem.
  • Versions: pinned, semver windows, release-age floors.
  • Provenance: signed builds, trusted publishers.
  • Client context: who’s installing, from where, into what.
  • Exceptions: reviewed, dated, scoped overrides.

How do you roll Chainsaw out without breaking builds?

You roll Chainsaw out in monitor mode first. Every rule ships with a monitor mode: the decision is recorded, but the install still succeeds. You see exactly what would have been blocked across every repo and pipeline, add exceptions where needed, then flip the rule to enforce — per rule, per repo, per team.

Every allow/block is logged with timestamp, user, rule, and package metadata. Export a CycloneDX SBOM (standard file that lists everything you shipped) per repo, stream the audit log to your SIEM, or roll a policy back from the dashboard — no developer workstation touched.

What happens when something goes wrong?

What happens if Chainsaw itself is degraded?

What happens depends on which part of Chainsaw is degraded, and the outages have different answers. The Chainsaw proxy sits in your install path, and npm or pip pointed at it have no automatic fallback. If the hosted proxy is unreachable, installs fail until it is back; the package-manager guide gives a break-glass client config for the outage. Self-hosted, run the proxy HA: a down process is a deployment question, not a policy one. If the proxy cannot load your policies, it refuses with HTTP 503 rather than install unchecked. If the proxy is up but a threat-intel feed or advisory database is degraded, installs proceed and Chainsaw records the gap in the audit trail. Chainsaw fails open on data gaps by default rather than breaking your builds. To fail closed instead, set CHAINSAW_COVERAGE_MODE=closed and name the data sources you treat as mandatory. Chainsaw then refuses anything the proxy could not fully check, and the error tells you which source was missing. Say a threat-intel feed is named as mandatory: an install Chainsaw could not check against the feed is then refused while the feed is degraded.

What happens if the upstream registry is down?

If the upstream registry is down, Chainsaw keeps your builds running from its cache. When npm, PyPI or Docker Hub has a bad day, versions Chainsaw previously allowed are served from Chainsaw’s content-addressed blob store, deduplicated by hash. Only packages and versions nobody has installed through Chainsaw before fail, and those fail with the upstream registry’s own error, not a Chainsaw error.

What if a Chainsaw rule is too aggressive?

A blocked legitimate install is one click away from an exception. The exception carries a reviewer, a reason, and an expiry date. The reviewer dashboard queues the request; the developer sees a structured error naming the rule and the exception contact. No escalation to platform-eng needed.

Still skeptical? Start in monitor mode. Every rule supports it out of the box: Chainsaw logs the decision but still lets installs through, so you can measure exactly what would have been blocked across every repo and pipeline before you enforce a single thing.

Ready to roll out?

Put Chainsaw on the install path

Start free in monitor mode. See what would be refused, then flip to enforce when you've seen the data.