A free npm firewall
npm install fetches strangers' code and often runs it straight away. ForgeRepo™ stands in
front of the npm registry and decides, for every package and every version, whether that is allowed to
happen, before it happens.
Replay of real npm commands against a ForgeRepo™.
What it stops, and how
Every one of these is in the free version, and each links to how it works.
Allow lists and block lists
Whitelist or blacklist by name, scope, wildcard or version range, for every type. A blocked version is not even listed to the client.
Read moreMalware scanning
ClamAV, a hash blocklist, your own scanner and the OpenSSF known malicious feed, on every cached file. Optionally before the first download.
Read moreCooling off new releases
Brand new versions wait a few days before your builds see them, which is when hijacks get caught.
Read moreTyposquat detection
lodahs, reqeusts, l0dash, python-numpy. Lookalike names are caught and warned about, or refused.
Read moreDependency confusion protection
Reserve your npm scopes, PyPI prefixes, image namespaces and NuGet ids. A public package with your internal name is never fetched.
Read moreSafe version resolution
Versions with serious advisories are left out, so a range quietly settles on the newest safe one.
Read moreKill switch
Take a package, a version range, one file hash or a whole advisory away from everyone, at once.
Read moreProvenance verification
npm SLSA provenance and PyPI PEP 740 attestations checked against Sigstore, offline, on the box.
Read moreIntegrity alerts and quarantine
A file that changes after it was first seen is held. The original keeps being served.
Read moreIt does not break npm install
A firewall that fails every build gets switched off by Friday. ForgeRepo™ filters the metadata:
when npm asks which versions exist, the blocked ones are simply not in the answer, and latest moves back to
the newest allowed one. So npm install picks an allowed version on its own, and ranges like
^4.17.0 keep working.
Lockfiles work too. They name the exact file, and if that file is blocked the error says why, names the rule or the kill switch note, and a request is already open for an approver.
Start in audit only mode and nothing is blocked at all for a week or two. ForgeRepo™ just learns what your teams really install and queues it up for approval.
Questions
What is an npm firewall?
A registry proxy that sits between npm and the public registry and decides, for every package and version, whether it may be installed. It blocks unapproved, malicious, typosquatted, too new or vulnerable versions before they reach a laptop or a build, and records who asked for what.
Is there a free npm firewall?
ForgeRepo™ is one. It is MIT licensed and self hosted, and blocking before download, malware scanning, cooling off, typosquat and dependency confusion protection and the kill switch are all in the one free version.
Does an npm firewall break npm install?
Not when it filters metadata. ForgeRepo™ removes blocked versions from the list npm sees, so a range resolves to a version you allow, and lockfiles keep working. Only an exact request for a blocked version fails, with the reason in the error.
Does it work with pnpm, Yarn and Bun?
Yes. They speak the same registry protocol, so they get the same rules, the same cache and the same errors.
Compared with the paid npm firewalls: JFrog Curation, Sonatype Repository Firewall and Cloudsmith.
One container, about two minutes
A Linux box with Docker, or one without it, and a reverse proxy for TLS. The installer does the rest and it is safe to run twice. Free, MIT licensed, nothing to sign up for.