Safeguard
Security Guides•

OS packages or app packages: who fixes which container finding?

A table of package types in a container image, where each one comes from, who owns the fix and which change clears it. Split work by type to avoid rework.

Safeguard Security Team
4 min read

OS packages are fixed by refreshing the operating system layers, language packages by updating your lockfile, and compiled binaries by rebuilding with a patched toolchain. Each type has a different source and owner, so split a scan report by package type and send each group to the right team.

The map

Package typeExample locationComes fromFixTypical owner
OS packageSystem package databaseBase image or install stepRebuild with fresh pull, or update stepPlatform or app team
Language packageA lockfile managed directoryPackage manager in your buildUpdate version, regenerate lockfileApp team
Runtime binaryUnder a local prefixBase image buildNewer image tagApp team
Compiled app binaryYour app directoryYour compile stepRebuild with patched toolchainApp team
Bundled library in a jarInside an application jarYour build toolUpdate dependency in buildApp team
Vendored copy of a libraryIn your source treeCopied codeUpdate the copy by handApp team

How to tell them apart in a report

Look at the path or package type column. Debian's Python policy shows how system installed modules sit in a distribution managed directory, separate from a local prefix used for modules an administrator installs, and Python's site documentation describes site-packages under the interpreter prefix. The same split exists in other ecosystems: the OS manages its own directory, and your package manager manages another.

If the report lacks a type column, check the package URL or ecosystem identifier. Standard package identifiers include the ecosystem in their prefix, which is why SBOM based scanners can separate types cleanly.

Why mixing them wastes work

An OS refresh will not touch a lockfile. A lockfile update will not touch the OS. If a single ticket covers both, the OS team marks it done after a rebuild and the app findings remain. See does patching the OS fix app dependencies.

Where each fix lands in the image

Because layers are immutable and stack in order, an OS change near the bottom forces later layers to rebuild, while a lockfile change near the top rebuilds fewer. This is one reason to order Dockerfile steps from slowest changing to fastest changing, and to fix base layers first.

A routing rule you can adopt

  1. Export findings with package type and path.
  2. Group by type.
  3. Open one ticket per group per service, or one per base image for OS findings.
  4. Track closure by group, so a half fixed service is visible.

For the OS group, grouping by base image removes duplicates across services.

Where Safeguard fits

Safeguard's SBOM and dependency scanning identifies components by ecosystem, which supports this split, and policies can apply different rules per type. Free scan: gold.safeguard.sh/scan.

Try it yourself

Click through it at your own pace, or open it full screen. Look at how components are grouped by ecosystem.

Quick check

Does a vendored library show up in a scan?

Often not, since it has no package metadata. Source scanning and code review are needed to find copies.

Can one rebuild fix every type?

A rebuild with updated inputs can, provided each input changed: fresh base, new lockfile, patched toolchain.

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.