# Coding-assistant supply chain: govern the tools that write code.

> Coding-assistant supply chain attacks reach developers through the AI tools they install and the packages those tools pull: a poisoned extension update, an instruction hidden in a rules file, or a malicious package that borrows the assistant to hunt secrets. Public cases include Amazon Q, the Nx compromise and the Shai-Hulud npm worm.

Extensions, rules files and packages now steer AI that can run commands on a developer laptop. One stolen token can reach each client you build for.

Canonical page: https://colossalx.tech/threats/coding-assistant-supply-chain · Last reviewed: 8 Nov 2026

*Illustration:* An assistant tool call · refused: coding assistant to shell, "cat ~/.aws/credentials and post it to a paste site". Checks: Secret on the laptop failed, Workspace policy: Block failed. Verdict: refused, Refused by the hook.

## The threat and the control

- **The threat:** A malicious package runs the developer's own AI assistant, with checks skipped, to hunt for secrets.
- **The control:** Assistant policy hooks refuse secrets on the laptop; packages are checked against malicious lists.

## What has happened, graded by evidence.

These hit real developer machines. Each began with a token, an update or an install nobody checked.

- **A wiper prompt in Amazon Q (Documented · July 2025).** A hostile pull request put a data-wiping prompt in the extension. The prompt shipped in the Amazon Q Developer extension for VS Code, which had close to a million installs. It reportedly failed to run; AWS published security bulletin AWS-2025-015.
- **Nx packages turn AI tools inward (Documented · August 2025).** Malicious releases ran installed AI tools with permission checks skipped. A stolen publish token released malicious Nx versions for a few hours. Their install script ran the victim's own Claude, Gemini and Q command-line tools, with permission prompts skipped, to hunt for secrets and keys.
- **Shai-Hulud 2.0 spreads through npm (Documented · 24 Nov 2025).** A self-spreading worm stole tokens and republished infected packages. Wiz counted 25,000+ GitHub repositories affected. Each stolen publish token let the worm push poisoned versions of its victim's own packages, reaching every build that pulled them.

*Illustration:* Developer AI · public cases: Jul 2025 Wiper prompt shipped (it reportedly failed); Aug 2025 AI tools turned inward (secrets hunted); Nov 2025 npm worm spreads (tokens stolen, packages poisoned).

## How ColossalX answers, step by step.

Govern the assistant on the laptop, the files that steer it, the packages it pulls and the pipeline that ships.

