Platform Engineering

SBOM-Based Security for GitHub Repositories

Use Syft, Grype, SBOM generation, vulnerability scanning, and remediation reports to make GitHub repository security measurable and repeatable.

·2 min read·
#SBOM#GitHub#Security#SupplyChain

You cannot secure what you cannot inventory. That is the basic reason SBOM-based security matters for GitHub repositories. A software bill of materials tells you what packages, versions, and transitive dependencies are actually present in the code or container image.

When the next vulnerability lands, the first question is not "are we affected?" It is "where are we affected?"

Generate the SBOM

Syft is a practical tool for generating SBOMs from source directories, container images, and filesystems. A simple repository scan can produce SPDX or CycloneDX output:

syft dir:. -o cyclonedx-json > sbom.cdx.json

For containers, scan the built image rather than only the source tree. The image includes OS packages, runtime layers, and dependencies introduced by the build process.

Store SBOMs as build artifacts. For production images, attach the SBOM to the image or keep it in an artifact repository tied to the image digest.

Scan and report

Grype can consume an SBOM and report known vulnerabilities:

grype sbom:sbom.cdx.json

The important part is not only failing builds. Teams need remediation reports that identify package, version, severity, fixed version, and owning repository. Without ownership, scanners become noise.

For GitHub, the workflow should run on pull requests and on scheduled scans. Pull request scans catch new risk. Scheduled scans catch newly disclosed CVEs in existing dependencies.

Make it actionable

SBOM-based security works when it becomes part of the delivery system:

  • Generate SBOM per build
  • Scan dependencies and images
  • Fail on policy-defined critical risk
  • Produce a remediation report
  • Track exceptions with expiry dates
  • Re-scan on a schedule

The CycloneDX project and SPDX project provide the standard formats. Syft and Grype make those standards easy to use in CI.

The operational goal is simple: when a CVE appears, the team should answer affected repositories in minutes, not days.

That speed changes the conversation from panic to prioritization, which is where security work becomes sustainable.

Closing thought

An SBOM is a flashlight, not a fix. The value shows up the day a critical CVE drops and you can answer "where are we exposed?" in minutes. Build that capability before you need it — during the next zero-day is the wrong time to learn Syft.

A pragmatic rollout order

  1. Generate SBOMs on every build, store as artifacts
  2. Scan SBOMs against CVE feeds in CI
  3. Centralize SBOMs so cross-repo queries are possible
  4. Wire alerts to repo owners, not to a shared inbox
  5. Track exception expiry as a first-class metric
Public profile lookup

Ask AI About the Author

Open this query in ChatGPT, Claude, or Perplexity.

Comments

Comments are open to confirmed email subscribers. Use the email you subscribed with. To edit a comment, delete it and post a new one.

0/2000
Verify:

    Get new field notes by email

    Field notes from someone who ships before they write about it. Sovereign AI, AI-SDLC, DevOps, and what 59 production deployments teach you. No spam. Unsubscribe anytime.

    More in Platform Engineering