Skip to content

Supply chain security

Four things in CI cover the supply chain: SBOMs with a Grype scan of the dependencies, Trivy scans of the built images, Bandit on the Python code, and pinned actions, tools and dependencies. The runners (ubuntu-latest) and the Dockerfile base images (python:3.14-slim and the like) still follow tags that move. Dependabot keeps the pins moving.

SBOM and dependency scan

sbom-compliance.yml runs on pushes and PRs to main and every Sunday. For backend/ and frontend/ it generates an SPDX JSON SBOM with anchore/sbom-action (Syft), scans it with anchore/scan-action (Grype) at a high cutoff, and uploads the findings as SARIF. The scan has fail-build: false, so it reports without blocking. The SBOMs are kept as workflow artifacts for 5 days.

Findings show up in the repository's Security tab under code scanning, as backend-dependencies and frontend-dependencies.

Image and code scans

Docker Scan & Promote runs Trivy v0.75.0 on the backend and frontend images of every commit that passed CI on main. It reports CRITICAL and HIGH findings that have a fix, skips anything listed in .trivyignore, and uploads SARIF per image as trivy-<image>. A finding fails the job and blocks the promote to latest. The images keep the count at zero by upgrading their OS packages in a step CI never caches (the backend's last stage, the frontend's production stage), so a fix released after a cached build still gets in, and the backend drops pip, whose vendored packages were the only Python findings. The ignore file lists no CVE today. See CI/CD.

CI's Security Scanning job runs uvx --no-build --python 3.14 bandit==1.9.4 -r backend/ -x backend/tests/ -ll on pushes to main and on PRs that change backend/. -ll reports medium severity and up, and any finding fails the workflow.

Pinning

Every GitHub Action, including those used inside the composite actions, is pinned to a full commit SHA with the version in a comment. The Trivy action is pinned to the commit of v0.36.0, since its older tags were deleted upstream. Tools are pinned to exact versions (bandit, Trivy, mkdocs and its plugins), Python installs are uv sync --frozen --no-build from the lockfile, and npm installs are npm ci --ignore-scripts. The k3s image is pinned by digest.

Dependabot opens one grouped PR per ecosystem every week, for uv, npm, the Dockerfiles, the compose images and the GitHub Actions, and updates SHA and version comment together. A release waits 7 days before Dependabot proposes it, since these PRs merge themselves once CI passes. Details are in CI/CD.

Running it locally

syft ./backend -o spdx-json=backend-sbom.json
grype sbom:backend-sbom.json
trivy image ghcr.io/hardmax71/integr8scode/backend:latest

Install Syft, Grype and Trivy from their release pages or your package manager.