security
Spot vendored dependencies missing from an SBOM
Review dependencies copied into source or build artifacts, reconcile them with your software bill of materials, and record unknown versions conservatively.
TrustIvan · · 10 min read
A frontend dependency review produces an SBOM with a clean row for the current version of a formatting package. The production bundle also carries a copy of the same library imported years ago from a third-party archive. The copied file has had local changes and has no entry in the active lockfile. Updating the declared package leaves that second copy in place.
An inventory of package-manager inputs covers what the package manager knows. Shipped software can also include copied source, static bundles, shared objects, native helpers, or archives added during packaging. A review of vendored dependencies asks which external components actually ship, how you know their origin, and whether the SBOM describes that coverage accurately.
Follow the artifact first
Start with an authorized release artifact as delivered. Give the review a precise scope, such as an application image manifest for a specific platform, a browser bundle checksum, or a downloadable archive. Inventory paths likely to carry third-party code. Examples include a vendored directory copied into a container image, static assets added after frontend compilation, prebuilt helpers included by a packaging step, and compiled libraries inherited from a separate build.
Trace each candidate back through the release instructions. Check the build step, source repository or archive, and any location where an output is copied into a later stage. A repository directory can contain tests, upstream sources, and assets that will never leave the build. An artifact can include a new file downloaded during release that never lived in the repository. Looking in both places is what connects origin and presence.
Record the evidence you reviewed and its artifact identity. A staging build can have a feature flag or platform selection that changes the contents. If the production release uses another artifact, verify it separately or show explicit equivalence for the reviewed component. In a multi-platform release, compare manifests containing the actual shipped variants and record any differences in helper binaries or bundled libraries.
For a build tool dependency, record where it is used and how it is covered by your build inventory. Keep that decision distinct from whether its library code or outputs appear in the runtime package. A tool can influence the integrity of the build while having no installation in the delivered artifact.
Determine what the upstream evidence supports
Begin with the strongest evidence your build preserved. A vendoring record often names the source repository or registry, the upstream commit, version or release, integrity value, local modifications, and path. Automated vendoring mechanisms can preserve additional metadata. For example, Go's module reference describes the list of vendored packages and modules written by its vendoring command. Check that those records correspond to the build that produced the shipped artifact. Go Modules Reference on vendoring.
When the source repository contains a copied library with no import record, look for retained upstream license or notice files, version banners, checksums, and commit history. These can be clues with different evidentiary weight. A notice might identify a project without establishing the version. A matching checksum can identify a specific upstream file when you trust the reference and compare the same representation. When local patches change the bytes, capture the upstream base and the local change history rather than claiming that the copied tree is identical to the upstream release.
Package identity and artifact identity solve different parts of the job. A package URL can express a coordinate when you know the package and version. A file hash can refer to the exact bytes you found in a release. Record both when available and link them through the evidence that shows how the bytes came from the upstream distribution. Package URL specification.
Keep a small vocabulary of confidence states. Confirmed upstream release means the evidence establishes the package and version. Confirmed base with local changes means you know where the code started and can identify the local modification. Project known, version unresolved means one half of the identity is supported. Origin unknown means the artifact appears relevant but provenance remains an open investigation. The last two states need owners and impact decisions, especially for code that reaches production.
Cross-check expected and observed copies
Choose a small set of representative components to compare. Include a known package-manager dependency, a vendored copy, a locally patched fork, and a build-only package. Where the same library can appear in two forms, verify each affected location. Compare the resulting inventory against the declared scope of the SBOM and record what its generator actually examined.
An inventory may collapse duplicate components while preserving occurrence or relationship evidence. Check whether someone answering a vulnerability question can still distinguish where each copy appears. For example, the package store and the browser bundle might contain different versions of the same library. A version update in one representation does not prove that the other changed. Scope the finding and the next action to the location that needs work.
Use a fixture that checks both inclusion and exclusion. The generator should identify the intended shipped component where its evidence supports identification. A file deliberately excluded from the released artifact belongs outside a runtime inventory, and its presence in the repository may be documented in a separate scope. Look for artifact metadata, package evidence, and paths that help distinguish those cases. A component total gives little information about which missing entries matter.
If an SBOM format or downstream tool cannot represent the detail your review needs, maintain linked evidence. A runtime SBOM may preserve a component without a structured way for your consumer to show every path. A release note or signed evidence reference can provide the missing detail. Document that limitation alongside the inventory so downstream teams know where to look before making a presence or remediation decision.
Work a fictional release with three different origins
The sample below covers a dashboard archive with a browser bundle and a helper included by its packaging job. All component names and versions are illustrative.
| Release content | Evidence about origin | Existing runtime SBOM | Decision |
|---|---|---|---|
| Browser bundle includes FormatCore 4.6 | Build lockfile and bundle report agree | FormatCore 4.6 present | Verified for the compiled bundle |
| Static compatibility script contains older FormatCore code | Checked-in import commit points to an upstream 3.2 archive, local patch changed the file | No matching older version or separate file occurrence | Confirmed upstream base and local changes, record the second instance |
| Converter helper is copied into the archive by release packaging | Released helper has checksum and code owner, no upstream import record | Generic file entry only | Version unresolved, request import or build evidence from helper owner |
| Formatter test fixtures in source tree | Packaging script and artifact manifest exclude the fixtures | Absent from the runtime inventory | Expected exclusion for this reviewed artifact |
Two copies of FormatCore appear in the archive. The maintenance team upgrades the declared package to 4.7. The old compatibility script still comes from the 3.2 upstream base with local changes. If an advisory affects the old copy, the team needs a separate review of whether the local changes alter applicability and a separate remediation route. Neighboring package records cannot settle that question. Keep the static script's path, archive checksum, and ownership linked to the review.
For the converter helper, the checksum lets the release owner establish that the same bytes shipped across two releases. It does not establish which third-party components were compiled into the binary. The next action is to get its build provenance, vendor manifest, or trusted source package record. If none is available, carry the unresolved status forward and decide whether to replace the helper with one whose origin and maintenance can be verified.
If the compatibility script is later removed, inspect the exact replacement archive and record where the old path and relevant bundle content were checked. A removal commit may change the source tree without proving the release job stopped importing a cached copy. Verify the removal for the shipped artifact before closing a finding tied to that location.
Improve the import lifecycle
Record provenance near the import step. For a manual third-party import, capture upstream name and source, version or commit, integrity value or other verified origin evidence, required notices, modification history, and the owning team. Store the approved update path and any platform limitations. These fields reduce investigation time even when the imported code contains no machine-readable package metadata.
For recurring automated imports, retain verifiable source references from the build and tie them to the output that was published. Use a consistent path naming convention where possible, while keeping the actual contents and checksum as evidence. Include post-build packaging and artifact assembly in the review. These are common places where the release adds files that never appear in the package-manager lockfile.
When a team keeps a locally changed fork, document a maintenance decision. Name who compares it with upstream changes, how they review applicability of fixes, and what would trigger migration back to a supported dependency. A dormant fork can require more investigation than a regularly updated declared package. Record the basis for any exception and check its scope when the release uses the same fork in multiple products or environments.
Preserve archived evidence for supported release lines. If a customer still runs an earlier downloadable version, maintain enough records to answer whether it contains the component. Document which releases you can verify and whether older versions are beyond the available evidence history. A current clean SBOM describes its stated release scope, even if the repository happens to support older release branches too.
Review license and maintenance records as part of the handoff. A retained notice can identify upstream origin and convey license terms, while a separate source record establishes where your copy came from and who updates it. Keep both available to the relevant reviewers. For bundled code, check that the release workflow preserves the notices your project requires even when it minifies the JavaScript or renames output files. Use the archive actually delivered to verify those files are present.
Schedule another check whenever the team moves vendored code out of the repository into a build download, replaces a direct import with a bundled binary, or adds a supported platform. Each change can move the evidence needed to verify the component. Have the owner update both the SBOM process and the supporting release record.
Evaluate whether the inventory helps the next reviewer
Use a synthetic fixture with known sources and deliberate gaps for vendor evaluation. Include a declared package, a copied third-party file with a known version, and a manually patched copy whose upstream base is known but differs from the original bytes. Record where each one should appear in the built artifact. Compare products on the evidence they can show for each result, how they report uncertainty, and whether an export preserves locations and separate copies. The Semgrep comparison and code and cloud security comparison provide additional assessment criteria.
Ask the release owner to follow an SBOM entry back to both the upstream evidence and the shipped artifact. Then repeat the exercise for a component whose version is unresolved. The record should show which details are verified, what remains uncertain, and who owns the next investigation. A reliable inventory needs enough scope and provenance to support that decision even when the normal package metadata is absent.