Attack Class · AI Agent Security

Poisoned Build Manifests: What a Scan Catches and Misses

Published · Sunglasses team · Attack class report

Quick answer
sunglasses://reports/poisoned build manifests#quick-answer
What it is

A build, dependency or CI file (package.json, Cargo.toml, pyproject.toml, workflow YAML, a BUILD file) that carries text written for the AI agent reading it.

What we tried

28 rules, one hostile probe each, on sunglasses 0.6.20. All 28 fired (27 on the first try). We wrote each probe after reading its rule, so 28 of 28 is an upper bound, not a catch rate.

Real manifests

0 of 113 real manifests were flagged by a class rule. Rules outside the class flagged 12 of the same 113.

What we miss

5 of 5 reworded attacks were allowed by every rule. No rule is named for a GitHub Actions workflow. No real poisoned manifest was tested.

Method

sunglasses 0.6.20 from PyPI in a clean environment, measured November 9, 2026. Every probe is synthetic.

Your build files are read by the build, and by your agent. A rules file such as CLAUDE.md or AGENTS.md is written for the agent. A manifest (package.json, Cargo.toml, pyproject.toml, a workflow YAML, a BUILD file) is read by the package manager and the build, and the agent reads it too, so a sentence aimed at the agent can sit in a field the build never acts on. This report counts what 28 scanner rules do with our own probes, which files they name, and what they do not reach. Every number carries its denominator, and we wrote the probes after reading the rules.

§01 · Definition

Definition

sunglasses://reports/poisoned build manifests#definition
Definition

A poisoned build manifest is a build, dependency or CI file that carries text written for the AI agent that reads it, in a field the build never acts on.

What the text does

Tells the agent to skip a review, trust a package, hide what it finds, or send secrets somewhere. This report names the behaviors, not the wording.

Carried by

Files the package manager, the build or the CI system reads: package.json, Cargo.toml, pyproject.toml, workflow and pipeline YAML, BUILD files, lockfiles, reports and attestations.

Not in these numbers

Rules files such as AGENTS.md and CLAUDE.md are the previous report, Poisoned Rules Files. Discovery-file poisoning sits in another category. Neither was measured here.

§02 · Which files the 28 rules name

Which files the 28 rules name

RuleNames this kind of fileSeverityChannels declared
GLS-BMP-001npm package.jsonhighfile, web_content
GLS-BMP-002Bazel, Buck and Pants build fileshighfile, web_content
GLS-BMP-003Cargo.tomlhighfile, web_content
GLS-BMP-004CMake fileshighfile, web_content
GLS-BMP-005Gradle and Maven build fileshighfile, web_content
GLS-BMP-006Lockfileshighfile, web_content
GLS-BMP-007Makefile and task-runner fileshighfile, web_content
GLS-BMP-008Package-manager confighighfile, web_content
GLS-BMP-009pyproject.toml and Python package metadatahighfile, web_content
GLS-BMP-010Frontend build-tool confighighfile, web_content
GLS-CICD-001CodeQL confighighfile, web_content
GLS-CICD-002Dependabot confighighfile, web_content
GLS-CICD-003Renovate config and dependency-bot PR noteshighfile, web_content
GLS-CICD-004Ansible automation fileshighfile, web_content
GLS-CICD-005GitLab CI pipeline fileshighfile, web_content
GLS-CICD-006GitOps controller files (Argo CD, Flux)highfile, web_content
GLS-CICD-007Jenkins pipeline fileshighfile, web_content
GLS-CICD-008Observability confighighfile, web_content
GLS-CMP-009GitHub Actions step summarieshighfile, api_response
GLS-CMP-010Renovate confighighfile, api_response
GLS-SCAP-001SARIF results fileshighfile, web_content
GLS-SCAP-002SLSA and in-toto attestationshighfile, web_content
GLS-SCAP-003Status and coverage badgesmediumfile, web_content
GLS-SCAP-004TUF update metadatahighfile, web_content
GLS-SCAP-005SLSA and in-toto provenancehighfile, web_content
GLS-SCAP-006Coverage dashboard HTMLcriticalfile, api_response
GLS-SCAP-007LCOV coverage reportscriticalfile, api_response
GLS-SCAP-009Kanban task-card HTMLcriticalfile, api_response

