Safeguard
Developer Tools•

Is a PlatformIO lib_deps entry pinned enough for an SBOM?

A PlatformIO lib_deps line can name a registry version, a Git tag or a branch archive. See which forms are reproducible and how to record them.

Safeguard Security Team
3 min read

It depends on the form. A registry name with an exact version or a Git URL pinned to a tag is reproducible. A name with no version, or a URL that points at a branch archive such as master, can resolve to different code on different days and does not make a reliable SBOM entry.

What lib_deps accepts

The PlatformIO documentation for the lib_deps option shows several ways to declare a library. You can use an owner based declaration from the registry, an external Git resource such as a repository URL with a fragment like a version tag, or a name mapped to an archive URL, for example a zip of a branch.

All of them work. They differ in how much they tell you about what was built.

Pinned versus floating

FormReproducible?Notes
Registry name with an exact versionYesVersion recorded in the project file
Registry name with a range or no versionNoResolves to whatever is newest within the range
Git URL with a tag fragmentMostlyTags can be moved, so prefer a commit
Git URL with a commit hashYesStrongest of the Git forms
Archive URL of a branch such as masterNoContent changes with every push

Check the exact syntax for your PlatformIO version in its documentation, since the supported fragment forms are described there.

Steps to tighten a project

  1. List every lib_deps line in every environment of your project file. Different environments often carry different libraries.
  2. Replace ranges with exact versions where the registry supports it.
  3. For Git dependencies, move from a tag to a commit hash.
  4. Replace branch archives with a tagged or hashed source, or vendor the library into your repository after review.
  5. Record the resolved version of each library in your build log so it reaches the SBOM.

Recording them in the SBOM

For each library, record name, exact version, where it came from, and a hash of the source if you can compute one. For libraries with no version at all, say so rather than inventing one. An honest unknown entry tells a reader that a manual check is needed.

Also record the framework and platform packages the build uses, such as the board support package. They are code too, and they have advisories.

Common questions from customers

Reviewers often ask whether a firmware build is repeatable. Pinned lib_deps entries are a concrete answer. Floating ones are the first thing a careful reviewer will flag.

Where Safeguard fits

Safeguard scans dependency manifests and generates SBOMs. PlatformIO project files are a specific format, so test a free scan on your repository and check what it reports for embedded libraries before relying on it.

Quick check

Is a Git tag a safe pin?

Safer than a branch, but a tag can be moved. A commit hash is stronger.

Should I vendor libraries into the repository?

It is a reasonable choice for critical libraries, as long as you record the upstream version and keep watching advisories.

Sources

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.