Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.
Dependency FirewallPolicySupply Chain

Dependency Firewall

Understand how Dependency Firewall intercepts open-source artifacts and blocks unsafe dependencies before they enter your registry.

Your own code is not the only source of risk in your software. Most critical vulnerabilities in modern applications enter through third-party open-source dependencies, not through logic bugs in code your team wrote. Every npm install, pip install, or mvn compile that reaches the public internet is a potential ingestion point for malware, unpatched vulnerabilities, or packages that violate your license policy.

Dependency Firewall addresses this problem at the boundary where open-source artifacts enter your organization: the upstream proxy.

What Dependency Firewall is

Dependency Firewall is a policy enforcement layer that sits in front of every upstream proxy registry. When a developer or pipeline requests a package from an upstream proxy, Dependency Firewall intercepts the request, evaluates the requested artifact against your configured security policies, and decides whether to cache it and allow it, or block it entirely.

Think of it as a customs inspection for software packages. Packages that pass inspection enter your registry and become available for use. Packages that fail are turned back at the border.

Upstream proxies only

Dependency Firewall applies to upstream proxy registries, which fetch artifacts from external sources. It does not evaluate artifacts you push directly to a local registry.

How evaluation works

When a pull request arrives at an upstream proxy with Dependency Firewall enabled:

  1. Harness intercepts the request before caching the artifact.

  2. The artifact version is evaluated against all configured policy sets.

  3. Each policy in each policy set produces a result based on its configured fail action.

  4. The artifact receives one of three verdicts:

Verdict
Meaning
What happens

Passed

All policies satisfied

Artifact is cached and available

Warning

At least one "warn and continue" policy failed

Artifact is cached but flagged; optionally quarantined

Blocked

At least one "error and exit" policy failed

Artifact is not cached; the pull request fails

A blocked artifact is never stored in your registry. Subsequent pull attempts for the same version will also fail until an exemption is granted.

The five built-in policy templates

Harness provides five policy templates designed specifically for supply chain security. You can use them out of the box or customise the thresholds for your organisation.

CVSS threshold

Blocks or warns on packages with known vulnerabilities above a configurable severity score. A CVSS score of 7.0 or above is the most common enterprise threshold for mandatory blocking. Use this policy to prevent packages with critical or high-severity CVEs from entering your environment.

License policy

Enforces license compliance by comparing each package's declared license against an approved list or a blocked list. Common use cases include blocking packages with GPL or AGPL licenses in commercial products, or allowing only MIT, Apache 2.0, and BSD licenses.

Package age

Newly published packages carry a statistically higher risk of containing malicious code. The Package Age policy quarantines packages that were published within a configurable window, such as any package published in the last 7 days. After the cooldown period passes, the package can be re-evaluated.

OSS risk level

Evaluates the health of the open-source project behind the package: Is it actively maintained? Has it reached end-of-life? Does it have a low aggregate health score based on contributor activity, issue response time, and other signals? Packages with poor health scores may introduce long-term maintenance risk even if they have no current CVEs.

Malicious package

Compares each package against a threat intelligence database of packages that have been identified as intentionally malicious, including typosquatted packages, dependency confusion attacks, and known supply chain compromises. This database is refreshed automatically every 4 hours.

Go to Built-in policy templates for thresholds, detection methodology, and recommended combinations.

The first-pull vulnerability window

Dependency Firewall scanning is asynchronous. When a developer pulls a package that has never been cached before, the pull completes before scanning finishes. If the package turns out to be malicious or vulnerable, it has already been delivered before the verdict is available. Subsequent pulls of the same version are correctly blocked.

This first-pull window is a deliberate tradeoff: synchronous scanning on every first pull would add latency to every build. The practical risk is bounded. The package is evaluated and blocked within seconds of that first pull, and subsequent consumers are protected.

For environments where even a single delivery of an unscanned package is unacceptable, use the staging-registry pattern.

The staging-registry pattern

Create two upstream proxies for each external registry you depend on: a staging proxy and a production proxy.

  1. New packages are pulled through the staging proxy. Dependency Firewall evaluates them.

  2. Monitor the Dependency Firewall dashboard for the verdict. Wait for Passed.

  3. Promote the approved version to the production proxy using Copy Version.

  4. Production pipelines pull only from the production proxy.

No unscanned package ever reaches production. The staging proxy absorbs the first-pull window; the production proxy receives only pre-approved artifacts.

To investigate blocked packages and their policy violations, go to View and triage violations.

Use cases

Blocking all packages with critical CVEs

Create a CVSS Threshold policy set with a blocking threshold of 7.0. Attach it to every upstream proxy in your account. Any package with a known CVE at High or Critical severity is blocked before it reaches a developer's machine or a CI build.

Quarantining freshly published packages

A widely cited supply chain attack pattern involves registering a package with a name similar to a popular library and publishing it within hours of a real release. Configure a Package Age policy with a 7-day cooldown. Any package published in the last week is quarantined automatically, regardless of its vulnerability score. After 7 days without a security flag in the threat database, the package passes automatically.

Enforcing permissive-only licenses

Your legal team has approved MIT, Apache 2.0, and BSD licenses for production use. Configure a License Policy that blocks any package with a GPL, AGPL, or LGPL license. Every npm, pip, and Maven package fetched through your upstream proxies is evaluated before it is cached.

Last updated

Was this helpful?