GitHub Blog

我们如何将恶意软件通告扩展到npm之外

GitHub的Dependabot现在通过构建针对OpenSSF恶意软件包仓库的导入器,将恶意软件通告支持扩展到八个包生态系统。导入器会验证、规范化并去重记录,同时通过批次上限、来源追踪和回滚等措施防范潜在不良数据。用户可选择启用恶意软件警报。

状态已摘要
抓取快照1
AI 输出2
开放问题0

已验证摘要

英文摘要

How we took malware advisories beyond npm

GitHub's Dependabot now supports malware advisories across eight package ecosystems by building an importer for OpenSSF's malicious-packages repository. The importer validates, normalizes, and deduplicates records, with safeguards like batch caps, provenance tracking, and rollback to handle potential bad data. Users can enable opt-in malware alerts.

  • Dependabot now covers malware advisories for npm, PyPI, Maven, RubyGems, NuGet, Go, crates.io, and Packagist.
  • The solution uses a single importer for OpenSSF's malicious-packages repository instead of building eight detection systems.
  • Importer validates OSV records, normalizes ecosystem names and version ranges, and drops round-tripped GitHub advisories.
  • Security layers: batch caps halt runs on unexpected volume, provenance ties each advisory to an upstream commit, and rollback reverses batches as a unit.
  • Malware alerts are opt-in and backfill existing dependencies when enabled.

中文摘要

我们如何将恶意软件通告扩展到npm之外

GitHub的Dependabot现在通过构建针对OpenSSF恶意软件包仓库的导入器,将恶意软件通告支持扩展到八个包生态系统。导入器会验证、规范化并去重记录,同时通过批次上限、来源追踪和回滚等措施防范潜在不良数据。用户可选择启用恶意软件警报。

  • Dependabot现在支持八个包生态系统的恶意软件通告,包括npm、PyPI、Maven、RubyGems、NuGet、Go、crates.io和Packagist。
  • 解决方案使用单一导入器处理OpenSSF的恶意软件包仓库,而非构建八个检测系统。
  • 导入器验证OSV记录,规范化生态系统名称和版本范围,并跳过GitHub自身产生的循环数据。
  • 安全防护包括批次上限、来源追踪和整体回滚,以防上游数据出现问题。
  • 恶意软件警报为可选功能,启用后会回溯检查现有依赖。

GitHub Advisory Database / malware / npm / open source / supply chain security / Dependabot

完整文章

Ankit Kumar Honey · @honeyankit

August 6, 2026|

5 minutes

