The Drift Log · Provenance, licensing and the paper trail
Tracing Origin Metadata for Inlined Snippets in Git History
24 November 2026 · 3 min read · 706 words · established

Inlined utility code bypasses lockfile SBOM scanners. Track origin commit SHAs and SPDX licenses in structured manifests before merge.
A developer needs a fast Murmur3 implementation or a small ring buffer. Instead of pulling in a heavy package with transitive dependencies, they copy forty lines out of an existing open-source project and drop them into src/utils/hash.ts. The commit message reads "add hash helper." The pull request merges without comment.
Your conventional software bill of materials (SBOM) tools now report that your repository is clean.
Standard scanners inspect lockfiles—Cargo.lock, package-lock.json, go.sum—and match declared package versions against vulnerability databases. They do not parse arbitrary internal utility files for code authored elsewhere. Inlined code bypasses dependency scanners entirely. The result is a folder of hope: you assume your team tracked copyright attribution and terms, while your actual software provenance paper trail has a blind spot.
Why Git Blame Is Not a Paper Trail
When third-party code is pasted into a source tree, Git records the committing engineer as the author. The commit message rarely contains the original author's name, the upstream source repository, the source commit hash, or the exact license text under which the code was acquired.
Over three years and four refactors, lines move. Functions are renamed. The original PR context is buried.
$ git blame src/utils/hash.ts
c4f9a12b (Alex Mercer 2023-04-12 14:22:01) export function murmur3(key: Uint8Array): number {
c4f9a12b (Alex Mercer 2023-04-12 14:22:01) let h = 0;
...
If an intellectual property audit or due diligence review arrives, you cannot verify license compliance by running git log. If the upstream snippet came from an MPL-2.0 or GPL-licensed file, or if the original MIT header required an explicit copyright notice that was dropped during copy-pasting, the repository is carrying unmanaged copyright liabilities.
Relying on developers to remember origin details months later is not a compliance strategy.
Attaching Origin Metadata to the Tree
The correct posture is to treat inlined third-party code as a managed vendor artifact. If code cannot be brought in through a package manager, its origin metadata must be committed alongside the file in a structured, machine-readable format.
A minimal provenance manifest binds the local file path to the upstream commit SHA, origin repository, author metadata, and validated SPDX expression:
{
"$schema": "https://shpbl.com/schemas/provenance-entry.json",
"target": "src/utils/hash.ts",
"origin": {
"repository": "https://github.com/upstream/murmur-ts",
"commit": "8f2d3a910bfbc04519f8ec2314a22e89d1b64721",
"path": "src/index.ts",
"license": "Apache-2.0",
"copyright": "Copyright 2021 Upstream Authors"
},
"verified_at": "2024-03-01T10:00:00Z"
}
Recording the upstream commit SHA rather than a branch name prevents ambiguity if the upstream repository updates or re-licenses downstream.
When origin metadata is recorded as a structured manifest, CI can enforce rules before merging. If a file is marked as inlined third-party code, your pipeline can assert that:
- The SPDX identifier is valid and permitted under your organization's policy.
- The copyright attribution string is preserved in the target file header.
- The upstream source repository and commit SHA exist and are resolvable.
This prevents the loss of license context described in our guide on reconstructing license headers from stripped vendor trees. Enforcing these invariants at integration time aligns with a provenance-first build intent posture: resolve licensing terms before allowing the code to sit permanently in your master branch.
How SHPBL Enforces Provenance Invariants
SHPBL eliminates ambiguous provenance by treating software capability as owned, repeatable artifacts rather than unverified pasted snippets. When an agent or developer extracts components through the library, every write passes through a Build Intent gate. The proposal is registered, invariants and licensing terms are resolved in code, and a verified state is returned before disk writes occur.
Our corpus is model-independent. Code is computed and owned outright, sealed by published archive checksums on our root of trust. For teams auditing their existing trees, our free repository evaluation analyzes your codebases to identify unmanaged structures and licensing ambiguities before they turn into audit liabilities.
What to Do on Monday
Run a targeted scan across your internal utility directories for common snippet patterns, stripped headers, and unlinked algorithms.
Pick one directory containing vendored or inlined helpers:
- Identify every file containing logic copied from external sources.
- Trace the original source commit SHA, repository URL, and license terms.
- Add a structured manifest (
.provenance.json) to that directory mapping each file to its exact upstream origin and SPDX license. - Add a CI linter rule that fails if a file tagged as external lacks a corresponding entry in the manifest.
Stop relying on commit history to prove licensing compliance. If the origin commit and license terms are not recorded directly in your provenance manifests, you do not own a paper trail—you own an unverified assertion.
This post supports the longer argument in Provenance-First Build Intent: Licensing Invariants Before Disk Writes.
Keep reading
Next in the log
- Provenance-First Build Intent: Licensing Invariants Before Disk Writes
Evaluate license compatibility and origin invariants at a build intent gate before external or agent-generated code ever writes to disk.
- Continuous License Attribution Pipeline for Vendored Code
Vendored code strips package manifests and breaks standard dependency scanners. Here is how to enforce license invariants continuously in CI.
- Rejecting Ambiguous SPDX Identifiers in CI Pipelines
Informal license strings like BSD-style or slash delimiters break automated SBOM tooling. Enforce strict SPDX grammar at your CI build gate.
The Strategic Master Library · written and reviewed under the house's own epistemic rules: nothing claimed that we cannot show.