Skip to content

The Drift Log · Provenance, licensing and the paper trail

Auditing Vendored Dependencies Beyond the LICENSE File

1 September 2026 · 4 min read · 899 words · established

Two identical sealed archive crates with matching checksum plates

A top-level LICENSE file is an assertion, not proof. Learn how to audit vendored dependencies using cryptographic provenance and file-level diffing.

A repository's vendor/ or third_party/ directory is often treated as a solved problem because someone committed a LICENSE file next to the code five years ago.

That file is usually an MIT or Apache-2.0 notice copied from an upstream project's root. It tells you what license the upstream maintainer intended to apply to their own work. It tells you nothing about the six helper files inside that directory that were copied from a Stack Overflow thread, the SIMD optimization ported from a GPL-3.0 codebase, or the cryptographic routine borrowed from an unmaintained BSD-4-clause repository.

When teams audit third-party logic, they check the top-level declaration and mark the dependency clean. This is compliance by wishful thinking. A top-level license file is an assertion, not a proof. Real software provenance requires verifying where the bytes originated, under what terms, and whether those terms apply to every file inside the package.

The Blind Spot in Standard SBOM Generation

Most Software Bill of Materials (SBOM) tools inspect package manager manifests. They parse package.json, go.mod, or Cargo.lock, query an ecosystem registry, and extract the declared license identifier.

This model breaks the moment code is vendored directly into a repository tree.

When source code is committed directly into your repository, package manifests are often stripped, edited, or ignored by standard build tooling. Worse, developers frequently import only a subdirectory of an upstream library to save space. In doing so, they leave behind the original license notices, copyright headers, and attribution files that were present at the upstream root.

vendor/
└── fast-json/
    ├── LICENSE          <-- Declares MIT
    ├── parser.c         <-- MIT (Original author)
    └── dtoa.c           <-- Ported from David M. Gay (Custom permissive with attribution requirement)

In the example above, an automated scanner parsing vendor/fast-json/LICENSE records the component as MIT. It misses the specific attribution and disclaimer requirements embedded inside dtoa.c.

If your license compliance workflow relies strictly on root-level directory scans, your SBOM reflects an idealized summary rather than the legal realities of your codebase. As discussed in our analysis on why vendoring code without a paper trail is unsecured debt, unverified imports quietly accumulate liability until an acquisition audit, enterprise customer review, or copyright claim forces a manual reconciliation.

Provenance Demands Cryptographic Lineage

A compliant directory is not one that contains a license file. A compliant directory is one whose contents can be matched exactly to a known, verified upstream release.

True license compliance for vendored code relies on tracing each artifact back to its origin through verifiable source archives and cryptographic checksums.

If you vendor a third-party library, the minimum viable audit record must answer three questions:

  1. What was the exact upstream release archive URL?
  2. Does the SHA-256 hash of the downloaded source match the upstream maintainer's published checksum?
  3. Which specific files were added, modified, or removed between the upstream archive and your committed vendor/ directory?

When you maintain an immutable root of trust for external code via archive digests, downstream auditing becomes deterministic. You no longer need to read thousands of lines of C or Go looking for hidden license headers during every release cycle. You verify the archive digest once, record the upstream license matrix for that specific digest, and diff your committed tree against the unmodified archive.

If a file in your repository does not match a checksum from an authenticated upstream archive, that file is first-party code from a compliance perspective. It requires immediate, manual code-level verification.

The Limits of Source Matching

This approach is rigorous, but it has limits.

First, cryptographic matching fails when upstream maintainers rewrite Git tags or release tarballs without changing the version string. In those cases, your hash changes, triggering an alert that requires manual investigation to confirm whether the change was benign maintenance or upstream tampering.

Second, matching against an upstream archive only confirms that you have the same bytes as the upstream release. It does not guarantee that the upstream author complied with their own transitive dependencies. If an open-source author pasted copyleft code into their MIT repository, your archive hash will match their release perfectly, but the underlying compliance defect remains.

Cryptographic provenance does not eliminate legal risk; it isolates and bounds it. It ensures your organization can demonstrate diligence, reproduce every dependency build from verified inputs, and isolate genuine upstream defects from self-inflicted provenance gaps.

An Actionable Audit Protocol for Monday

To determine the actual state of your vendored dependencies, run this audit across your primary repository next week:

  1. Isolate all in-tree external code. List every directory containing vendored code, whether in vendor/, third_party/, or nested inside your internal/ packages.
  2. Search for internal copyright declarations. Run a regex scan across those directories for copyright notices, SPDX tags, and author disclaimers that differ from the top-level directory license:
   grep -rnEi "(copyright|\(c\)|spdx-license-identifier)" vendor/ | grep -v "vendor/LICENSE"
  1. Verify against upstream hashes. For each vendored library, retrieve the official release tarball from the upstream provider. Calculate its SHA-256 digest, unpack it, and run a recursive diff against your vendored copy.
  2. Document the drift. Any diff between your tree and the upstream release should be captured in a committed metadata file (such as PROVENANCE.md) detailing why the modification exists and confirming no conflicting licenses were introduced.

If you cannot identify the upstream archive or reproduce the hash for a directory, flag that component. Until its origin is proven, it is an undocumented liability. If your team needs to baseline external code liabilities across a large monorepo, a free repository evaluation can help surface undocumented boundaries before you begin manual remediation.

This post supports the longer argument in Vendoring Code Without a Paper Trail Is Unsecured Debt.

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.