The Drift Log · Provenance, licensing and the paper trail
Continuous SBOM Comparison for License Consistency
17 November 2026 · 3 min read · 690 words · established

Catch license drift in vendored directories by diffing file-level SPDX graphs directly in your CI pipeline instead of relying on lockfile scanners.
Someone copies a utility file into internal/vendor/ or pkg/third_party/. It starts under an MIT license. Six months later, another developer edits the file to fix an edge case, replaces a sub-routine with code copied from a copyleft repository, and removes the top comment block during a reformat.
Standard package-manager scanners see nothing. The lockfile did not change, package.json or go.mod was untouched, and the build passes. You now have unrecorded license drift inside your vendor tree.
When provenance lives only in developer memory or scattered header comments, internal modifications quietly erase it.
Why Manifest Scanners Miss Vendored Drift
Most software composition analysis (SCA) tools operate at the package boundary. They read lockfiles, query package registries, and report the declared license of version 1.4.2.
Vendored code breaks this model. The moment a dependency is checked directly into your repository, it enters a state of continuous drift:
- Header stripping: Linters or automated formatters strip license headers from the top of files.
- Ad-hoc grafting: A developer copies three helper functions from an external library into an existing vendored file without carrying over the original
LICENSEfile. - Internal patches: Fixes applied locally deviate from the upstream release, sometimes pulling in external code with conflicting obligations.
If your scanner only checks metadata manifests, it treats the vendor directory as an opaque blob or trusts the top-level declaration for the entire directory. The actual legal surface of the code drifts out of alignment with your compliance policy.
Enforcing Consistency with an SBOM Diff
To catch this drift, your build pipeline must treat licensing as source code: versioned, structured, and diffed on every merge request.
Instead of generating a Software Bill of Materials (SBOM) only when releasing a binary, you generate an internal, file-level SBOM for the base branch and another for the pull request. You then run an automated sbom diff between the two.
--- base.spdx.json
+++ head.spdx.json
@@ -412,3 +412,3 @@
"SPDXID": "SPDXRef-File-vendor-codec-utils-go",
"fileName": "./vendor/codec/utils.go",
- "licenseConcluded": "MIT",
+ "licenseConcluded": "NOASSERTION",
"licenseInfoInFile": [
- "MIT"
+ "NONE"
]
When a pull request introduces an sbom diff that changes a known permissive license to NOASSERTION, NONE, or a restricted license, the CI pipeline halts.
This requires three basic operations in your pipeline:
- File-level extraction: The SBOM generator must inspect the headers, inline expressions, and checksums of individual files in vendored paths, not just root package manifests.
- Normalization: License identifiers must map to valid SPDX IDs.
- Structural comparison: The diff tool compares the SPDX graphs rather than raw text files, catching transitions where a file's concluded license conflicts with repository invariants.
Integrating this into your merge checks turns licensing verification into a standard build gate. For a broader architectural look at setting up this workflow, see our guide on building a continuous license attribution pipeline for vendored code.
Provenance Automation at the Invariant Level
Automating provenance requires moving past post-hoc audits. If you wait until a funding round, an acquisition, or an enterprise customer audit to inspect vendor/, you will spend weeks reconstructing the commit history of isolated files.
Effective provenance automation enforces three invariants on every commit:
- No unlabelled files: Every file added to a vendored tree must resolve to an explicit SPDX license identifier.
- No implicit conversions: If an internal change alters the licensing state of a file (for example, combining two files with different terms), the pipeline must force the developer to declare the resulting license explicitly.
- Immutability of upstream blocks: Modifying the copyright notices or original license headers of third-party code fails the build immediately.
By comparing SBOM outputs directly in CI, the author of the pull request deals with the provenance conflict while the context is fresh, rather than leaving a silent liability for future maintainers.
How SHPBL Enforces Invariants
SHPBL eliminates licensing drift by verifying invariants at the code level.
Every operation in our system passes through a Build Intent gate. The proposal is registered, invariants and licensing terms are resolved directly in code, and a terminal state is returned before any artifact is committed. The library is model-independent: no AI model runs inside the software, and no component's behaviour depends on a model's output at runtime, ensuring there is no hallucination surface in the artifact you ship.
This post supports the longer argument in Continuous License Attribution Pipeline for Vendored Code.
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.