The Drift Log · Provenance, licensing and the paper trail
Rejecting Ambiguous SPDX Identifiers in CI Pipelines
23 November 2026 · 3 min read · 724 words · established

Informal license strings like BSD-style or slash delimiters break automated SBOM tooling. Enforce strict SPDX grammar at your CI build gate.
A manifest contains "license": "BSD-style". Another lists "MIT/GPL-2.0". A third simply says "Custom".
The build succeeds. The package manager installs the dependencies without a warning. The application ships to production.
Six months later, during a commercial acquisition or an enterprise vendor assessment, the legal team runs an automated license compliance scanner over your software bill of materials (SBOM). The scanner flags twenty-four vendored packages as NOASSERTION or UNKNOWN. The audit halts. Engineers spend three days digging through five-year-old GitHub commits to determine whether that "BSD-style" library was BSD-2-Clause, BSD-3-Clause, or the 4-Clause variant with an active advertising clause that your legal counsel refuses to sign off on.
Licensing provenance for vendored code should never be a folder of hope. When you allow freeform strings in dependency manifests, you trade thirty seconds of developer convenience for downstream contractual risk.
The Fallacy of the Human-Readable License Field
Package ecosystems historically treated the license field as documentation rather than an enforceable contract. Package authors wrote descriptions instead of identifiers:
"BSD"(Ambiguous: BSD-2-Clause, BSD-3-Clause, BSD-4-Clause?)"GPL"(Ambiguous: GPL-2.0-only, GPL-2.0-or-later, GPL-3.0-only?)"Apache 2"(Syntax error under strict tooling)"Public Domain"(Not a recognized legal grant in many jurisdictions)
An SPDX license identifier is not a label; it is a pointer to an exact set of legal terms maintained on the standard SPDX License List. When a dependency uses an informal string, automated software provenance tooling cannot determine your obligations. It cannot evaluate whether patent grants apply, whether source redistribution is mandatory, or whether a copyleft boundary has been breached.
Treating license metadata as arbitrary text breaks the automation necessary for continuous license compliance. The moment an unvalidated string lands in your repository, the paper trail dissolves.
Parsing Syntax at the Build Gate
The fix is not to conduct periodic compliance audits. Periodic audits are post-mortems. The fix is a strict build gate in CI that rejects any manifest containing an unvalidated license expression.
An SPDX license expression parser must enforce two invariants:
- Exact identifier match: Every license token must exist on the current SPDX License List (e.g.,
BSD-3-Clause, notBSD). - Valid compound grammar: Dual-licensing and exceptions must use explicit boolean operators (
AND,OR,WITH) rather than slashes or commas.
If an internal tool or a third-party dependency uses a proprietary or custom grant, it must explicitly use the LicenseRef-[idstring] prefix and supply the license text alongside the artifact.
## Minimal CI validation step using an SPDX parser
node -e '
const spdxCorrect = require("spdx-correct");
const parse = require("spdx-expression-parse");
const rawLicense = require("./package.json").license;
try {
parse(rawLicense);
console.log(`Valid SPDX identifier: ${rawLicense}`);
} catch (err) {
console.error(`BUILD FAILED: Invalid SPDX license string "${rawLicense}".`);
console.error(`Did you mean "${spdxCorrect(rawLicense)}"?`);
process.exit(1);
}
'
If a vendored dependency contains an invalid string, fail the pipeline before it reaches your registry. Patching the manifest upstream or maintaining an internal override mapping forces the legal decision into the open at the moment of import, rather than during an audit.
This policy must apply to all code entering your tree. Resolving licensing invariants upfront is fundamental to maintaining a verified codebase, a topic covered in detail in our doctrine on provenance-first build intent.
Licensing Invariants in SHPBL
At SHPBL, license verification is not deferred to an external scanner. Every write operation passes through a Build Intent gate before any artifact reaches disk.
The proposal is registered, and licensing invariants are resolved strictly in code against canonical SPDX definitions. The engineered catalog is owned outright and model-independent: no AI model generates our components, and no runtime behavior relies on model outputs. All release archives provide byte-for-byte reproducibility, sealed by published checksums in our root of trust.
To inspect your own dependency tree for unvalidated license declarations and provenance gaps, run a free repository evaluation.
What to Implement on Monday
You do not need to overhaul your entire legal stack to fix ambiguous licensing. Start with three concrete CI rules:
- Add a manifest linter to PR checks. Reject any first-party package whose
licensefield does not parse cleanly under the SPDX 2.3/3.0 specification. - Flag
NOASSERTIONin dependency lockfiles. If a package manager resolves a transitive dependency with a missing or non-standard license string, require an explicit entry in an internal.license-overrides.jsonfile before the build proceeds. - Disallow bare slash delimiters. Convert patterns like
"MIT/Apache-2.0"to either"(MIT OR Apache-2.0)"or"(MIT AND Apache-2.0)"depending on the upstream author's true legal posture.
If a license cannot be parsed by machine, it cannot be trusted by the business. Stop accepting descriptions; require specifications.
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.
- Validating Copyleft Boundaries in Multi-Package Repositories
Monorepo workspace links let copyleft dependencies leak into proprietary binaries across unmonitored internal package boundaries.
The Strategic Master Library · written and reviewed under the house's own epistemic rules: nothing claimed that we cannot show.