Skip to content

The Drift Log · Provenance, licensing and the paper trail

Replacing Folder-of-Hope Vendoring with Verified SBOMs

27 October 2026 · 3 min read · 675 words · established

A wax seal resting on a page of hash digests

Vendoring code without an explicit manifest breaks vulnerability scanning and license provenance. Bind external source to verifiable SBOM metadata.

The Vendor Directory as an Accountability Sink

A developer needs a single utility function or a hotfix from an upstream library that has not cut a release. They copy three files into src/vendor/ or internal/third_party/, update the import paths, verify the test suite passes, and open a pull request. The immediate build failure is solved.

Six months later, nobody on the team knows which commit those files came from.

This is folder-of-hope vendoring. It assumes that dropping source code into a repository preserves its context by osmosis. It does not. The moment code is pasted across repository boundaries without an explicit, machine-readable manifest, its origin, exact revision, and legal terms vanish into tribal memory.

When tribal memory fails, vendoring code without a paper trail is unsecured debt. You retain all the operational risk of running third-party software with none of the visibility provided by a dependency manager.

Why Package Scanners Fail on Vendored Code

Modern package managers record provenance in lockfiles. Automated scanners parse package-lock.json, go.sum, or Cargo.lock to resolve dependency trees against vulnerability databases and license indices.

Vendored code bypasses these mechanisms entirely. Unless a scanner runs full-text fuzzy matching across every raw source file, it treats vendored files as first-party code written by your team. This creates two distinct points of failure:

  1. Undetected vulnerabilities. If upstream issues a critical CVE patch, your automated alerting ignores the copy in your tree because no package manifest declares the package name or version.
  2. License compliance exposure. If a copied file contains ambiguous header comments, or if the upstream repository moves between permissive and copyleft terms across versions, you cannot prove which license governed the exact slice of code you ingested.

When teams carry out auditing vendored source trees for dual-license traps, they often discover that what they assumed was MIT-licensed utility code was actually governed by an AGPL-3.0 or commercial-only license in that specific snapshot. Cleaning this up after product release requires legal review, emergency refactoring, or rushed replacement of core logic.

Binding Ingestion to a Machine-Readable SBOM

The fix is not to ban vendoring. Inlining critical paths or pinning third-party code directly in your tree is often a legitimate engineering decision to prevent upstream tampering and ensure supply chain security.

The fix is to forbid unmanifested vendoring. Every piece of external code brought into a repository must be bound to a Software Bill of Materials (SBOM) entry at the point of ingestion.

A minimal ingestion manifest should sit directly alongside the vendored tree or inside an inventory descriptor at the root of the project:

{
  "path": "src/vendor/fast-hash",
  "upstream": "https://github.com/example/fast-hash",
  "commit": "8f3b2a1c0d9e8f7a6b5c4d3e2f1a0b9c8d7e6f5a",
  "spdx_license": "Apache-2.0",
  "tree_sha256": "4a5f6e7d8c9b0a1f2e3d4c5b6a7f8e9d0c1b2a3f4e5d6c7b8a9f0e1d2c3b4a5f",
  "ingested_at": "2024-03-12T14:22:00Z"
}

This structure converts an informal directory into an auditable artifact. By recording the exact upstream commit, the verified SPDX identifier, and the computed checksum of the ingested directory, you create a verifiable record. If the files in that directory change, the checksum fails, signaling either an unreviewed local modification or an untracked update.

Establishing this baseline mirrors the discipline required for verifiable distributions, where release artifacts are anchored to a published root of trust rather than assumed safe by default.

What to Enforce on Monday

You do not need an enterprise governance rollout to stop unverified vendoring. You need a strict check in CI.

  1. Audit your existing tree. Run a search for unmanifested third-party directories. Look for vendor/, third_party/, lib/, or standalone .c, .go, and .ts files that lack first-party commit history.
  2. Declare the baseline. For every identified external component, create a companion manifest documenting its upstream source, commit hash, and SPDX license expression. Capture the raw license file alongside the code.
  3. Block untracked files in CI. Add a pre-merge check that scans designated third-party paths. If code exists in those paths without a corresponding manifest and a matching directory hash, the build fails.

Treating third-party code as an accountable transaction costs ten minutes at ingestion. Treating it as a folder of hope costs weeks during a compliance audit or security incident. Bind the manifest to the code before it merges.

Keep reading

Next in the log

The Strategic Master Library · written and reviewed under the house's own epistemic rules: nothing claimed that we cannot show.