Coding agents are part of your supply chain now: a checklist
14 November 2026 | 5 min
The new risk is less the code an agent writes than what it is allowed to read, install and publish.
Most of the worry about AI coding tools has been about the code they write. The incidents of 2026 point somewhere else: at what the tools are allowed to read, which packages they install, and which credentials sit within reach of a workflow that runs them. Four cases, each with a lesson that applies whatever tool you use.
1. An issue title that became a release
In February a security researcher published a chain against an open-source coding agent's own repository. Its issue triage workflow ran an AI agent on every new issue, from anyone, with shell access. A crafted issue title instructed that agent. From there, poisoning the shared GitHub Actions cache reached the nightly publish workflow and its tokens. On 17 February an unauthorised version of the project's CLI was published to npm with a postinstall script that installed another program. It was deprecated about eight hours later. The maintainers' own correction explains why it happened after the disclosure had already been handled: the wrong token had been revoked, and the exposed one was still live.
Credit to the maintainers for publishing that correction. It is the most useful sentence in the whole write-up.
- An agent that reads untrusted text must not hold secrets. Issue titles, pull request bodies and comments are instructions to a model. Run triage with no tokens and no write access.
- Do not share a cache between untrusted jobs and release jobs. A cache is a file the next workflow trusts.
- After rotating, prove the old credential is dead. Try it. Revoking the wrong token looks exactly like revoking the right one until somebody uses it.
2. A package name nobody published, until somebody did
AI assistants sometimes suggest package names that sound right and do not exist. Attackers register them; it is called slopsquatting. Aikido described a malicious npm package called unused-imports, a plausible short form of the real eslint-plugin-unused-imports. npm put it on a security hold, and in early February it was still being downloaded about 233 times a week.
- Check every package name a tool suggests before installing it.
npm view <name>shows the repository, the maintainers and the publish dates. A week-old package with no repository is a no. - Let installs go through a lockfile.
npm ciinstalls exactly what was reviewed, not whatever a name resolves to today.
3. A hijacked account and a lookalike dependency
In June, according to OX Security, a hijacked npm account was used to swap a dependency in packages belonging to the Mastra AI framework: dayjs was replaced with a lookalike called easy-day-js. Its first version was clean; a later one added a post-install script that stole cryptocurrency. OX counted 141 affected packages.
- Review dependency changes as code. A renamed dependency in a diff deserves the same look as a renamed function.
- Turn off install scripts where you can.
npm ci --ignore-scriptsin CI, and allow scripts only for the packages that need them.
4. Trusted publishing, trusted to a name
Trusted publishing lets a GitHub workflow publish to npm without a long-lived token, which is a real improvement. Bloom Security found the trust was tied to the repository's name rather than its permanent ID. If a repository was renamed, transferred or deleted, whoever claimed the name could publish. They found more than 1,500 packages exposed. GitHub changed it on 2 October: a trusted publishing configuration that has not been used now expires after 48 hours.
- Audit your trusted publishers. Every package should point at a repository that still exists, under that exact name, owned by you.
- Remove the configuration before you rename or delete a repository, not after.
What ties them together
None of these needed a model to write bad code. Each one used the tooling around development: a workflow that gave an agent too much, a name a tool made up, an install script, a trust rule bound to the wrong thing. The checklist below is the same for every agent and every editor.
- Agents that read untrusted input run with no secrets and no write access.
- Release workflows share nothing with anything else: no cache, no artifacts, no runner state.
- Every suggested package is looked up before it is installed.
- CI installs from a lockfile, with install scripts off by default.
- Actions are pinned to commit SHAs, tokens are scoped to one job, and a rotation is checked by trying the old token.
- Agent configuration in a repository (rules, hooks, tool servers) is reviewed like code, because it can run code.
Where AstraCode fits
AstraCode treats what a repository carries as untrusted until you say otherwise. A folder you have not trusted is read-only to the agent and its rules, hooks and agents do not run. A plugin prints every hook and tool server it would run before it installs, and installs only when you say yes. In a headless run the project's agent files cannot start their tool servers unless you pass a flag for that run. Under --permissions auto the agent refuses risky commands, requests off your machine and git push, so publishing stays a step in your workflow. Details in the CLI docs.
An agent that asks before it trusts a repository
Untrusted folders stay read-only and nothing they carry runs until you say so. Free to start.
Also on the blog
- Make a coding agent fail loudly in CI
- Does your test test anything? The ten-second revert check
- npm test | tail exits 0 when your tests fail
- Developers trust AI they can check. Build agents for that.
- When an AI agent says it is done and it is not
- How to review code an agent wrote
- Making an AI agent follow your project's conventions
- We benchmarked eleven models in our own editor. The cheapest one won.
- Fable 5.1 cut cache reads to $0.25. Here is what that saves on a real agent run.
- What vibe coding is, and when it stops working
- What Google Antigravity is, and what it costs
- What GPT-6 Astra actually costs to run a coding agent
- GPT-6 Astra's pricing cliff at 272K tokens, and why agent runs fall off it
- How we're benchmarking GPT-6 Astra for coding (and why scores won't tell you)
- How to use GPT-6 Astra in your editor, and when not to