Skip to content

feat: SBOM + vulnerability scans#562

Merged
KrisF-Midnight merged 16 commits into
mainfrom
SRE-1741/SBOM-and-scans
Feb 5, 2026
Merged

feat: SBOM + vulnerability scans#562
KrisF-Midnight merged 16 commits into
mainfrom
SRE-1741/SBOM-and-scans

Conversation

@KrisF-Midnight

@KrisF-Midnight KrisF-Midnight commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

https://shielded.atlassian.net/browse/SRE-1741

Overview

Add SBOM (Software Bill of Materials) generation and vulnerability scanning to CI/CD pipelines. This implements Phase 3 of the container security initiative, building on the Cosign image signing from Phase 1.

What this adds:

  • SBOM generation using Syft (SPDX-JSON format)
  • Vulnerability scanning with Grype (fails on critical CVEs only)
  • SBOM attestation to images using Cosign keyless signing
  • Reusable workflow for consistent scanning across all pipelines

Key design decisions:

  • SBOM scans gate image publishing (atomic releases - all images pass or none publish)
  • External/fork PRs skip attestation (no OIDC token) but still generate SBOMs
  • Severity threshold set to critical (fails on critical CVEs only)
  • Architecture-specific images scanned (not multi-arch manifests)

🗹 TODO before merging

  • Ready

📌 Submission Checklist

  • Changes are backward-compatible (or flagged if breaking)
  • Pull request description explains why the change is needed
  • Self-reviewed the diff
  • I have included a change file, or skipped for this reason: CI-only changes
  • If the changes introduce a new feature, I have bumped the node minor version
  • Update documentation (if relevant)
  • Updated AGENTS.md if build commands, architecture, or workflows changed
  • No new todos introduced

🧪 Testing Evidence

Please describe any additional testing aside from CI:

  • Local testing of sbom-scan.sh functions against test images

  • Verified Cosign attestation verification commands work locally

  • Additional tests are provided (if possible)

🔱 Fork Strategy

  • Node Runtime Update
  • Node Client Update
  • Other: CI/CD pipeline enhancement - no impact on node runtime or client
  • N/A

Links

@KrisF-Midnight KrisF-Midnight self-assigned this Jan 28, 2026
@KrisF-Midnight KrisF-Midnight requested a review from a team as a code owner January 28, 2026 15:36
@github-actions

github-actions Bot commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

kics-logo

KICS version: v2.1.16

Category Results
CRITICAL CRITICAL 0
HIGH HIGH 0
MEDIUM MEDIUM 97
LOW LOW 12
INFO INFO 83
TRACE TRACE 0
TOTAL TOTAL 192
Metric Values
Files scanned placeholder 30
Files parsed placeholder 30
Files failed to scan placeholder 0
Total executed queries placeholder 73
Queries failed to execute placeholder 0
Execution time placeholder 7

Comment thread .github/workflows/sbom-scan-image.yml Dismissed
@KrisF-Midnight KrisF-Midnight force-pushed the SRE-1741/SBOM-and-scans branch from 0d30292 to 0b32a31 Compare January 29, 2026 15:33
@KrisF-Midnight KrisF-Midnight changed the title Sre 1741/SBOM and scans feat: SBOM + vulnerability scans Jan 29, 2026
@KrisF-Midnight KrisF-Midnight force-pushed the SRE-1741/SBOM-and-scans branch from bce560f to 734a824 Compare January 30, 2026 09:27

@gilescope gilescope left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you tweak the Earthfile to:
cargo install cargo-auditable
cargo auditable build --release

That way the sbom process will be able to pick up the bill of materials embedded in the rust binaries. Without that I would think the bill was not comprehensive.

Krisztian Feher added 10 commits February 4, 2026 16:59
The sign-image.sh script was only signing the first platform when given
a multi-arch manifest (using .[0] instead of .[]). This resulted in only
amd64 being signed while arm64 was missed.

Changes:
- sign-image.sh now iterates through all platform digests
- Removed redundant arch-specific signing from release workflow since
  multi-arch signing now covers all platforms
GHCR only has arch-specific tags with the commit tag (e.g.,
0.20.1-dev-abc12345-amd64). The release tag only exists as a
multi-arch manifest. Docker Hub has arch-specific release tags
since they're created manually in the workflow.
- Upgrade Node.js from 22.13.1 to 22.22.0 in all Earthfile targets
  to fix CVE-2025-55130 (filesystem permissions bypass via symlinks)
- Add .grype.yaml to temporarily ignore GHSA-7h2j-956f-4vf2
  (brace-expansion DoS) until npm releases a patched version
- Update sbom-scan workflow to include .grype.yaml in sparse checkout
- Add renovate comments for automated Node.js version updates
Use cargo-auditable to embed dependency metadata in release binaries,
enabling Syft/Grype to detect all 1600+ Rust crate dependencies in
vulnerability scans.
@KrisF-Midnight KrisF-Midnight force-pushed the SRE-1741/SBOM-and-scans branch from c83e2df to e3772b9 Compare February 4, 2026 17:00
@KrisF-Midnight

Copy link
Copy Markdown
Contributor Author

Can you tweak the Earthfile to: cargo install cargo-auditable cargo auditable build --release

That way the sbom process will be able to pick up the bill of materials embedded in the rust binaries. Without that I would think the bill was not comprehensive.

good spot, can you re-review pls.

@ozgb ozgb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking until we get the 0.21.0 release out - the security issues in our current node/toolkit images will create a block if we merge this PR

@ozgb ozgb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the threshold set to Critical, LGTM

@KrisF-Midnight KrisF-Midnight mentioned this pull request Feb 5, 2026
14 tasks
@KrisF-Midnight KrisF-Midnight added this pull request to the merge queue Feb 5, 2026
Merged via the queue into main with commit 83c1e05 Feb 5, 2026
40 checks passed
@KrisF-Midnight KrisF-Midnight deleted the SRE-1741/SBOM-and-scans branch February 5, 2026 16:49
gilescope pushed a commit that referenced this pull request Apr 8, 2026
changed:
- post-merge CI action excludes native token tests because they're skipped (were executed earlier) and that was causing job to fail (we expect no skipped tests on last run
m2ux added a commit that referenced this pull request Apr 23, 2026
changed:
- post-merge CI action excludes native token tests because they're skipped (were executed earlier) and that was causing job to fail (we expect no skipped tests on last run
Signed-off-by: Mike Clay <mike.clay@shielded.io>
m2ux added a commit that referenced this pull request Apr 23, 2026
changed:
- post-merge CI action excludes native token tests because they're skipped (were executed earlier) and that was causing job to fail (we expect no skipped tests on last run
Signed-off-by: Mike Clay <mike.clay@shielded.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants