1. News
  2. Releases
  3. GitHub · Security
ReleaseGitHub · Security2 min read

GitHub adds a safety gate to stop booby-trapped code downloads

GitHub is testing a firewall that blocks suspicious or brand-new npm code from installing, a step aimed at poisoned updates that slip into business software.

By the Dashline deskSource: The Hacker News
GitHub adds a safety gate to stop booby-trapped code downloads
Photo: Marc Mueller seven11nash, CC0

GitHub has started a public preview of a package firewall. It checks free code libraries from npm, a huge public collection developers pull from, and blocks suspicious ones before they install. The goal is to stop booby-trapped updates from reaching company computers and build systems.

What it does

The firewall sits between a company's machines and the public npm registry. GitHub says it inspects both requests for package details and the downloads themselves for signs of malicious activity. It acts as a gate that applies company rules at the moment of installation.

That matters because installs are often automatic. AI coding agents and CI runners, which are automated systems that build software, can pull in code without a person approving each piece. The firewall is meant to catch bad packages in that flow.

The waiting period

Administrators set the rules. One key rule is a cooldown, which blocks any version newer than a chosen age. It can be set from 1 to 365 days. The default is 1 day, and setting it to 0 turns it off. The firewall also checks downloads against malware advisories.

The idea is simple. Attackers sometimes take over a maintainer's account and publish a poisoned version of a popular package. A delay gives researchers and registries time to spot it before it spreads.

Who it is for

  • The preview supports npm packages only.
  • It is open to all GitHub Enterprise Cloud customers, including the data-resident version.
  • If a safe package is blocked by mistake, users can request an exception.
  • Enterprise administrators and security managers approve those requests.

The material does not say what the firewall will cost after the preview or when it will be generally available.

A wider trend

GitHub is not alone. Rust 1.100, scheduled for November 12, 2026, will add a setting for a minimum publish age, with a seven-day default. Over the past year, similar waiting periods have appeared in npm, Python, Visual Studio Code, Ruby, Bun, pnpm and Yarn.

The tradeoff

Waiting has a cost. Security firm Socket noted that legitimate fixes have to wait too, unless developers make an exception. It also warned that malicious code does not become harmless with age, so a release that escapes detection can outlast the cooldown. The value is in buying time for others to act.

The takeaway

If your business builds software, ask your developers whether new code versions face a waiting period, and how urgent fixes get through.

More articles

You should really read these.

Next step

Let’s talk