Software Bill of Materials for Agent-Generated Code
Tracking model, prompt, and data provenance for AI-generated code.
Sponsored by Graphide

A software bill of materials for agent-generated code must record more than packages. It must bind model, prompt, data, and tool provenance to the code the agent produced. To detect architecture drift in AI-generated codebases, teams must also check that output against machine-readable architectural constraints before merge. An AI bill of materials, or AIBOM, supplies the provenance, while CI enforcement turns that evidence into a release gate.
What a standard SBOM was built to do and why agent-generated code sits outside that model
A traditional software bill of materials answers “what is in this build?” through package names, version identifiers, and lockfile pins. Its unit of identity is a reproducible package release. The underlying assumption is that the same code and the same packages yield the same build, making a version string a stable reference for vulnerability analysis. Log4Shell illustrates the value of that model. A team with a clean SBOM could quickly check its named and pinned dependencies for the affected package.
Agent-generated code adds inputs that this inventory was not designed to describe. A package manifest does not record the model that authored a change, the prompt that directed it, or the instructions that authorized its tools. Those inputs shape the code even though they are not package dependencies.
The four artifact classes that agent-generated code introduces and that a package inventory has no field for
Model weights require identity and lineage beyond a package name. The record must identify the loaded artifact, its version or checkpoint hash, license, origin, and, for a fine-tuned model, its base model and producing job. Copying a checkpoint from a public model hub into a private repository breaks provenance unless someone records the transfer. No package manager records that move. A derivative also inherits its base model’s known weaknesses and license constraints.
Training datasets require source, collection method, preprocessing, license, training/validation/test splits, sensitivity markers, and permitted use. An assembled dataset may combine internal exports and scraped corpora, each with its own provenance. That history cannot be recovered from the assembled data alone. Sensitivity markers are needed because sensitive training data changes both the model’s risk profile and the legal obligations that come with it.
Prompts, embeddings, and retrieval sources form a third class. A system prompt shapes behavior and changes between releases, yet is rarely versioned where security teams can inspect it. Embedding indexes need a separate provenance record. That record must name the source corpus, embedding model, and snapshot date so the vectors remain connected to their origin.
External inference services and agentic dependency chains complete the inventory gap. An alias such as “gpt-4o” may resolve to a different underlying model without an application change. Skills need explicit inventory entries as well. Antiy CERT’s ClawHub findings and Mitiga Labs’ codebase-exfiltration proof-of-concept show that instruction bundles can introduce malicious behavior without adding a suspicious package.
Why agent-generated code makes the supply chain surface bigger and harder to see at the same time
Hallucinated package names give attackers a way into the supply chain before a dependency has any legitimate history. A proof-of-concept package with a made-up name drew tens of thousands of downloads within months, even though it had no code. Some open-model configurations hallucinate package names in more than a third of generated samples, substantially above commercial models. A package scan cannot establish that origin. Recording which model generated the code, together with packages it is known to hallucinate, gives investigators a link that the dependency inventory lacks.
Adversa.AI’s “TrustFall” attack showed that a coding agent could be manipulated into delivering a stealthy supply chain compromise through its own automation. Antiy CERT found thousands of malicious skills across the OpenClaw marketplace. Mitiga’s proof-of-concept exposed the concrete consequence of trusting such instructions. A seemingly legitimate skill silently copied a codebase, added a remote pointing to an adversary’s repository, and pushed it there.
The package list can remain unremarkable even when the instructions governing the agent are hostile. Model impersonation and poisoned datasets create the same inventory problem at other layers. An AIBOM makes it possible to establish whether those components are present, rather than searching only the libraries they happen to use.
How non-determinism breaks the lockfile model that SBOMs depend on
Pinning works when a component identifier denotes a stable artifact. Agent-generated code breaks that contract at the generation layer, where a different prompt, training dataset, or inference call can change behavior. A provider alias is a label. Even without a source-code change, it may point to a different model next week. Recording the alias alone therefore does not establish which model produced a particular diff.
A conventional SBOM records build-time or deploy-time state, while AI provenance needs ongoing tracking of datasets, fine-tuned weights, and prompt configurations. This creates a serious operational objection. If every agent commit requires its model version, prompt, context window contents, and tool calls, the documentation burden appears incompatible with the speed advantage of agent development. Each inference can change the evidence that must be captured.
Automated capture addresses this documentation burden. Omitting the record creates invisible provenance, and generated code cannot reveal all the inputs that produced it after a breach. AIBoMGen, presented at CAIN 2026, shows how to do this during model training. Its platform acts as a neutral third-party observer and root of trust, enforcing AIBOM creation for every training job through cryptographic hashing, digital signatures, and in-toto attestations.
What an AIBOM must capture that a standard SBOM does not, and how the component taxonomy is taking shape
The G7 Cybersecurity Working Group’s May 2026 guidance, published jointly by CISA and G7 partner agencies as “Software Bill of Materials for AI – Minimum Elements”, organizes the inventory into seven clusters. The structure extends the SBOM. Metadata establishes custody of the inventory itself through its author, creation date, schema version, and document identifier. System Level Properties retains software dependencies, frameworks, runtime environments, and data processing logic, preserving traditional CVE tracking.
Models records identity, architecture, production method, and documented limitations, including whether weights were trained, fine-tuned, or distilled. Dataset Properties records training, validation, and test data identities, provenance, licensing, collection methods, and preprocessing. Key Performance Indicators adds deployment benchmarks for accuracy, fairness, and adversarial resilience, establishing behavioral baselines against which degradation can be assessed.
Infrastructure describes the physical and virtual compute environment, with links to a Hardware BOM for specialized AI hardware. Document Structure and Update Cadence defines format versioning, update triggers, and lifecycle transition records. Dataset provenance begins at sourcing, model metadata at training, and system dependencies at deployment, with event-driven updates thereafter.
Skills and instruction bundles must be first-class components, external inference aliases must appear in agentic dependency chains, and prompt versions need the same discipline as code versions. These are consequences of the exposures already identified. Without them, a broad AI inventory can still omit the instructions and services responsible for a particular code change.
The format question — CycloneDX ML-BOM and SPDX 3.0 AI Profile as the two live standards
In 2026, teams can use CycloneDX ML-BOM for the AIBOMs they generate internally through CI/CD and require SPDX 3.0 AI Profile from external vendors when they need it to carry weight with regulators. Both formats support AI components, and neither has been formally blessed by a regulator. Tooling maturity and procurement convention currently drive the choice.
CycloneDX is the OWASP/ECMA-424 international BOM standard, with ML-BOM support introduced in v1.5 and extended in later versions. Version 1.7 shipped in October 2025 and became the version standardized in the second edition of ECMA-424, published in December 2025. SPDX’s AI Profile meets the needs of external contracts and the documentation that regulators require. The formats are designed to be interoperable, so internal and external artifacts can coexist without committing the organization permanently to one format.
How regulatory requirements are turning AIBOM from a security practice into a procurement gate
The EU AI Act’s Article 11 and Annex IV impose technical documentation requirements for high-risk AI systems that map directly to AIBOM fields. Annex III covers employment screening, credit scoring, use by law enforcement, and safety components in critical infrastructure. Deployers take on downstream obligations and have the right to receive Article 13 transparency information. The Digital Omnibus extension of Annex III deadlines to December 2, 2027 does not remove the underlying documentation requirement.
Article 53(1d) separately requires general-purpose AI model providers to supply the Training Data Summary, effective August 2, 2025. Its model-version-linked documentation maps to dataset provenance records. The G7 guidance supplies concrete minimum expectations for AI inventories as guidance. RFPs now require AIBOM delivery, and organizations unable to produce one are losing enterprise contracts, making the inventory a gate comparable to security review or penetration testing.
How do teams detect architecture drift at agent output and enforce it before merge?
An agent-generated diff does not preserve the model version, prompt, context window contents, or tool calls that produced it. Trustworthy evidence must therefore be captured at creation and cryptographically bound to the artifact. Timing alone is not enough. CI checks must check the same candidate revision that the evidence describes, because checking one revision and showing a later diff breaks the chain. AIBOM generation and signing belong at agent output.
AIBoMGen’s evaluation demonstrates that its training platform detects unauthorized artifact modifications with negligible performance overhead. That result supports capture during production of the artifact, while architectural conformance requires an adjacent gate. ContextCov research, arXiv:2603.00822, documents an agent placing a utility in the wrong layer of VS Code’s codebase because it optimized for local task completion over global architectural constraints. Detecting that drift requires checking intended boundaries as well as whether the new code works locally.
A practical starting point for teams shipping agent-generated code today
Teams should begin by capturing the minimum provenance record at agent invocation. Record the model version, with a checkpoint hash if one is available, the version of the prompt template, and the tool calls that were authorized. Then enumerate skills and instruction bundles as dependencies in the AIBOM, using the discipline already applied to open-source libraries. Do this before expanding the agent’s instruction supply chain. Add dataset provenance before fine-tuning or updating a RAG index, while the source and assembly history are still available.
Next, enforce architectural constraints in CI before merge. Configure the gate to exit non-zero on violations so detection blocks the candidate rather than deferring the decision to post-hoc review. Choose CycloneDX ML-BOM for internal generation and require SPDX’s AI Profile from external vendors where regulatory weight is needed. The format choice can be revised as tooling develops. Fix update triggers in advance for retrained models, patched dependencies, new dataset versions, and changed infrastructure, then require the signed provenance and architectural checks to apply to the exact candidate before it reaches main.
Putting architectural checks in CI
Choose an architecture-test or dependency-rule tool that supports your language and the constraints you can explicitly encode. Commit its rules with the code, run the documented command in CI, and make the resulting check required where those rules should prevent a merge. Test the gate with an intentionally forbidden dependency before relying on it. Such checks enforce the rules you specify; they do not establish that every aspect of the architecture or runtime behavior is correct.
Updated November 5, 2026: obsolete CLI examples removed. Use the selected tool’s current installation and command documentation.