The 28 rules sit in three categories: 10 build-metadata (BMP), 10 CI and CD (CICD, CMP) and 8 attestation and report (SCAP). 24 are high severity, 3 critical, 1 medium. All 28 declare file, 23 web_content, 5 api_response; none declares message. One package.json probe fired 5 of the 28 rules, so read the table as what each rule mentions, not a classifier by file type.

§03 · What we measured

What we measured

sunglasses://reports/poisoned build manifests#what-we-measured
28rules in the class
28 of 28fired on their own probe (upper bound)
0 of 113real manifests flagged by a class rule
5 of 5reworded attacks allowed (n=5)
QuestionResultDenominator
A hostile probe fires its own rule, file channel28 (27 on the first try)28 rules, one probe each. The first miss was our probe, not the rule: it carried no named marker. We fixed the probe, not the rule.
...on the web_content channel2323 rules that declare it
...on the api_response channel55 rules that declare it
A full attack in a real-named file fires the rule named for that file type3 of 3 for each of package.json, Cargo.toml, pyproject.toml and BUILD.bazel3 attacks written by us, 4 file types, 12 files
...a workflow YAML file0 rules named for it. 3 of 3 full attacks still fired two rules aimed at other file kinds.3 attacks. Coverage by shared vocabulary, not a workflow rule.
A full attack with one kind of wording taken out fires a class rule0 of 1515 files. Other rules still blocked 9 of the 15, so those blocks are not these rules.
Real manifests flagged by a class rule0113 real files, none edited
Reworded attacks (same intent, new words) allowed by the whole engine55 files, one per manifest type

Every hostile probe was written by us after reading that rule, so 28 of 28 is an upper bound on what the rules can do, not how often they catch real poisoned manifests. One probe per rule. This report prints no percentage. 27 of the 28 rules need several kinds of wording to appear together; GLS-CMP-009 is built differently. The 5 reworded files fired no rule of any kind.

§04 · Where a rule did not fire

Where a rule did not fire

ItemWhat happened
Reworded attacks, one per file kind: a workflow step name, pyproject.toml, a BUILD file comment, Cargo.toml and package.jsonNo rule of any kind fired on any of the 5. All 5 were allowed. n=5, written by us: a list of misses, not a miss rate.
A GitHub Actions workflow in generalNo rule is named for it. Only the step-summary rule, GLS-CMP-009, reads a part of one.
A hostile sentence with one kind of wording taken out0 of 15 fired a class rule. 9 of the 15 were blocked by other rules; 6 were allowed.
A bare YAML key as the only file markerGLS-CICD-008 did not fire on our first probe. It fired once the probe named the tool.
The message channelNo rule in the class declares it.
Manifest types beyond fiveProbed once each, with the rule's own wording. Not probed with reworded or paraphrased attacks.
§05 · False positives on real files

False positives on real files

File kindReal filesFlagged by a class rule
package.json550
Cargo.toml190
pyproject.toml140
Workflow YAML90
Python package METADATA20
BUILD.bazel1 (one file: a thin sample)0
Other (setup.py, MANIFEST.in, Dockerfile, issue and pipeline YAML)130
All1130
QuestionResult
Same 113 files through a directory scanAgreed: no finding in any of the three categories
Where the files came from21 from our own repositories, 2 from the Action's clean fixtures, 2 installed package METADATA files, 54 third-party package.json files from one node_modules folder, 34 other real manifests on one Mac
Our own Cargo.toml, pyproject.toml, BUILD filesNone exist, so those three kinds are third-party clones only
A package.json whose description quoted an attack as an exampleFired 5 class rules (n=1). A write-up shaped like a manifest is a false-positive path.
Outside the classFlagged or quarantined by rules outside the class: 12 of the same 113, listed below. Not these rules, but each is a false positive or a known flag on a real file.
FilesKindRule that firedOur reading
5Third-party package.json: wrangler, miniflare (two copies), kv-asset-handler, sourcemap-codecGLS-PT-001, blockedFalse positive. Known gap, below.
2Ours: action.yml and acceptance.yml in our GitHub ActionGLS-CI-007, quarantinedTrue false positive on our own action.yml.
3Ours: workflow and issue-template files in our scanner repositoryGLS-TS-251 (1 file), GLS-GHSA-PI-202 (2 files), blockedFalse positive on plain comment and description text: 3 of 113 here.
1Ours: the scanner DockerfileGLS-APIP-005, blockedFalse positive on its header comments: 1 of 113 here.
1Ours: the METADATA of sunglasses itself24 rules, blockedCorrect flag: the README inside it lists attack examples.
Known gapStatus
GLS-PT-001 and GLS-CI-007 block or quarantine real manifestsGLS-PT-001 (path traversal, file channel) blocks real package.json files whose script or tool-config fields hold relative parent paths: 213 of 1,907 distinct npm packages on one Mac (581 of 5,691 top-level files), measured Nov 9 2026 on 0.6.20. scan --dir skips node_modules, so this reaches a user who scans a single manifest or a vendored tree. GLS-CI-007 quarantines our own action.yml the same way. Present since v0.2.4; not a regression. The fix is a rule change that needs review and a false-positive run, and no release is named for it yet. Listed on the known version gaps page.
Three other rules block real filesGLS-TS-251, GLS-GHSA-PI-202 and GLS-APIP-005 block real workflow, issue-template and Dockerfile files on comment, URL or glob text: 20 of 298 distinct files found on one Mac (copies of our own repos and installed npm packages included), measured Nov 9 2026 on 0.6.20; 4 of the 113 files in this report.