Share:A compromised package can steal credentials the moment you install it, and until recently, GitHub could only flag those in npm. Not anymore. This is the story of how the supply chain engineering team behind Dependabot expanded malware advisories to eight ecosystems by building on OpenSSF’s shared malicious packages data.Here’s where things stand: earlier this year, Dependabot started flagging malware in your npm dependencies . Great news if you write JavaScript. Now we’re bringing that same functionality to PyPI.We’ve enhanced the GitHub Advisory Database to ingest malware reports from OpenSSF’s malicious-packages repository , which means malware advisories and the Dependabot alerts they power cover all eight major package ecosystems: npm, PyPI, Maven, RubyGems, NuGet, Go, crates.io, and PHP Composer. I lead the Dependabot team in GitHub’s supply chain security organization, and in this post, I’ll show you how this pipeline works.From one ecosystem to eightThe Advisory Database has imported vulnerability data from external sources for years. RubySec for gems, RustSec for crates, PyPA for Python. Each one is an importer that reads a public advisory repo and maps records into our database. Malware was the odd one out: it flowed through a separate, internal, npm-only path, built around GitHub’s own detection of malicious npm packages.Expanding the existing detection from one to eight supported ecosystems would have taken us years. Meanwhile, OpenSSF has already solved the aggregation problem for everybody. Their malicious-packages repo launched in 2023, with over 15,000 reports in OSV format. Since then, it has grown every day, fed by community submissions and automated detection sources across the industry: typosquats, dependency-confusion packages, account takeovers, malicious prebuilt binaries. It’s public, it’s structured, and it covers any ecosystem the OSV schema supports.So, the design nearly wrote itself. Rather than building eight unique detection systems, we built one importer.The importerWe reused the same pattern our repo-based importers already followed to walk the source repository’s file tree, pick up files changed since the last run, and process each one. The new OpenSSF importer reads every OSV record and validates the required fields, types, and format against the schema before anything touches the database. A record that fails this validation gets rejected and logged. It’s never quietly patched up and waved through, because a “mostly valid” malware advisory is exactly the kind of thing that bites you six months later.Valid records get normalized into feed entries: the source, an identifier, a CVE ID when one exists, the complete upstream record preserved as a snapshot, and the mapped subset from our publishing pipeline consumes.Normalizing sounds boring until you meet the data. Upstream ecosystem strings don’t always match ours (the repo says PyPI , our database says pip ). OSV records list affected versions as discrete values where we think in ranges, and some records name no usable version at all. The details field is frequently empty, and when several sources report the same package, their write-ups get appended into one blob. Reports also get retracted: the repo keeps a whole osv/withdrawn folder for advisories that turned out to be wrong, so the importer must cope with a package being flagged on Monday and disavowed on Wednesday.Then there’s the dedup problem, and it’s a fun one. GitHub is itself a contributor to the OpenSSF repo; our own npm malware advisories flow upstream into it. Import the repo naively, and we’d be re-importing our own data in a loop. The fix rides on OSV’s origin metadata: every entry in malicious-packages records where the report came from, and anything tagged ghsa-malware began with us. The importer drops those before a feed entry is ever created.When we validated against live data, more than half of the new npm reports flowing into the repo each month traced back to our own advisories and were skipped as round-trips, so what the importer picks up is the stuff we genuinely didn’t know about.Advisory ingestion workflow and security precautions we’re takingOne question dominated our security review: what happens if the upstream data goes bad?Malware advisories auto-publish. No human reads each one before it goes out, and that’s deliberate. When a package is stealing credentials right now , a review queue measured in days is a gift to the attacker. The deliberate departure is that these auto-published advisories can now generate Dependabot alerts. Our unreviewed advisories were already published automatically, but this is the first time an auto-published advisory can trigger an alert, and it’s worth being clear about why.My colleague Madison Ficorilli recently wrote about what “reviewed” actually means for advisories about vulnerabilities: human curators verifying package mappings, version ranges, and severity before anything ships. That rigor earns its delay when the question is which versions of a library are vulnerable. Malware is a different beast. The report is close to binary (this package is hostile), and hours matter more than nuance. The design assumes the upstream feed could one day carry bad data: a false report flagging a legitimate, widely used package as malware, a record with the wrong package name, or a whole batch published from a compromised source.So, we built a resilient ingestion pipeline with three layers of protection for exactly that day. Here’s how they work.Batch caps: Make it, so each import run has a configurable ceiling on how many advisories it may create. Blow past it and the run doesn’t trim to fit—it halts completely, publishes nothing, and pages us with the exact count. A run that suddenly wants five times the usual volume isn’t throughput. It’s a red flag.Provenance: Every record also carries provenance. Each imported advisory traces back to the exact upstream commit in the malicious-packages repo, so during an incident we can tell in minutes whether a bad advisory came from a legitimate (if wrong) upstream report or something more deliberate.Rollback: If a poisoned batch somehow lands anyway, we don’t go hand-picking advisories out of the database. Every batch is identifiable and revertible as a unit. One rollback, clean slate.What this means for youDependabot and GitHub will now alert you if you use a malicious dependency across most package ecosystems.Malware alerts are opt-in: enable them in your repository, organization, or enterprise security settings. Dependabot will match your dependencies against malware advisories in the Advisory Database, including a backfill against existing advisories, starting the moment you turn it on.Enable Dependabot malware alerts for your repositories >Tags:

GitHub Advisory Database

malware

npm

open source

supply chain securityWritten byAnkit is a Senior Engineering Manager at GitHub, where he leads the Dependabot team in the Supply Chain Security organization. Dependabot watches over 30M+ repositories across 34+ package ecosystems, which keeps him appropriately paranoid about supply chain attacks.Related postsEngineering

Tame Dependabot: Group your updates, slow the cadence, keep security fastDependabot keeps your dependencies current, but its defaults can flood your repository with pull requests. Here’s how grouping updates, slowing the cadence, and keeping security fixes fast cut the noise on a Microsoft open source project.Security

Disrupting supply chain attacks on npm and GitHub ActionsExplore the changes we’ve shipped across npm and GitHub Actions over the past few months to disrupt supply chain attack techniques and limit their impact.Security

The case for a cooldown: Why Dependabot now waits before issuing version updatesA new default three-day cooldown delays version update pull requests so maintainers and security researchers can address findings in a release before it gets into your code.We do newsletters, tooDiscover tips, technical guides, and best practices in our biweekly newsletter just for devs.Your email address

抓取快照

用于解析和审计的抓取证据。

200 · text/html; charset=UTF-8

2026/08/07 08:01

f3d84aa73e7ddf17c6683382e281948eb9a0b04c3948e4654badee529fd1c9cc

AI 输出

带验证状态的结构化模型输出。

article.summarize

deepseek-v4-flash · 有效

{"tags":["GitHub Advisory Database","malware","npm","open source","supply chain security","Dependabot"],"titleEn":"How we took malware advisories beyond npm","titleZh":"我们如何将恶意软件通告扩展到npm之外","summaryEn":"GitHub's Dependabot now supports malware advisories across eight package ecos...
article.classify

deepseek-v4-flash · 有效

{"relevant":true,"confidence":0.95,"primaryTopic":"software-engineering","secondaryTopics":["product-updates"]}

质量问题与日报引用

开放或已解决的问题,以及文章出现在每日日报中的记录。

日报

Signal Hub 2026-08-07

将 Dependabot 恶意软件警报扩展到更多生态系统,通过强大的验证机制应对开源供应链风险。 (score: 0.88)

排序 22026/08/07 00:00草稿