A complete GitHub Actions setup for AIROM: install it, scan the checkout, publish SARIF to GitHub Code Scanning, upload the AIBOM as a build artifact, and — optionally — fail the build on a policy.
AIROM is pre-release (v0.1.0-dev, untagged). There are no prebuilt binaries yet, so CI installs from source with go install. This resolves to a release tag once one exists.

The workflow

.github/workflows/airom.yml
That workflow never fails on findings — it reports. AIROM exits 0 whether it finds nothing or forty components. See exit codes.
go install places the binary in $(go env GOPATH)/bin. actions/setup-go already puts that on PATH; without it you get airom: command not found.

What each piece does

Required by github/codeql-action/upload-sarif to write results into the repository’s Code Scanning alerts. contents: read is enough for actions/checkout. Grant nothing else.
-o is repeatable and takes format[=path]. Formats: cyclonedx, json, sarif, table, yaml. Omitting =path sends that format to stdout — which is why -o table above still prints a human-readable summary to the job log while the machine formats go to files.AIROM’s SARIF defaults to level: "note", which is what GitHub Code Scanning renders. --sarif-strict-kinds switches to spec-pure kind: "informational" — correct per the SARIF spec, but GitHub displays those differently. Leave it off for this workflow.
Keeps AIROM’s results in their own Code Scanning category so they do not collide with CodeQL or another SARIF producer uploading to the same commit.
The CycloneDX AIBOM, archived as a build artifact so you can diff it release over release. --cdx-version selects 1.6 (default) or 1.7.The CycloneDX dependencies[] array is intentionally empty: AIROM does not fabricate depends-on edges it cannot substantiate.

Gating the build

Add --fail-on when you want a policy violation to fail the job. Keep it on its own step so the SARIF upload runs first — a gated scan still writes all of its output before the gate is evaluated.
Report first, then gate
Prefer a single scan? Put --fail-on on the scan step and add if: always() to the upload step, so results still reach Code Scanning when the gate trips.

Report on a PR, fail on main

--exit-code 0 evaluates the policy and still writes every output, but never fails the build — so a pull request gets the SARIF results without a red check, while main gates.
Policy from the workflow context
Do not gate with --exit-code 1 alone. Without --fail-on that means “fail on any component,” which includes low-confidence noise. Write the policy explicitly.

Configuration via environment

Every flag has an AIROM_* equivalent, so you can hoist shared settings to the job. List values are comma-separated.
Env instead of flags
Precedence is flags > AIROM_* > .airom.yaml > defaults. Unknown keys and unknown AIROM_* variables fail loudly — a typo never silently does nothing. Committing an .airom.yaml at the repo root keeps CI and local runs identical.

Scanning other targets

Scanning the checkout with fs is usually what you want in CI — the working tree is already there. Use repo when you need git provenance, or to scan a different repository.
--offline asserts that the run touches no network. fs, a local repo path, and image --input perform no network access regardless — the flag states the intent explicitly in the job, which is worth doing in an air-gapped or egress-restricted runner.

Reproducible, pinnable installs

@latest builds the newest commit today. Pin the module version once a tag exists, or pin a commit now:
Pin the install
airom version prints the version, commit, and build date — the same ToolInfo recorded in every AIBOM AIROM produces. Print it in CI so an artifact is always traceable to a build.
Record what produced the AIBOM

Next

Exit codes

The full contract and the --fail-on grammar.

Output formats

SARIF, CycloneDX, JSON, YAML, table.