Interview Prep/DevSecOps/Supply chain: signing, SBOM and dependencies

Grype scanning an SBOM reports far fewer vulnerabilities than scanning the image directly

IntermediateTroubleshootingSupply chain: signing, SBOM and dependencies
Answer

Likely causes → The SBOM lacks the distro identity (no os-release info) or purls/CPEs, so OS packages cannot be matched to distro advisories.

Diagnose →

jq '.metadata.component, (.components[] | select(.type=="operating-system"))' sbom.cdx.json
jq '[.components[] | select(.purl==null)] | length' sbom.cdx.json

Fix → Regenerate the SBOM with Syft from the image (it records distro and purls), or pass --distro debian:12 to Grype.

Prevent → Validate SBOM quality in CI: require purls on components and an OS component.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Supply chain: signing, SBOM and dependencies