Not a rate for the wild. The files are not a random sample, and "clean" means real files from known tools, not read line by line. The corpus used renamed copies, so we did not test whether a real path such as .github/workflows changes anything.

§06 · What the scanner does today

What the scanner does today

BoundaryBehaviorStatus
Engine scan, file channelEvery probe, control and corpus file was scanned with the engine on the file channel; critical or high blocksRun
Directory scanThe 113 real files through a directory scan returned the same class result as the engine scanRun: 113 files
Hook, proxy and MCP front doorsNot tested on a manifestNOT RUN
GitHub ActionNot tested on a poisoned manifestNOT RUN
§07 · What we do not catch

What we do not catch

  1. Real poisoned manifests. We tested none. Real-world recall for this class is unknown, and every probe was written by us after reading the rule it was aimed at.
  2. Reworded attacks. 0 of 5 were caught by any rule, in this class or outside it.
  3. GitHub Actions workflows in general. No rule is named for them; only a step summary has one.
  4. Any manifest sent on the message channel. No rule in the class declares it.
  5. Which rules do the stopping. Other rules blocked 9 of the 15 files where a class rule stayed quiet, and we did not test the decision with this class removed.
  6. Manifest types we probed once: Bazel, CMake, Gradle and Maven, lockfiles, task runners, package-manager config, CI files for GitLab, Jenkins, Argo and Ansible, and the report and attestation formats.
  7. Files over 1 MB, archives, the hook, the proxy and the Action. None was tested for this class.
§08 · Reproduce it

Reproduce it

sunglasses://reports/poisoned build manifests#reproduce-it
Install

pip install sunglasses==0.6.20

Run

sunglasses scan --dir . --json on a copy of your repository.

Expect on a folder with no findings

decision allow, threat_found false, exit code 0.

Read the rules that fired

raw_findings holds every rule that fired. The top-level list is a merged view, and a rule absorbed into a stronger one appears only under also_matched.

Fixture

No public fixture with a poisoned manifest yet. This report prints no hostile text.

§09 · Version and method

Version and method

sunglasses://reports/poisoned build manifests#version-and-method
Package

sunglasses 0.6.20 from PyPI, installed in a clean virtual environment, run isolated with an empty home folder.

Measured

November 9, 2026.

Counting

Raw findings from the engine, not the merged display view.

Scope

Synthetic probes, and real files from one Mac. This says nothing about other phrasings or about real incidents. Numbers move when the scanner moves: pin the version.

Frequently Asked Questions

sunglasses://reports/poisoned build manifests#faq
Q.01

What is a poisoned build manifest?

A build, dependency or CI file, such as package.json, Cargo.toml or a workflow YAML, that carries text written for the AI agent reading it, in a field the build never acts on.

Q.02

Does the scanner stop them?

Not shown. Each of the 28 rules fired on our own probe, and no class rule flagged any of 113 real manifests (other rules flagged 12), but 5 of 5 reworded attacks were allowed. No real poisoned manifest was tested, so real-world recall is unknown.

Q.03

How do I check my own repository?

Run the one command in the reproduce section on a copy of your repository, on the same package version, and read the rules that fired in the JSON.

Related reading

Scan what the agent sees, before it acts

Sunglasses is an open source input filter for AI agent security. It blocks prompt injection before your agent reads it. pip install sunglasses