The Provenance Deficit: What AI-Generated Code Does to Open-Source Risk
Photo: DFID - UK Department for International Development, CC BY 2.0, via Wikimedia Commons
AI coding assistants have moved from novelty to default in many US engineering organizations. Developers accept suggestions in the IDE, paste generated blocks into pull requests, and move on. In 2026, the more common failure is quieter: an enterprise cannot say which repository lines were machine-generated, which model produced them, or what license obligations traveled with them. That is a provenance deficit, and it turns open-source compliance from a dependency exercise into an audit of employee behavior and vendor contracts.
The gap between generation and provenance
Traditional open-source governance assumes a package has a name, version, maintainer, and license. AI-generated code often has none of these. A suggestion can reproduce a fragment, paraphrase a copyleft routine, or combine patterns from multiple sources. The developer may accept it without a comment. The commit history records a human author. The tool may log the interaction, but logs are rarely tied to repository objects or retained under legal-hold standards. When counsel asks how a function entered the codebase, engineering may have only a chat transcript, if that.
Why scanners see a different repository
Software composition analysis and license scanners are necessary, but they are not designed to answer this question. They detect declared dependencies and textual matches. Generated code can sit outside package manifests. A scanner may flag a suspicious block, but it cannot infer whether the block was copied, paraphrased, or independently written. Copyleft obligations such as AGPL can be especially difficult because the trigger is use and network exposure, not merely distribution. A clean SBOM can therefore coexist with unresolved license exposure in application code.
A practical audit program
Enterprises should treat AI-assisted development as a controlled process, not a banned one. A workable program has several layers.
- Inventory the tools and models in use, including IDE plug-ins, chat interfaces, and agentic coding services. Record which repositories they can access and whether prompts or outputs are retained.
- Require lightweight attestations at the pull request level. Developers should indicate whether AI assistance was material to the change. This is not about policing individuals. It creates a signal for reviewers and auditors.
- Extend scanning beyond dependencies. Run license and similarity checks on generated blocks, and route copyleft-adjacent findings to legal review. Automate the obvious cases, but keep human judgment for compatibility questions.
- Add provenance metadata where possible. Capture tool name, model identifier, and session reference in commit trailers or an internal system. The goal is reconstruction, not surveillance.
- Review vendor contracts for indemnity conditions. Many AI vendor indemnities are narrow. They may exclude outputs modified by the customer, require use of specific filters, cap liability, or terminate on policy violations. Marketing pages are not contract language.
- Include AI-generated code in M&A and vendor due-diligence questionnaires. Buyers increasingly ask whether target repositories contain machine-generated material and how it was reviewed. A negative answer without evidence is not reassuring.
The indemnity illusion
Indemnity is often presented as the safety net for AI-generated code. In practice, it is a contractual remedy with conditions. Legal teams should ask what triggers coverage, who must be notified, which models and features are covered, whether the vendor can control the defense, and what happens if the customer combines generated code with its own. They should also ask whether the vendor will provide model documentation or audit cooperation. A promise to defend claims is not the same as a promise to prevent them.
What the board should see
The board does not need a model-by-model tutorial. It needs a risk metric. Track the share of repositories where AI assistance is permitted, the percentage of commits with provenance signals, the number of unresolved license flags, the average time to remediate, and the share of AI tool spend covered by reviewed indemnity terms. These numbers make the provenance deficit visible before it becomes a dispute.
The goal is not to slow developers down. It is to make the invisible visible. AI-generated code is now part of the enterprise supply chain. It deserves the same discipline as any other dependency: inventory, review, documentation, and a clear owner when something goes wrong.