CI

GitHub Action

A scored, audited SBOM on every push. Three steps, and no tokens or secrets to create, store or rotate.

Set up in 3 steps

  1. Install the CLI.
  2. In your repository, run:
    sbombox login
    sbombox init
    This picks your project, allows this repository's workflows to upload to it, and writes .github/workflows/sbombox.yml.
  3. Commit and push.

That is all. To allow another repository later, run sbombox ci trust in it; sbombox ci show lists the repositories that can upload.

What every run does

The workflow

sbombox init writes this for you. To add it by hand, copy it and put in your project ID:

name: SBOM
on:
  push:
    branches: [main]
  pull_request:

permissions:
  contents: read
  id-token: write   # lets the job prove who it is - no secret needed

jobs:
  sbom:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: sbombox/action@v1
        with:
          project: 0193c0de-...   # your project ID (not a secret)
          fail-under: "7"          # optional: fail below this score

Inputs

Only project is required.

Outputs

Check before you commit

Catch a low score on your machine, before CI does. sbombox check builds an SBOM, scores it and fails if the score is below your minimum. It runs offline and uploads nothing.

With pre-commit: add this to .pre-commit-config.yaml, then run pre-commit install. The check only runs when a manifest or lockfile changes.

repos:
  - repo: https://github.com/sbombox/sbombox-com
    rev: cli-v0.2.0
    hooks:
      - id: sbombox-check
        args: ["--fail-under", "7"]

Without pre-commit: a plain git hook, run from the repository root. It checks every commit.

printf '#!/bin/sh\nexec sbombox check --fail-under 7\n' > .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit

A failing commit prints the score and the three weakest checks:

SBOM score 6.4/10 (grade C), 212 components
  lowest: supplier_coverage 31/212 - Components with a named supplier.
  lowest: hash_coverage 120/212 - Components with at least one hash.
Score 6.4 is below 7.0. Run `sbombox score <sbom> --format detailed` to see why.

Both need the CLI installed. To skip the check once, run SKIP=sbombox-check git commit (pre-commit) or git commit --no-verify. CI still checks.

GitLab and other CI

On GitLab, sbombox init prints the two lines to add to .gitlab-ci.yml. Sign-in is keyless there too.

On Jenkins, CircleCI or anything else that runs a shell, set SBOMBOX_TOKEN and SBOMBOX_PROJECT as protected variables. The CLI picks up the branch and commit from the CI system by itself:

curl -fsSL https://sbombox.com/install.sh | SBOMBOX_NO_MODIFY_PATH=1 sh
export PATH="$HOME/.local/bin:$PATH"
sbombox generate
sbombox push sbom.json
sbombox score sbom.json --fail-under 7