Skip to Content

What is a dependency firewall?

How the Bytesafe Dependency Firewall works, what it protects against, and where it fits next to SCA tools and repository managers.

A dependency firewall lets you control which packages developers and builds can download. It fetches packages from the sources you configure and checks your rules before serving them. You can make exceptions for packages a rule would otherwise block.

The firewall also checks packages after serving them. Every day, package versions served in the last 30 days are looked up in the latest advisory and malware data, and a team you choose gets an alert when a new vulnerability or malware report turns up. See Get risk alerts after download.

Firewall processing
Package manager request
Firewall receives request
Fetch metadata or artifactfrom configured upstream
Evaluate rules and exceptionsfor the execution phase
Return errorlog if configured
Serve responseallowed or filtered

How it works

Each firewall endpoint proxies one package ecosystem. A typical setup has one firewall per ecosystem, or several per ecosystem when teams need different policies.

A firewall consists of:

  • Upstreams. The registries the firewall fetches from, such as registry.npmjs.org or a private registry. Upstreams can be marked internal to protect your own package names, and cached so repeat requests are served from the firewall's own copy.
  • Rules. Policy statements evaluated against every request. A rule combines an execution phase (version resolution, download, or upload), a selector that decides which packages it applies to, and an effect (block, log, or both).
  • Exceptions. Scoped waivers attached to a rule. When a rule blocks a package you need anyway, an exception allows that specific package through, with a documented reason and optional expiration.
  • Logs. Every rule match is recorded: who requested what, which rule fired, and whether the request was blocked.
  • Observations. Every package version the firewall served, with when and how often. Versions served in the last 30 days are monitored daily for new risks.

A rule can filter a version from the list an install tool sees or block a download. The install can still finish if the tool can use another version. Investigate a blocked install shows how to trace an error back to the rule that caused it.

Send package requests through the firewall

Tools like npm and pip send requests to package registries when they look up versions or download packages. The firewall applies your rules only to requests that pass through it. There are three ways to send them there.

OptionHow it worksWhat it covers
Proxy chainingYour company web proxy forwards requests for public registries to Bytesafe. Package managers keep their public registry settings.Every developer, CI job, and AI agent that uses the company proxy, with no per-machine setup
Direct setupYou set the registry URL in npm, pip, or another package manager to the firewall URL.Installs that use that setting. Commit it to the project or CI configuration so it applies beyond one machine
CLI wrapperYou put bsfw in front of an install command, such as bsfw npm install. When it finishes, it shows which rules fired.Only installs run with bsfw

Direct setup and the CLI wrapper are not enforced on their own: an install that skips them goes straight to the public registry. Proxy chaining covers everything behind the company proxy. Bytesafe enables it per organization on request. To make the firewall the only route to public packages, see Enforce firewall use.

Not every option is available in every ecosystem. See routing support by ecosystem.

What you can enforce

Rules can target package metadata, security signals, publish timing, and request context. Common policies include:

  • Delay newly published versions, so the ecosystem has time to catch malicious releases before your builds pick them up. See Delay new versions.
  • Block packages with known vulnerabilities above CVSS or EPSS thresholds. See Block vulnerable packages.
  • Block packages flagged as malware.
  • Block deprecated, yanked, or unlisted releases.
  • Block packages by license, with named license sets as deny or allow lists. See Enforce license policy.
  • Block publishes of packages containing leaked credentials. See Scan for secrets on publish.
  • Protect internal package names against dependency confusion by resolving them only from internal upstreams.

Where it fits

  • Compared to SCA scanners. A scanner tells you after the fact that a vulnerable package is in your tree. The firewall stops it from entering. The two answer different questions, and many teams run both: the firewall as the gate, a scanner for inventory and depth.
  • Compared to repository managers. Repository managers such as Artifactory and Nexus mirror and host packages. The firewall does not host packages of its own; it applies policy to requests as they pass through. It can sit in front of or beside a repository manager. See Integrate with repository managers.

Next steps

Follow the quickstart to set up your first firewall, or read rule evaluation for the mental model behind rules, selectors, and exceptions.