I will find you and I will flag you: hunting malicious packages at scale
Christophe Tafani-Dereeper (Datadog)
SEC-T 2026 · Day 2 · Main hall
Overview
In this compelling talk at SEC-T, Christophe Tafani-Dereeper, a Staff Security Engineer at Datadog, unveiled the escalating threat of supply chain attacks targeting open-source package ecosystems like NPM and PyPI. Titled "I will find you and I will flag you: hunting malicious packages at scale," the presentation delved into the intricacies of how seemingly innocuous dependencies can introduce significant security risks into modern software development. Tafani-Dereeper highlighted the alarming statistics surrounding transitive dependencies and rapid release cycles, emphasizing the difficulty organizations face in tracking and securing their vast software supply chains.

Key moments
- 0:00 The scale of the supply chain security problem
- 2:00 Rising threats: maintainer compromise and CI/CD attacks
- 5:20 Datadog's approach to detecting malicious packages
- 10:30 Internal security strategy: centralized consumption, secrets, hygiene
- 15:00 Using AI agents to triage suspicious packages
- 19:00 The hidden danger of transitive dependencies and lock files
- 22:00 New open-source tool for automated dependency impact analysis
- 27:50 Addressing AI hallucination risks in security triage
I will find you and I will flag you: hunting malicious packages at scale
Speakers: Christophe Tafani-Dereeper, Staff Security Engineer, Datadog
Conference: SEC-T
YouTube: https://www.youtube.com/watch?v=kPR989kH3Ak
Overview
In this compelling talk at SEC-T, Christophe Tafani-Dereeper, a Staff Security Engineer at Datadog, unveiled the escalating threat of supply chain attacks targeting open-source package ecosystems like NPM and PyPI. Titled "I will find you and I will flag you: hunting malicious packages at scale," the presentation delved into the intricacies of how seemingly innocuous dependencies can introduce significant security risks into modern software development. Tafani-Dereeper highlighted the alarming statistics surrounding transitive dependencies and rapid release cycles, emphasizing the difficulty organizations face in tracking and securing their vast software supply chains.
The talk not only illuminated the problem but also offered practical, scalable solutions developed and implemented by Datadog. Tafani-Dereeper shared insights from Datadog's extensive telemetry, revealing the common attack vectors, such as compromised maintainer accounts and CI/CD pipelines, that are increasingly leading to the distribution of malicious packages and supply chain worms. This article explores the technical mechanisms behind these attacks, Datadog's innovative detection and prevention strategies, and the critical defensive implications for organizations striving to bolster their software supply chain security.
Background
▶ Watch: The scale of the supply chain security problem (0:00)
The modern software landscape is characterized by a pervasive reliance on open-source packages, a convenience that paradoxically introduces significant security vulnerabilities. Tafani-Dereeper illustrated this with the is-number NPM package, a trivial 10-line utility boasting 173 million weekly downloads and 40 million dependent repositories. Its widespread adoption stems from its transitive inclusion by popular projects like webpack-dev-server and nodemon, creating a deep and often invisible dependency chain. Datadog's telemetry from thousands of services revealed that the median NPM service has 129 dependencies, with a staggering 78% being transitive—dependencies unknown to the end user. Compounding this risk, 60% of organizations deploy NPM dependencies released within the past 24 hours, meaning newly introduced vulnerabilities or malware can propagate into production environments with alarming speed.
The threat landscape has evolved significantly, particularly since 2022. Attackers are increasingly targeting key points in the software supply chain: source code, CI/CD pipelines, and artifact registries. A prominent trend is the compromise of open-source maintainers. These individuals, often hobbyists with less robust security postures, are targeted through sophisticated phishing campaigns (e.g., npmjs.com phishing), leading to the theft of NPM tokens or GitHub credentials from their compromised machines. Notable incidents include the Axios breach and the recent Kiwi situation (Chaindrop worm), where maintainer machines were compromised, and tokens were stolen to upload malicious package versions.
Another burgeoning attack vector is the exploitation of CI/CD pipelines. Attackers seek code injection vulnerabilities within these pipelines to steal credentials (NPM, GitHub tokens) and publish backdoored packages. A striking example from July involved a malicious commit that exploited a CI pipeline configured to execute JavaScript code within a Markdown file, allowing the attacker to steal an NPM token and compromise packages with millions of downloads. The rise of supply chain worms, such as Shy Hulud and the recent Chaindrop worm, which infected over 400 packages, further underscores the severity of this threat. These worms typically compromise a machine, steal NPM tokens, enumerate maintained packages, and then systematically backdoor and publish new malicious versions, echoing warnings from a 2016 blog post about the looming threat of NPM worms.
Key Findings
▶ Watch: Datadog's approach to detecting malicious packages (5:20)
Tafani-Dereeper's presentation highlighted several critical findings regarding the nature of supply chain attacks and effective countermeasures. Firstly, the sheer scale and speed of modern software development, coupled with the deep reliance on transitive dependencies, create an environment ripe for exploitation. Malicious packages, once introduced, can quickly infect a vast ecosystem before detection. The speaker emphasized that maintainer and CI/CD pipeline compromises are now primary vectors for injecting malware, often leveraging short-lived or easily obtainable credentials.
A significant finding is that traditional security measures are often insufficient due to the unique characteristics of package ecosystems. For instance, the common misconception around NPM lock files was debunked: they do not inherently protect against malicious transitive dependencies because the lock file of a dependency is not shipped with its tarball. This means a project relying on a compromised dependency with a broad version specifier (e.g., ^1.13.0) can still pull a malicious version, even if its direct dependencies appear "locked."
To combat these challenges, Datadog's research led to the development of a scalable, multi-faceted detection and blocking strategy. This includes leveraging both static and dynamic analysis, correlating metadata, and employing advanced AI agents for intelligent triage. A key contribution is the open-sourcing of tools like GuardDog for package scanning, Supply Chain Firewall for proactive blocking, and a newly released tool that automates the analysis of the deps.dev dataset to accurately assess the transitive impact of compromised packages. These findings underscore the necessity for proactive, automated, and deep-seated security controls across the entire software supply chain.
Technical Deep Dive
▶ Watch: Using AI agents to triage suspicious packages (15:00)
Datadog's approach to hunting malicious packages at scale is built on a robust pipeline that scrapes, scans, and triages new package releases across NPM and PyPI.
1. Package Scraping:
For NPM, the process is streamlined by its underlying CouchDB change API. NPM effectively acts as an append-only log, allowing continuous scraping by querying replicate.npmjs.com with the latest sequence number (e.g., replicate.npmjs.com/_changes?since={sequence_number}). This provides a reliable and complete stream of all package updates. PyPI offers RSS feeds, which are easier to access but less reliable for real-time, comprehensive scraping due to fixed item limits that can lead to missed updates during bursts of activity.
2. Scanning Data Sources:
Once packages are scraped, they are subjected to multi-source analysis:
- Registry Metadata: Fast to analyze, looking at author, download counts, maintainer email. While quick, it can be noisy for rule derivation.
- Source Code: Direct analysis of the package's code.
- Dynamic Analysis: Running the package in a sandboxed environment to observe its behavior. This is particularly useful for highly obfuscated malware or during incident response.
3. GuardDog: Open-Source Package Scanner:
Datadog developed and open-sourced GuardDog, a tool that inspects both metadata and source code of NPM and PyPI packages. It assigns a risk score from 0 (benign) to 10 (suspicious) based on heuristic rules and correlation. Key heuristics include:
- Diffs between versions: Detecting suspicious changes like new, weird dependencies, changes in publishing methods (e.g., from OIDC to non-OIDC), or the addition of an
installscript. - Source code analysis: Initially using Semgrep, GuardDog transitioned to Yara for its efficiency with large files, detecting malicious patterns within the code.
The results are fed into an open dataset of over 28,000 known malicious packages, available on GitHub, serving as a community resource and benchmark.
4. Supply Chain Firewall:
To proactively block known threats, Datadog developed the Supply Chain Firewall. This open-source tool functions as a bashrc alias, intercepting npm install and pip install commands. It checks installation candidates against osv.dev malware advisories and Datadog's malicious package dataset. If a package is identified as malicious, it's blocked; otherwise, the request is forwarded to the original registry.
5. Datadog's Internal Security Pillars (for 8,000+ employees, 3,000 engineers):
- Centralized Package Consumption: All package requests from developer laptops and CI pipelines are routed through a central proxy. This allows for caching, telemetry, and critical dependency cooldowns, introducing a delay (e.g., a few hours) before new packages are available, giving time for community detection of malware.
- Proactive Malware Blocking: Both client-side (Supply Chain Firewall) and server-side (registry proxy) blocking of known malicious packages.
- Elimination of Long-Lived Secrets: This is a crucial defense.
- Developer Laptops: Engineers run credential scanning tools and receive weekly Slack notifications for detected secrets. DevEx tooling ensures minimal need for long-lived credentials (e.g., no GitHub PATs, no local Datadog credentials). Tools like the GitHub CLI store refresh tokens securely in the keychain instead of long-lived access tokens.
- CI/CD Pipelines: Emphasis on short-lived credentials and role-based access.
- Source Code Hygiene & CI Controls:
- Signed Commits: Prevents unauthorized code pushes even if a GitHub token is leaked.
- Peer Approval & Branch Protection: Ensures malicious code cannot be directly merged into main branches.
- Signed Artifacts: For containers and Kubernetes, enforcing signed images at runtime via a validating admission controller ensures that only images built through approved CI processes (and their associated controls) can be deployed.
6. AI Agents for Triage:
To handle the scale of new packages, Datadog employs a two-layered AI agent architecture for triage:
- Layer 1 (Fast & Cheap): A simple agent using a cost-effective, fast model (e.g., GPT-5 mini). Its primary goal is to quickly determine if a package is confidently benign or if it requires escalation. The model is intentionally biased towards escalating to minimize false negatives.
- Layer 2 (Intelligent & Expensive): If escalated, a second agent uses a more powerful, expensive model equipped with extensive tools (e.g., GitHub API access, file diffing, source code inspection). This agent can perform deeper investigations and, if necessary, escalate to a human analyst.
This tiered approach optimizes cost and speed by only applying expensive analysis to genuinely suspicious cases.
7. Impact Assessment with deps.dev:
Understanding the full impact of a compromised package (e.g., the Axios incident with its 3-hour window of compromise) is challenging due to NPM's lock file behavior for transitive dependencies. Datadog leverages Google's deps.dev dataset, a public database of package dependencies across ecosystems, releasing snapshots periodically. By running SQL queries on this dataset, security teams can build a comprehensive graph of all packages that, directly or transitively, would resolve to a malicious version during a specific compromise window. This involves:
- Identifying direct dependencies on the compromised package and their version constraints.
- Pruning the graph to exclude versions that do not resolve to the malicious one.
- Iteratively expanding the graph to include transitive dependencies, applying the same pruning logic.
This process reveals the true blast radius, extending far beyond direct dependencies.
Demo / Proof of Concept
▶ Watch: The hidden danger of transitive dependencies and lock files (19:00)
The talk showcased several practical tools and methodologies developed by Datadog, which serve as demonstrations of their capabilities:
- GuardDog: Described as an open-source project, GuardDog's functionality was detailed, showing how it scans NPM and PyPI packages for suspicious metadata and source code patterns. The speaker explained its scoring mechanism (0-10) and the heuristics it employs (e.g., detecting new install scripts, OIDC changes, weird dependencies in diffs), effectively demonstrating its role in identifying potentially malicious packages. The existence of an open dataset of 28,000+ malicious packages, populated by GuardDog's findings, further serves as a proof of concept for its effectiveness.
- Supply Chain Firewall: This open-source tool was presented as a client-side defense mechanism. Its operation as a
bashrcalias interceptingnpm installandpip installcommands to block known malicious packages was clearly articulated. This demonstrates a practical, deployable solution for preventing the installation of identified threats.
- Automated Impact Assessment Tool (using deps.dev): A significant demonstration was the introduction of a new open-source project, released specifically for SEC-T, which automates the process of assessing the transitive impact of compromised packages. The speaker walked through the logic of using Google's
deps.devdataset to build a dependency graph. He illustrated this with the Axios compromise, showing how the tool can identify not just 71 direct dependencies, but a much larger set of transitive dependencies that would have pulled the malicious Axios version during its 3-hour window of compromise. The tool takes a list of compromised package names and versions as input and computes the full graph of affected packages, providing valuable insights for both research and incident response. The speaker also mentioned dropping data for the Chaindrop worm, which affected 444 packages, further demonstrating the tool's utility for large-scale incidents. A demo file is provided for easier local execution without needing to download the entiredeps.devdataset.
These tools, while not live-coded in the presentation, clearly illustrated their functionality, methodology, and practical application in securing the software supply chain.
Defensive Implications
▶ Watch: Addressing AI hallucination risks in security triage (27:50)
The insights shared in this talk provide a clear roadmap for defenders to strengthen their software supply chain security:
- Centralize Package Consumption: Implement a centralized proxy or registry for all package consumption (from developer laptops and CI/CD pipelines). This enables critical controls like caching, telemetry, and, most importantly, dependency cooldowns. Introducing a delay (e.g., a few hours) before newly released packages are available can provide a crucial window for community detection of malware.
- Proactive Malware Blocking: Deploy tools like Datadog's Supply Chain Firewall on client machines and integrate similar blocking mechanisms at the centralized registry level. Blocking known malicious packages from
osv.devadvisories and curated datasets should be a default security posture.
- Eliminate Long-Lived Secrets: This is a paramount defense.
- Developer Laptops: Enforce credential scanning, provide secure alternatives to long-lived tokens (e.g., using GitHub CLI for refresh tokens stored in keychains), and minimize the need for local credentials through robust DevEx tooling.
- CI/CD Pipelines: Prioritize short-lived credentials and role-based access to limit the impact of CI/CD pipeline compromises.
- Enforce Strong Source Code Hygiene: Implement and enforce best practices that mitigate the impact of compromised developer accounts:
- Signed Commits: Ensure all commits are cryptographically signed to verify authorship and prevent unauthorized code injection.
- Peer Approval and Branch Protection: Mandate code reviews and protect critical branches to prevent malicious code from being merged without scrutiny.
- Sign and Validate Artifacts at Runtime: For containerized environments, enforce signed images at runtime using mechanisms like validating admission controllers in Kubernetes. This ensures that only images built through approved, secure CI/CD pipelines are deployed, preventing unauthorized or backdoored images from reaching production.
- Leverage Advanced Detection and Impact Assessment Tools:
- Utilize tools like GuardDog for continuous scanning of new and updated packages in your ecosystem.
- Be aware of the limitations of NPM lock files regarding transitive dependencies.
- Adopt tools like the
deps.devanalysis project to accurately assess the full transitive impact of a compromised package, enabling rapid and comprehensive incident response.
- Support Open-Source Maintainers: Recognize that many maintainers are volunteers. As a community, fostering better security practices and providing support can contribute to a safer ecosystem overall.
Key Takeaways
- Supply chain attacks, particularly through malicious packages and worms like Chaindrop, are an escalating and persistent threat, driven by the ease of maintainer/CI compromise.
- Modern applications rely on a vast web of transitive dependencies (78% of 129 median dependencies), many of which are rapidly deployed (60% within 24 hours), making them difficult to track and secure.
- Attackers primarily target maintainer machines (stealing NPM/GitHub tokens) and CI/CD pipelines (exploiting code injection vulnerabilities) to inject malicious code.
- Robust defenses involve a multi-layered strategy: centralized package consumption with cooldowns, proactive blocking of known malware, stringent short-lived credential policies, and strong source code hygiene (e.g., signed commits, branch protection).
- Tools like GuardDog (for scanning), Supply Chain Firewall (for blocking), and the
deps.devanalysis tool (for impact assessment) are critical for detecting, preventing, and responding to these threats at scale. - NPM lock files do not protect against transitive dependency compromises, requiring deeper analysis to understand the true blast radius of an incident.
About the Speaker(s)
Christophe Tafani-Dereeper is a Staff Security Engineer at Datadog. His work focuses on bridging the gap between security research, internal security, and project development. He is actively involved in supply chain security, both from a community research perspective and in securing Datadog's own operations against these evolving threats. His expertise lies in developing scalable solutions for detecting and mitigating risks associated with malicious open-source packages.
Reviews
Dr. Zero (Offensive Security Researcher) — SOLID
Datadog actually showed up with real tools instead of a sales pitch. Tafani-Dereeper drops actionable open-source code for hunting NPM and PyPI malware, maps transitive blast radiuses using Google's deps.dev, and exposes exactly why your NPM lockfiles won't save you. It's a pragmatic, deeply technical look at supply chain defense that every AppSec team needs to implement yesterday.
Heather Calloway (CISO) — STRONG ACCEPT
This is a highly actionable blueprint for containing open-source supply chain risk at enterprise scale. Datadog dismantles the comforting fiction that lockfiles protect us from transitive dependency poisoning and provides the exact engineering governance required to fix it. Required viewing for your product security and platform engineering leaders.