Glossary · Automation software engineering and architecture
Code provenance
Also known as: Software provenance, Provenance data, Build provenance
German: Code-Provenienz
In software engineering, code provenance is the documented origin of a code segment: who or what produced it, with which tool and version, on what basis, and who reviewed and accepted it into the product. It is recorded in commit metadata, review records, build attestations and release documentation, because it cannot be derived from the code itself. Supply-chain specifications such as SLSA provenance and the in-toto Attestation Framework describe the build and packaging part of that chain in machine-readable form; the authorship and approval part is carried by version control conventions, sign-off trailers and review records.
- Software engineering
- Technical documentation
- Standards
- OT security
In one sentence
Code provenance documents where a code segment came from: person, tool, model, basis, and who approved it into the product.
Example
After a regulator asked where the interlock logic in the batch controller came from, the team could show the pull request, the reviewer who approved it, the assistant and model version named in the commit trailer, and the build attestation for the release package that shipped it.
How it applies
- Two layers, one question: Provenance has an authorship layer (who wrote or proposed this, with which tool, from which prompt or template, under which license) and a build layer (which builder, which source revision, which inputs produced this artifact). Supply-chain work usually starts with the build layer because it can be generated automatically in the CI/CD pipeline; the authorship layer needs editorial discipline in version control.
- Where to put it: Keep provenance in records that travel with the change — commit messages and structured trailers, pull request discussion and approvals, signed commits or tags, build attestations stored next to the build artifact in the artifact repository, and a short statement in the release note. Comments in the source code rot and are refactored away; metadata that is signed and archived survives.
- AI-assisted work: If an assistant proposed a block of code, the provenance record should name the tool and, where available, the model or version, and the human who accepted it. Accountability does not move to the tool: the reviewer who approves a change owns it, and the review record is the evidence of that decision. Acceptance counts from AI usage telemetry are an adoption metric, not a provenance record for a specific line of code.
- Licensing and third-party material: Provenance is how license questions become answerable later — copied snippets, vendored libraries, generated code with unclear training origin. Record the declared origin and license for anything brought in from outside, and keep that record consistent with your software dependency data, including transitive dependencies.
- Engineering integration: Generate what can be generated. A provenance attestation emitted by the build pipeline is more trustworthy than a manual note, and it can be verified at deployment time as a policy gate. Treat the attestation format and its fields as a versioned interface, not as free text.
- Safety and regulated contexts: For software in safety or GxP environments, the origin and approval of a change is part of the controlled configuration, alongside static code analysis results, test evidence and the traceability matrix. Where functional safety or quality management requires reviewed and approved changes, a provenance record that cannot identify the approver is an audit finding waiting to happen.
- EU regulatory context (as of October 7, 2026): The Cyber Resilience Act, Regulation (EU) 2024/2847, obliges manufacturers of products with digital elements to identify and document the components they contain, including a software bill of materials; its requirements phase in over several years, so check the application dates in the regulation on EUR-Lex before planning a rollout. Annex IV of the AI Act, Regulation (EU) 2024/1689, lists for high-risk AI systems a description of the development methods and steps, including recourse to systems or tools provided by third parties — a provenance question about the development process. Whether AI-generated source code is covered by the AI Act's marking rules for synthetic content is not settled in published guidance; do not build a documentation process on the assumption that it is or is not.
- No compliance by naming: Producing SLSA-style provenance, referencing the NIST Secure Software Development Framework or shipping an SBOM does not by itself make a product compliant with any regulation. The records are evidence; conformity is assessed against the applicable legal requirements.
- For documentation teams: Decide which provenance facts are internal evidence and which belong in customer-facing documents. Release documentation for an automation system typically states the release identity, included components and their versions; the detail of who proposed which hunk stays in the repository, reachable on request.
Code provenance vs. data lineage
Code provenance answers where a piece of logic came from and who took responsibility for it: author or assistant, tool version, review, approval, build. Data lineage answers where a data value came from and how it was transformed: source system, pipeline step, schema mapping, load time. Both are provenance in the general sense, and both are recorded outside the thing they describe, but they serve different audits — a code review record will not explain a wrong number in a report, and a lineage graph will not tell you who approved the transformation logic.
External references
- SLSA — Provenance specification
- in-toto Attestation Framework
- NIST SP 800-218, Secure Software Development Framework (SSDF)
- Developer Certificate of Origin
- Git documentation — git commit (trailers, signing)
- W3C PROV-O: The PROV Ontology
- EUR-Lex — Regulation (EU) 2024/2847 (Cyber Resilience Act)
- EUR-Lex — Regulation (EU) 2024/1689 (AI Act)