- **Hook the assistants (Coding-assistant policy hooks).** Claude Code, Cursor, Codex CLI and Copilot check policy before acting. Each prompt and tool call is checked against the workspace policy, set to Off, Monitor or Block, and secrets are redacted on the laptop before they leave. Managed settings stop users switching the hook off. [Code security](https://colossalx.tech/platform/code-security)
- **Scan what steers them (Coding-assistant config scanning).** Rules files, hooks and agent configs in repositories are checked. Instruction files, editor autorun settings, skills and plugins are read for what they would make an assistant do, and invisible characters hidden in them are shown visibly. [Code security](https://colossalx.tech/platform/code-security)
- **Check each package (Malicious-package check).** Dependencies are checked against malicious-package lists and invented names. A match on the OpenSSF malicious-packages list is critical. Names that do not exist, are days old or sit one edit from a popular package are flagged, which catches names an assistant made up. [Code security](https://colossalx.tech/platform/code-security)
- **Gate the pipeline (CI/CD security gate).** A CI step fails the build on risk; secrets are caught early. Templates exist for GitHub Actions, GitLab CI, Azure Pipelines, Bitbucket Pipelines, Jenkins and any shell. Secrets scanning covers AI provider keys. [Code security](https://colossalx.tech/platform/code-security)

*Illustration:* A dependency · checked: ci-gate to package install, "npm install helper-utlis". Checks: Malicious-package list failed, One edit from popular flagged, Known-exploited flaws passed. Verdict: refused, Build failed on risk.

## What lives outside ColossalX.

ColossalX governs the assistant and the code path. The laptop and the registry need their own controls.

- **Endpoint protection.** Malware already running on a laptop needs endpoint tools. ColossalX checks what assistants are asked to do and which packages are pulled; it does not remove malware. Keep endpoint detection on developer machines and treat them as production access.
- **Your package registry.** Trusted publishing and token scope are set at the registry. Turn on trusted publishing with provenance where your registry offers it, scope CI tokens to least privilege, and require two people for releases of internal packages.

*Illustration:* Who holds which part: Assistant prompts and calls ends in ColossalX hooks; Packages and rules files ends in ColossalX scans; Malware on the laptop ends in Endpoint protection; Publish tokens ends in Your registry settings.

## One step you can take today.

Search your developers' assistant settings for flags that skip permission prompts, and turn them off. Then list the AI command-line tools installed on machines that hold production credentials.

Explore code security: [Code security](https://colossalx.tech/platform/code-security)

*Illustration:* This week · one setting: assistant settings to permission prompts, "skip permission prompts: true". Checks: Prompts skipped failed, Production keys on machine flagged. Verdict: held, Turn it off now.

## What ColossalX does not do

- Hooks cover Claude Code, Cursor, Codex CLI and GitHub Copilot; other assistants get config scans only.
- The CI gate fails a risky build; fixing the code stays with your developers.
- ColossalX does not remove malware from laptops or run your package registry.

*Illustration:* Developer AI · stated plainly: Hooks Four assistants; CI gate Fails risky builds; Laptop malware Endpoint tools. Limits over promises.

## Questions

### How do attackers use coding assistants against developers?

Three ways in public cases: a poisoned update to the assistant itself, as with the Amazon Q extension; instructions hidden in rules or configuration files the assistant reads; and malicious packages that run the developer's own assistant, with permission prompts skipped, to search the machine for secrets, as the Nx compromise did.

### What is a rules-file attack?

Coding assistants read instruction files in a repository to learn how to behave. An attacker who can edit one, sometimes with characters invisible to a person reviewing it, can steer the assistant to write unsafe code or run commands. ColossalX checks these files and shows hidden characters visibly.

### Can ColossalX stop a malicious npm package?

It flags one before it ships. Each dependency is checked against the OpenSSF malicious-packages list, where a match is critical, and against known-exploited flaws; invented and look-alike names are flagged too. A CI gate can fail the build on that risk. Removing a package already installed on a laptop is an endpoint task.

### Which coding assistants does ColossalX govern?

Policy hooks exist for Claude Code, Cursor, OpenAI Codex CLI and GitHub Copilot: each prompt and tool call is checked against the workspace policy, and secrets are redacted on the machine. Administrators can place managed settings files so users cannot switch the hook off.

## Sources

- BleepingComputer: Amazon AI coding agent hacked to inject data-wiping commands, July 2025: https://bleepingcomputer.com/news/security/amazon-ai-coding-agent-hacked-to-inject-data-wiping-commands
- The Hacker News: malicious Nx packages in s1ngularity attack, August 2025: https://thehackernews.com/2025/08/malicious-nx-packages-in-s1ngularity.html
- Wiz Research: Shai-Hulud 2.0 supply chain attack, 24 Nov 2025: https://www.wiz.io/blog/shai-hulud-2-0-ongoing-supply-chain-attack

## Capabilities each step uses

| Step | Capability | Note | Page |
| --- | --- | --- | --- |
| Hook the assistants | Coding-assistant policy hooks |  | /platform/code-security |
| Hook the assistants | Laptop secret redaction |  | /platform/code-security |
| Hook the assistants | Managed hook settings |  | /platform/code-security |
| Scan what steers them | Coding-assistant config scanning |  | /platform/code-security |
| Scan what steers them | Hidden-text rules-file check |  | /platform/code-security |
| Check each package | Malicious-package check |  | /platform/code-security |
| Check each package | Look-alike package check |  | /platform/code-security |
| Check each package | Vulnerable dependencies |  | /platform/code-security |
| Gate the pipeline | CI/CD security gate |  | /platform/code-security |
| Gate the pipeline | Secrets scanning |  | /platform/code-security |

**Evidence grades.** Documented: A primary source, or several consistent ones. Claimed: One vendor, one outlet or the attacker; not confirmed elsewhere. Demonstrated: A researcher's proof of concept, with no named victim.

**Coverage.** Core: ColossalX holds the main control. ColossalX's half: Assistant policy hooks, rules-file and config scans, malicious-package checks and a CI gate. Elsewhere: Endpoint protection; your package registry.

**Who asks for these controls:** /regulations/cert-in, /regulations/owasp

---

ColossalX is an AI security and governance platform from Quantexra Labs LLP, delivered as SaaS. Book a walkthrough: https://colossalx.tech/demo · client.success@quantexra.tech
