Safeguard
Supply Chain•

Models versus packages: which supply chain habits carry over?

Pinning, hashes, provenance and advisories work for both, but models lack lockfiles and advisory feeds. What carries over and what is missing.

Safeguard Security Team
3 min read

Most package habits carry over to models: pin exact versions, verify hashes, record provenance, review changes. What differs is tooling. Models usually have no lockfile, no standard advisory feed and no automatic update pull request, so teams must build those habits by hand.

Habits that carry over

Package habitModel equivalent
Pin an exact versionPin the full commit hash. The Hub's download guide requires the full length hash
Verify integrity hashesHash files and compare against a manifest
Prefer a trusted registryLoad from an internal store with approved copies
Review dependency changes in pull requestsPut the model revision in version controlled config
Remove unused dependenciesRetire models and clear caches
Read the licenseRecord the license tag and check use

Where models differ

No lockfile by default. A package manager writes the resolved version and hash. A model loaded by name gets whatever the name points to. Without a pin, two builds a week apart can load different files.

Names can move. The Hub's documentation says a rename or transfer redirects the old URL. A package registry has its own rules; check each for how names behave.

Executable on load, sometimes. Python's pickle documentation warns that unpickling can run arbitrary code. Packages run code at install or import time. Models in some formats run code at load. In both cases the file is not just data.

Advisories are thinner. Package ecosystems have established vulnerability databases. For models, coverage is different and often missing, so expect to do more first hand review. A scanner that lists library vulnerabilities will not necessarily describe a model file. See does my dependency scanner cover ML libraries and model files.

Updates are not automated. Bots open pull requests for new package versions. For models, someone has to notice an upstream change, unless you set up a webhook. See how to get an alert when a model changes upstream.

What to build first

  1. A model inventory with source, hash and owner, since you cannot protect what you cannot list.
  2. A pin in config for every model load.
  3. A manifest of file hashes checked in CI.
  4. An upstream watch for models you rely on.
  5. A rule on file formats.

The libraries still matter

Models do not run alone. They run through libraries with their own versions and advisories. A vulnerable inference server is a risk whatever model it loads, and several posts in this series cover cases like that. Keeping the package side clean is the part you can already measure.

Try it yourself

Click through it at your own pace, or open it full screen. Look at what an inventory records for each package, then ask what the same record would hold for a model.

Safeguard's SBOM and dependency scanning cover the package side, with reachability analysis to show which findings matter. Run a free scan.

Quick check

Do models have lockfiles?

Not by default. Create one by pinning a full commit hash and keeping a hash manifest.

Can a package scanner vet a model file?

Do not assume so. Check what your tool says it covers.

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.