Package Firewall
Stop malicious and typosquatted dependencies at install time - inline allow / warn / block enforcement for typosquats, dependency confusion, and known-malicious packages.
Package Firewall
The Package Firewall moves dependency protection to install time. Instead of finding a bad package after it's already in your tree, it evaluates each dependency as it's installed and can allow, warn on, or block it inline.
How it works
The firewall runs as an install-time proxy fronting npm and pip. Package managers fetch through the proxy instead of hitting the upstream registry directly, so every request is evaluated before the package ever reaches your machine or build.
Because the proxy sits on the fetch path, coverage is transitive by construction - it sees every fetch, including transitive dependencies pulled in by your direct dependencies. There is no separate lockfile-parsing step to keep in sync; if a package is downloaded, it is checked.
What it checks
| Threat | How it's detected |
|---|---|
| Typosquatting | Package names that closely resemble a well-known package - including swapped or transposed characters - are flagged as likely impersonations (typo / look-alike detection). |
| Dependency / namespace confusion | Names that could resolve to a public package in place of an intended internal one - or that squat on an internal namespace - are caught. |
| Malware / blocklist | Packages matching known-malicious signatures or an explicit blocklist are stopped. |
| Behavioral analysis | A behavioral analyzer inspects the package archive statically - introspecting its contents without executing any code - to surface suspicious indicators before install. |
Enforcement modes
The firewall runs inline with three outcomes:
- Allow - the package passes and installs normally.
- Warn - the install proceeds but the decision is recorded and surfaced.
- Block - the install is refused.
It also supports:
- Audit mode - evaluate and record decisions without blocking, so you can measure impact before enforcing.
- Quarantine mode - hold a flagged package aside pending review rather than installing or hard-blocking it.
Auto-release loop
A quarantined package doesn't have to stay quarantined forever. The firewall re-evaluates held packages and auto-releases one once its verdict clears - for example, when a false-positive signal is corrected or a package is no longer flagged. Packages that never clear are aged out after a retention window (default 14 days), so quarantine doesn't accumulate stale entries.
Every decision is recorded to the audit trail with the package, the rule that fired, the mode, and the outcome - tenant/org-scoped.
Findings produced
Every non-allow decision becomes a dependency finding in the unified findings model, categorized by what fired (for example typosquat or behavioral). Each finding carries the ecosystem, package name and version, the category that fired, the mode, and - in audit mode - the verdict that would have been enforced. Transitive fetches are marked as such. Confirmed-malware and namespace-confusion decisions are the highest-severity outcomes; behavioral and novel-package signals are held in quarantine pending review.
Configuration
The Package Firewall is admin-toggleable via a feature flag, enforced server-side. Start in audit mode to baseline, then move to warn or block as confidence grows.
You enforce at whichever point fits your workflow - a local/CI proxy, a registry-fronting proxy in front of your Nexus or Artifactory, or the server-side runner - all sharing the same decision core. From the CLI:
# Local / CI proxy for npm and pip (modes: audit, quarantine)
safeguard pkgfw start --mode quarantine --port 8899
# One-shot check, printed as JSON (exit 1 on block)
safeguard pkgfw check --ecosystem npm --name left-pad --version 1.3.0The local proxy serves each ecosystem under its own path: /npm/<package> for npm (scoped names as /npm/@scope/name) and /pypi/simple/<package>/ for pip. Point each package manager at the ecosystem-prefixed URL, not the bare host and port.
# npm (registry setting)
npm config set registry http://127.0.0.1:8899/npm/
# pip (index setting)
pip config set global.index-url http://127.0.0.1:8899/pypi/simple/To make the setting persistent for a project or a CI job, put it in the package manager's config file:
# .npmrc
registry=http://127.0.0.1:8899/npm/# pip.conf (or ~/.config/pip/pip.conf)
[global]
index-url = http://127.0.0.1:8899/pypi/simple/Related
- Deep Dependency Scanning - transitive dependency analysis after install.
- Unified Findings & Feature Flags - how engines are toggled across the platform.
Runtime Protection (CWPP & CNAPP)
ATT&CK-mapped runtime threat detection rules and cloud-native risk correlation, surfacing findings that are running, reachable, exposed, and over-privileged all at once.
AutoTriage
Cross-scanner deduplication that collapses overlapping findings into one correlated finding.