Safeguard
Supply Chain•

What should a provenance file for vendored code record?

A short file beside vendored code can answer where it came from, which version, what you changed and when to update. Here are the fields worth writing.

Safeguard Security Team
4 min read

Record the upstream project and URL, the exact version and commit, the license, the date you imported it, a list of local changes, an owner, and how to update. Eight fields in a small file next to the code answer almost every question an engineer, auditor or buyer will ask later.

Why a file at all

Vendored code has no manifest, so nothing tells you what it is. People leave, directories get renamed, and a year on nobody remembers that the folder is a copy of a library with a known security history. A provenance file is the cheapest fix. It costs ten minutes at import and saves hours at every audit and incident.

The fields

FieldExampleWhy it earns its place
NameexamplelibLets you search advisories
Upstream URLrepository addressWhere to check for fixes
Version1.4.2Matches advisory ranges
Commitfull hashExact state, immune to moved tags
LicenseSPDX identifierSupports notices and policy checks
Imported on2026-10-19Shows how stale it is
Local changeslist, with reasonsShows divergence
Ownerteam or personSomeone to ask
Update methodthe command or stepsMakes the next update easy
Remove whenconditionGives an exit

Use the SPDX identifier for the license, and when the license needs a notice file, note where the notice lives. See what MIT and Apache notices require.

A simple format

Plain text or a small structured file both work. Pick something your tooling can read, so a script can collect all the files into an inventory.

name: examplelib
upstream: https://github.com/example/examplelib
version: 1.4.2
commit: FULL_COMMIT_HASH
license: MIT
imported: 2026-10-19
owner: platform team
local_changes:
  - removed network call in init, see commit ABC123
update: re-run scripts/update-examplelib.sh
remove_when: we move to the packaged dependency

Keep it alive

  1. Make updating the file part of the update script, so it cannot drift.
  2. Add a continuous integration check that fails if a vendored directory changes and its provenance file does not.
  3. Collect all provenance files into your SBOM. Many SBOM formats can describe a component with an origin and a list of changes. See describing a fork in a CycloneDX SBOM.
  4. Review the files at each sync, and delete the ones for code you removed.

What auditors and buyers will do with it

A buyer asking for an SBOM, or a reviewer checking open source obligations, wants to know what third party code you ship. A folder of provenance files is a ready answer and a sign of care. It also shortens incident response: when an advisory lands, you search the files by name and know within minutes whether you ship that code. See vulnerabilities in vendored or copied code.

Where Safeguard fits

Safeguard's SBOM and dependency scanning, plus compliance and evidence automation, can help keep an inventory current. Try a free scan at gold.safeguard.sh/scan.

Try it yourself

Click through it at your own pace, or open it full screen. Look at which fields an inventory shows for each component, then compare them with the table above.

Quick check

Why record the commit and not only the version?

Tags can move and versions can be reused. A full commit hash identifies one exact state of the code.

Who should own the file?

The team that owns the code that uses the vendored library, named in the file so there is someone to ask.

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.