SBN

Open Source Security Is One Person, AI Can Change That

One account. Axios, a JavaScript library downloaded nearly 100 million times a week, powering production systems for countless enterprises around the world, its security came down to one person’s account credentials.

Jason Saayman is Axios’s lead maintainer. Two weeks before the attack, hackers launched a targeted social engineering campaign against him. They impersonated the founder of a real company, cloned the company’s brand and the founder’s identity, built a convincing fake Slack workspace, and even fabricated profiles of other open source maintainers. Then they invited him to a Microsoft Teams call and prompted him to install an “update.” That update was a trojan. The attackers obtained his npm account credentials. Everything that followed was automatic.

On March 31, 2026, backdoored versions carrying a remote access trojan were pushed to millions of systems worldwide through standard release channels. No one detected anything unusual, because nothing was unusual. A legitimate account, through official channels, published a new version. Everything was working exactly as it was supposed to. That is the problem.

This attack prompted me to think about a question: what does security management actually look like for an open source project that is underfunded and understaffed?

What follows are some initial thoughts and suggestions, not conclusions. I hope we can work through them together.

Twelve Days, Five Projects, One Attack Chain

Let me lay out what actually happened, because most coverage only tells part of the story.

March 19: TeamPCP compromised Aqua Security’s service account and injected credential-stealing malware into Trivy, an open source vulnerability scanner embedded in thousands of CI/CD pipelines. The malicious code was force-pushed to 76 Trivy-action version tags, turning every pinned version reference into a malware delivery channel. The legitimate vulnerability scan continued to run normally, producing completely normal output, while SSH keys, cloud credentials, and Kubernetes configuration files were being silently exfiltrated.

The most security-conscious teams, the ones running Trivy scans on every build, had the greatest exposure. The more frequently they scanned, the more times the malware ran.

March 23: Using CI/CD secrets stolen from Trivy, the attackers compromised Checkmarx’s GitHub Actions and attacked another security scanning tool, KICS.

March 24: LiteLLM, an LLM proxy gateway with nearly 100 million monthly downloads, had malicious versions 1.82.7 and 1.82.8 published to PyPI. LiteLLM’s maintainers later confirmed that their PyPI publishing token was leaked through the compromised Trivy CI/CD environment.

March 31: Axios was compromised. Different attackers this time, Microsoft attributed the incident to the nation-state threat actor Sapphire Sleet. The method was simpler: socially engineer the lead maintainer’s account, publish two versions containing a malicious dependency, and let auto-update distribute it to systems globally.

Saayman’s post-mortem showed that the social engineering operation ran for approximately two weeks and was executed with exceptional professionalism, LinkedIn outreach, a fake Slack workspace, a fake Teams call, every step carefully staged.

One account. Facing an adversary with a nation-state budget and AI tools.

The technical part of the problem is quiet simple. Somewhere in your CI/CD pipeline, the automated assembly line that takes code from a developer’s laptop to production, there is probably a line that looks like this:

yaml

- uses: actions/setup-node@main

This single line tells your pipeline to fetch the latest version of a third-party tool every time it runs. It looks harmless. It is standard practice at thousands of companies. And it is one of the most under-appreciated attack surfaces in modern software infrastructure.

But the CI/CD pipeline is only one entry point. In March 2026, we watched five projects fall in twelve days, and the attackers did not need a single line of bad code to do it. They needed one account. One token. One incomplete credential rotation. That was enough.

What the Attack Actually Exploited

When a pipeline references a third-party action by tag, @main, @v4, @latest, it fetches whatever is current at that address every time it runs. Tags are mutable. Anyone with write access to the repository can move them. And in the Trivy attack, TeamPCP did exactly that: force-pushed 76 of 77 version tags to point at malicious commits.

One important nuance: not every pinned reference was affected. Trivy-action v0.35.0 was protected because it had GitHub’s immutable releases feature enabled before the attack. And critically, GitHub’s “Immutable” badge in the release UI did not prevent tag force-pushing on other versions, attackers actually published immutable releases after force-pushing to lock in the malicious state. The badge is not a security guarantee. A full commit SHA is the only truly immutable reference.

yaml

# Vulnerable – mutable tag, can be force-pushed to point at malicious code

– uses: actions/checkout@v4

# Still vulnerable – even “Immutable” badge does not fully protect tags

– uses: actions/[email protected]

# Safe – SHA describes one exact state, forever

– uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

When TeamPCP force-pushed malicious code to 76 Trivy version tags, every pipeline using a SHA was unaffected. The SHA they had pinned simply did not exist in the attacker’s modified history.

One caveat: SHA pinning ensures immutability, that the code you run today is the same code you chose. It does not guarantee provenance. Always verify that a pinned SHA originates from the action’s official repository, not a fork.

This Is Not a Technical Problem. It Is a Math Problem We Have Been Pretending Has a Solution.

While following this incident, I kept seeing the same sentence appear in security advisories: “Maintainers should implement MFA, rotate credentials regularly, audit CI/CD pipelines, and follow the principle of least privilege.”

None of that advice is wrong. It just assumes a world that does not exist. Josh Bressers’s research found that among npm packages with more than one million monthly downloads, nearly half have just one maintainer. One person. No security team. No incident response plan. No budget for hardened build infrastructure. Often no compensation at all.

Telling that person to “rotate credentials quarterly and conduct annual penetration testing” is like telling someone to renovate the house they are living in, with no tools, no money, and someone actively trying to break in.

The answer to this math problem has never been to ask maintainers to try harder. The answer is to redesign the approach, and let AI carry the work that maintainers simply do not have the time or resources to do.

AI as Operating System, Not Security Tool

