Join our Newsletter — 33% off our NHI Course

How should security teams handle SBOMs when code is vendored into repositories?

They should treat vendored code as first-class inventory, not as an implicit part of the repository. That means requiring origin records, version context and ownership for every copied dependency, then validating those records against repository scans and supplier evidence. A manifest-only SBOM is not enough when source code has been embedded by hand.

How vendored code changes SBOM handling

Once code is vendored, the repository no longer reflects a simple dependency tree. Security teams need to treat the copied source as its own inventory item, with origin, version, and ownership recorded explicitly so the SBOM describes what was actually embedded, not just what the package manager still thinks is present. That matters because vendoring can freeze in old code, patch gaps, and hidden transitive content.

For teams working from an SBOM workflow, the practical shift is from passive consumption to source reconciliation. A manifest that lists the top-level repository contents is not enough if files were copied in by hand or if a subtree was imported from another project. The inventory must explain where the code came from, when it was copied, and which upstream release or commit it maps to.

This is where the question becomes operational rather than theoretical. A vendored dependency can carry different license terms, vulnerability exposure, and maintenance expectations from the parent repository. If the copied code is treated as ordinary first-party code, reviewers may miss a stale library, an abandoned fork, or a component that needs separate patch and disclosure tracking. NHIMG’s SBOM Guide is useful here because it frames SBOM quality, vulnerability correlation, and SBOM handling as an active control problem, not a documentation exercise.

Why provenance, version context, and ownership matter

Vendoring breaks a common assumption behind software inventories, which is that each dependency can be inferred from package metadata alone. In reality, copied code may be modified, flattened into the repository, or stripped of its original release markers. The resulting SBOM has to preserve provenance evidence, otherwise the team cannot reliably determine whether the embedded code matches the upstream release, whether it has been altered, or who owns ongoing remediation.

Version context is especially important because a vendored snapshot can look current while actually lagging far behind upstream security fixes. Ownership matters for the same reason: if nobody is assigned responsibility for that copied code, the repository becomes a blind spot for vulnerability triage, patch intake, and exception handling. That is why teams should align the SBOM record with repository scans and supplier evidence rather than assuming one source of truth is enough. The Open Source Security Guide directly supports that workflow because it ties SBOMs to SCA, pinning, trusted publishing, and vulnerability data.

Vendoring also changes how change review should work. If a copied dependency is updated manually, the diff may hide security-relevant changes inside a larger codebase review. Teams need a process that can answer whether the vendored directory is still an upstream mirror, a locally maintained fork, or effectively first-party code. Without that distinction, the SBOM cannot support accurate impact analysis when a new CVE, license issue, or supplier alert appears.

What a good workflow looks like in practice

A usable approach is to make vendored code visible at three levels: source identity, code identity, and accountability. Source identity records where it came from. Code identity records the upstream version, commit, tag, or release. Accountability records who updates it, who reviews it, and how changes are approved. Those three elements let security, engineering, and procurement speak about the same component without relying on assumption or tribal memory.

Repository scans should then verify the SBOM, not replace it. Scanners can show that a directory contains copied code or a known library signature, but they cannot reliably tell you whether the copied content was intentionally modified, whether the upstream source was trustworthy, or whether the owner has accepted the risk of lagging behind upstream fixes. Supplier evidence closes that gap by showing what the upstream producer says the component is, while internal scans show what is actually in the repository. NHIMG’s Open Source Security Guide is the right companion for teams that need to combine those signals into one control picture.

For teams that already run vulnerability management programs, vendored code should be handled as a distinct exception class when its origin cannot be mapped cleanly. That means the workflow should flag copied code that lacks a reproducible provenance trail, a clear version mapping, or an accountable owner. If the repository contains embedded upstream code that is no longer maintained, the safe default is to treat it as a separate dependency with its own lifecycle rather than burying it inside the product codebase.

Risk and Threat Considerations

Vendored code creates exposure when teams assume copied source is automatically trustworthy, current, or fully covered by the repository SBOM. That assumption can hide stale libraries, untracked forks, and code paths that keep shipping long after upstream security fixes are available.

Failure mechanism: The repository inventory loses the link between copied source, upstream release history, and ownership, so scans and human review no longer agree on what the component actually is.

Impact: Vulnerabilities can remain unpatched, license obligations can be missed, and incident response may mis-rank the blast radius because the real dependency footprint is invisible.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

CIS Controls v8, NIST SP 800-53 Rev 5, OWASP ASVS and SLSA set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
CIS Controls v8 CIS-2 — Software Inventory Vendored code must be inventoried separately from the repo body.
Recommendation — Track copied dependencies as distinct software assets and reconcile them against scans.
NIST SP 800-53 Rev 5 CM-8 — System Component Inventory Copied source needs an accurate component inventory and ownership context.
SA-10 — Developer Configuration Management Vendoring is a controlled software change that needs traceable source and version records.
Recommendation — Maintain an authoritative inventory for vendored components and validate it regularly. Require provenance and version traceability for copied code before release.
OWASP ASVS V15 — Secure Coding and Architecture Embedded third-party code affects codebase trust, change control, and review depth.
Recommendation — Review vendored code as an explicit architecture and trust boundary in release assurance.
SLSA Supply Chain Integrity Vendored code raises provenance and build integrity questions central to supply-chain assurance.
Recommendation — Preserve provenance evidence for embedded code and verify it against build inputs.

Practitioner Guidance

What to verify: Require every vendored component to have a recorded upstream source, a specific version or commit reference, and an accountable owner before it is accepted into the build or release process.

Decision rule: If the code was copied by hand or modified locally, do not rely on a manifest-only SBOM. Treat the vendored subtree as inventory that must be reconciled against both repository scanning results and supplier evidence.

Common mistake: Teams often assume that once code is in the repository, ordinary source control is enough. For vendored dependencies, the security question is not just where the code lives, but whether you can still prove what it is and where it came from.

Practitioner takeaway: The goal is provenance-aware inventory, not just component listing, because vendored code only becomes manageable when the SBOM can still support patching, ownership, and trust decisions.