GitHub Package Firewall can block risky npm packages before installation
GitHub has launched Package Firewall in public preview. It inspects npm metadata and downloads for CI/CD runners and coding agents. Here is an adoption plan for organisations.
- AUTHOR
- Karol Rapacz / CEO of Breachroad · OSCP · PNPT
- PUBLISHED
- 21 October 2026
- READING TIME
- 10 min read
- TOPIC
- Supply Chain Security
GitHub has introduced Package Firewall in public preview. The service sits between an endpoint such as a GitHub Actions runner or coding agent and an upstream package registry. It evaluates both metadata requests and downloaded archives before a dependency reaches the CI/CD host or developer environment.
The first release supports npm only and is available to all GitHub Enterprise Cloud customers, including those using data residency. The preview is free. GitHub says general availability will introduce metered usage similar to Actions billing.
Breachroad’s conclusion: the firewall can reduce the chance of installing newly published malware, but it is not an automatic shield for every repository. An organisation must route the relevant endpoints through the service, design policy and retain the rest of its software supply-chain controls.
Why the installation boundary matters
A malicious package does not need to wait until an application runs in production. npm install scripts can execute during npm install or npm ci, on a developer machine or CI runner. Those environments often hold repository tokens, registry credentials, signing keys, cloud variables and permissions to publish release artefacts.
Traditional dependency scanning often starts once a specific version and an advisory are known. Package Firewall introduces a policy enforcement point before download or installation. It can therefore stop some risks earlier and apply one control across many endpoints.
It cannot eliminate the timing problem. A new package may be malicious before anyone adds it to a threat database. A legitimate project today may be compromised tomorrow. The firewall should narrow the trust window, not create the belief that every allowed archive is safe.
How GitHub Package Firewall works
An enterprise administrator defines controls, and a runner or agent is configured to ask the firewall instead of contacting the public registry directly. GitHub currently identifies three groups of controls:
- a configurable cooldown period that delays very new package releases;
- checks against the GitHub Advisory Database for malware and vulnerability alerts;
- supply-chain checks such as attestation downgrades.
Package-list and version metadata requests pass through the service alongside the package files themselves. If a legitimate dependency is blocked, a user can request an exception through a workflow similar to other GitHub Advanced Security features.
The configuration boundary is important. Enabling enterprise policy does not automatically alter every laptop and runner. Each endpoint needs the correct routing and client configuration. Teams must also check whether an internal registry, cache or proxy creates an alternative path that bypasses enforcement.
Who is likely to benefit most
The strongest use case is an organisation with many JavaScript or TypeScript repositories, shared runners and teams that use AI coding agents. Central policy reduces the need to reproduce package rules in each project.
Package Firewall is particularly relevant when:
- many pipelines download dependencies directly from the internet;
- CI tokens have broad cloud or publishing permissions;
- the organisation does not yet operate a controlled internal repository;
- coding agents can add dependencies autonomously;
- teams want a waiting period before a new version becomes eligible.
The incremental value may be smaller where all traffic already passes through a mature internal repository with quarantine, approvals, signatures and immutable artefacts. Even there, the GitHub service could add a signal, but teams should compare coverage and operational cost.
What the public preview does not solve
The largest current limitation is npm-only support. Projects relying on PyPI, Maven Central, NuGet, RubyGems, crates.io or container registries still need separate controls. A package retrieved outside the configured route will not be assessed by the service.
The firewall also does not replace:
- lockfiles and deterministic installation;
- restrictions on package lifecycle scripts;
- least-privilege CI tokens;
- isolated, short-lived runners;
- secret and code scanning;
- SBOMs, provenance attestations and signatures;
- human review of dependency changes;
- runtime observation during a build.
Public preview also means that capabilities, performance, limits and pricing can change. Before critical pipelines depend on the service, decide what happens during an outage: should installation stop, use an approved cache or bypass the firewall? A default bypass is convenient but removes the control precisely when conditions are uncertain.
A safe pilot plan
1. Map dependency traffic
Identify the runners, agents and workstations that fetch npm packages. Record their registries, proxies, caches, client versions and use of lockfiles. Without that map, a pilot may protect the easiest path while leaving the most valuable one untouched.
2. Start with a bounded group
Choose several active repositories without placing a business-critical release in the first hour of the pilot. Measure latency, cache compatibility, blocked requests and monorepo behaviour. Include both ordinary builds and agent-driven automation.
3. Set the cooldown policy deliberately
There is no universal delay that works for every dependency. A longer cooldown reduces exposure to brand-new malware but can postpone a security fix. The exception process should distinguish a feature upgrade from an urgent patch and name the person accountable for the decision.
4. Design expiring exceptions
An exception should record the package and version, reason, repository, owner, expiry time and verification evidence. A permanent allow rule without review will turn the firewall into a historical list of workarounds.
5. Limit the impact of anything that passes
An allowed package may still be harmful. Runners should be ephemeral, stripped of unnecessary secrets, restricted in outbound access and equipped with short-lived, task-specific tokens. Coding agents should not install arbitrary dependencies in an environment that can reach production.
6. Measure enforcement and bypass paths
Monitor blocks, exceptions, failed installs, build duration and direct registry connections that avoid the service. The pilot should include a controlled package that policy is expected to block and an approved exception. Only then can the team show that the architecture works, rather than merely that a toggle was enabled.
Decisions for security and business leaders
Leaders need answers to four questions: which pipelines are covered, what happens during an outage, who approves exceptions and what usage may cost after preview. Security teams also need threat-intelligence sources, log retention and incident-correlation paths. Developers need clear errors and a fast, understandable appeal process.
Define measures before rollout: the percentage of npm installations that cross the firewall, true and false blocks, median exception time and direct-registry bypass attempts. Those figures make it possible to judge the control without treating deployment as the purchase of one more feature.
Source facts and Breachroad’s analysis
GitHub confirms public-preview availability for Enterprise Cloud, npm support, inspection of metadata and files, cooldown, advisory and attestation policies, an exception workflow, free preview access and planned metered billing at general availability.
The pilot design, runner requirements, measures and bypass controls above are Breachroad recommendations. Teams can turn similar supply-chain scenarios into shared decisions through cybersecurity training for organisations, while an IT security audit can examine CI/CD and supplier exposure.
Primary source: GitHub Changelog — GitHub package firewall in public preview.