This is the most important conceptual shift I kept coming back to. When most open source projects think about AI and security, they think about tools: run a scan here, check a dependency there. That is the wrong frame. A tool is something you use occasionally. An operating system is what everything runs on.

For a maintainer with no security budget, the goal is not “use AI to help me with security.” It is: “make AI the continuously running security layer, so that security functions whether or not I am present.”

The YC framework for AI-native companies offers a useful model here. Not “add AI to what you are already doing,” but: redesign your entire operating model around what AI can do continuously, autonomously, and cheaply.

What the Trivy incident shows us was fatally missing: nothing was monitoring changes to build scripts and GitHub Actions. After the malicious code was injected, the legitimate scan continued to run and produce normal output. A continuously running AI layer monitoring those files, not just source code, but the entire build configuration, would have flagged the modification within minutes. No human needed to be present.

What the Axios incident shows us was a fatal single point: one account, one token, one publish button. An automated publish gate, a structured checklist that an AI agent validates before the publish token can be invoked, means that compromising one account no longer means controlling the entire release process.

Neither of these things costs what a security engineer costs. They cost a few hundred dollars a month in API calls.

Three Closed Loops That Leave No Room for an Attack

Let me be specific. Not concepts, actions.

Closed Loop One: Dependency Monitoring

Every time a dependency updates, an AI agent automatically compares the new version against the previous one, flags new transitive dependencies, checks for changes to build scripts and install hooks, and posts a structured summary to a security channel. The maintainer does not review every dependency update. The agent does. The maintainer reviews the agent’s flags. This is the loop that was missing in the Trivy incident.

Closed Loop Two: Publish Monitoring

Every package publish automatically generates a structured artifact: what was published, from which commit, signed by which key, at what time, triggered by which credential. That artifact is automatically compared against expected patterns.

Publishing at 3am, using a credential that has not been touched in six months, in rapid succession, that is an anomaly. That pattern was visible in the Axios incident. A closed publish loop would have triggered an alert before the packages were widely distributed.

Closed Loop Three: Credential Access

Every credential exists in a queryable registry with automated expiry and rotation reminders. An AI agent opens a PR to rotate credentials before they expire, and triggers an alert when a credential is used in an unexpected context. The loop closes itself. The maintainer does not need to remember.

What these three loops share: they transform security that requires a human to be continuously present into security that requires a human to make occasional decisions. For someone maintaining critical infrastructure on weekends, that is a fundamental difference.

Make Your Project Queryable

Open source security requires making your security posture legible to AI, not just stored in a maintainer’s memory. That means three concrete things:

A living SBOM. Not a static document generated once at release time, but a continuously updated record of every dependency, its version, its hash, and the build that produced it. In the LiteLLM incident, over 600 public GitHub projects had unpinned LiteLLM dependencies. Knowing what you depend on is a prerequisite for knowing whether you are affected.

A credential inventory. A structured record of every publish token, deploy key, and API credential, with metadata covering scope, creation date, last use, and which workflows invoke it. Not stored in someone’s memory, stored in the repository, versioned and auditable.

A pipeline manifest. A structured description of every step in the build and release process: what it does, what it has access to, what it produces. When you ask “if this step were compromised, what could an attacker do,” you should be able to answer from the manifest, not by manually tracing the pipeline.

The value of these artifacts compounds: every future security question becomes cheaper to answer, because AI has structured context to reason from rather than having to infer from scattered logs and institutional memory.

Token-Max, Not Headcount-Max

This is the economic argument that makes everything else possible, and I want to state it plainly. A security engineer in San Francisco costs $200,000 to $300,000 a year. A maintainer running AI agents in a CI/CD pipeline spends a few hundred dollars a month in API costs.

For a nonprofit open source project with no security budget, the comparison is not between a security engineer and an AI agent. It is between an AI agent and nothing.

And nothing is the actual security posture of Trivy, Axios, and almost every other project that was compromised.

Every dollar spent on AI agents running security checks replaces work that would otherwise cost ten times as much in human time, or simply never get done. Running AI security analysis on a PR costs a fraction of a cent. The cost of missing a malicious dependency change, ask the downstream users of Trivy, can be full credential exposure across thousands of enterprise environments. At that cost ratio, “run AI security analysis on every PR” is not a luxury. It is the only rational choice.

If You Are Starting an Open Source Project Today

This is the only genuinely optimistic section of this article.

Established projects carry years of accumulated technical debt: build pipelines set up before anyone was thinking about supply chain attacks, credential management designed for five contributors now being used by five hundred. Retrofitting all of that is expensive.

New projects carry none of that debt. You can make decisions today that established projects cannot easily revisit:

Design for AI query ability from day one. Every credential enters a structured inventory the moment it is created. Every build produces a reproducible, auditable output.

Treat publishing as a high-privilege operation from the first release. Publish gating, AI-verified checklists, anomaly detection, build these in before you have a single external contributor. Adding them later never happens.

Make AI the default reviewer. From the first PR, every dependency change goes through AI analysis. This is not extra work. It is how the process works. You cannot outsource this conviction. You have to sit down with these tools and use them to develop real intuition. But if you do this from day one, what you build is not a set of security features, it is a security culture. And culture is the hardest thing to attack.

To Close

The deepest irony of the Trivy attack: the organizations that took security most seriously, the ones running security scans on every build, had the greatest exposure.

That is the nature of supply chain attacks. They propagate through your trust, not through your vulnerabilities.

The cost of changing this architecture, in 2026, is not budget. It is not headcount. It is a decision about what AI is for. A tool you pull out occasionally. Or an operating system that everything runs on. That distinction is what determines whether a maintainer can hold their ground against a nation-state adversary.

Note: Views expressed are my own and do not represent any organization.

The post Open Source Security Is One Person, AI Can Change That appeared first on Chasing Polaris – Wickey's blog.