airom is a single static binary. Every command below is real and current; every
flag listed is the complete set for that command. Cobra also supplies help and
completion, which behave as they do in any Cobra tool.
Shape of an airom invocation
The global flags are persistent — every command accepts them —
but only the scan-family commands (
scan, fs, repo, image, k8s) use the
full set. Elsewhere: detectors list, detectors explain, and rules list
resolve the same configuration and so honor --select and --rules; clean
honors --cache-dir. rules lint, rules test, and the dev scaffolds ignore
configuration entirely and act only on the file or name you give them. -v/-q
set log verbosity on every command.Scan commands
airom scan
Scan a target, auto-detecting the scheme.airom scan
Auto-detect vs. explicit
<target> is required. No command-specific flags.
airom fs
Scan a directory tree.airom fs
<path> is required; it must exist. No command-specific flags.
airom repo
Scan a git repository.airom repo
airom image
Scan a container image.airom image
string
Scan a saved image tarball (
docker save output or an OCI archive). No network.string
Platform to select from a multi-arch index, e.g.
linux/arm64.--input are mutually exclusive, and at least one of the two is
required.
Offline image scan
airom k8s
Scan the images of Kubernetes workloads.airom k8s
string
Offline mode: extract image references from manifest YAML in this directory.
string
Restrict to one namespace.
bool
default:"false"
All namespaces.
bool
default:"false"
Scan the discovered images concurrently. Serial by default.
[context] (a kubeconfig context name).
Offline manifest scan
Inspection commands
airom diff
Compare two native AIBOM documents and report the semantic delta: components added, removed, and changed, keyed by the stable component ID. A version bump reads as a field change on one component, never as a remove+add pair; evidence churn is not compared, so two scans of unchanged code diff as empty.airom diff
airom scan <target> -o json=<file>);
other formats are refused explicitly. --format selects one of table (default),
markdown (ready to post as a PR comment), or json. The gate flags work like scan’s,
evaluated over the added and changed components only — removals never trip the gate, and
compliance: terms are rejected. Test-scoped components are excluded unless
--include-tests is set. Added and removed components carry a Risk, Vulnerabilities, or Lifecycle column when that section surfaces one, so a PR introducing a retired model or a checkpoint that executes code on load says so in the row.
Both documents must come from the same tooling. airom diff compares the two tool
blocks — binary version, ruleset version and hash, lifecycle catalog — and reports any
mismatch as ⚠ Not comparable in every format. A rule added between the two scans
makes components appear that the PR never wrote; a rule removed makes them vanish. With
--fail-on active a mismatch is a fatal error (exit 2) rather than a pass or a failure,
the same refusal an unevaluable eol/cve gate gives:
skipping the gate would be a false green and running it a false red. Scan base and head
in one CI run and this never fires.
airom detectors list
List every detector with its selection status. Honors--select and --rules, so
the listing reflects the configuration you would actually scan with.
airom detectors list
ID, VERSION, PHASE, SELECTED, SELECTS. No arguments, no
command-specific flags.
airom detectors explain
Print one detector’s full selector, its need, and its rule count.airom detectors explain
<id> is required. Output fields: id, version, phase, selects,
need, selected. An unknown id is a configuration error.
airom rules list
Show the effective ruleset — embedded packs plus--rules overlays — with each
rule’s layer.
airom rules list
RULE ID, KIND, CONFIDENCE, LAYER, followed by a rule count. No
arguments, no command-specific flags.
airom rules lint
Validate a rule pack — or a model lifecycle catalog — against its full contract. The signed bundle carries both, so one command checks either; the file’s shape selects the validator.airom rules lint
<file>. For a rule pack: reports failures and rules missing a
positive or negative fixture. For a lifecycle catalog: enforces the honesty
contract (a source URL and verification date on every file, parseable states and
dates, no transposed or self-referential records). A failing file exits
non-zero.
airom rules test
Run a rule pack against its fixtures. No Go toolchain required.airom rules test
<file>. Prints <file>: OK (n expectation(s) checked) on success;
failures exit non-zero. Handed a model lifecycle catalog it says
so and exits 0 — a catalog has no fixtures to run, and it is rules lint that
validates one. That keeps a publishing pipeline free to run both commands over
every YAML in the bundle without special-casing which file is which.
airom rules update
Fetch, verify, and cache a signed rule bundle from the airom-rules release channel. A bundle may also carry the model lifecycle catalog, so this is what refreshes retirement dates without a binary upgrade. This is the only rules subcommand that touches the network — scans never do. See Rule updates for the full model.airom rules update
The bundle is verified against the public key embedded in airom (signature, then
tarball SHA-256) and cached under
<cache-dir>/rules/<version>; any failure is
fatal and leaves the previous bundle in place. --offline refuses to fetch.
airom clean removes it.
Contributor commands
airom dev new-rulepack
Scaffold a rule pack plus fixtures.airom dev new-rulepack
string
default:"models"
Rule category directory. One of:
models, embeddings, frameworks,
vectordb, infra, params, prompts, datasets.<name> must match [a-z0-9-]+. Writes rules/<category>/<name>.yaml and a
fixture under rules/<category>/testdata/<name>/. Refuses to overwrite an
existing pack.
airom dev new-detector
Scaffold a Go code detector plus a contract test.airom dev new-detector
<name> must match [a-z0-9-]+. Writes internal/detectors/<pkg>/ containing
<pkg>.go, <pkg>_test.go, and a testdata/ directory, where <pkg> is <name>
with the dashes removed (new-detector safetensors-header scaffolds
internal/detectors/safetensorsheader/) — a Go package name cannot contain a
dash. Refuses to overwrite an existing directory. No command-specific flags.
It then prints the two follow-up steps: go test ./internal/detectors/<pkg>/ -update
to write goldens, and go generate ./internal/detectors/all to register the
detector.
Utility commands
airom clean
Remove the scan cache.airom clean
airom clean
refuses any directory whose basename is not airom or airom-cache, and refuses
your home directory or a filesystem root.
airom version
Print the version, commit, and build date — the sameToolInfo embedded in every
AIBOM.
airom version
Global flags
This table is the complete global flag set, on top of the two Cobra built-ins every command carries:-h/--help, and --version on the root.
Flag notes
--pprof: a custom address must be attached with '='
--pprof: a custom address must be attached with '='
--pprof is a bare-flag-with-value flag. Given alone it binds
localhost:6060. A custom address must be attached with =:--pprof forms
--pprof 0.0.0.0:7070 is rejected up front with
a precise error. It has to be: the address would otherwise be parsed as a
positional argument (on airom k8s it would silently become the kubeconfig
context, while pprof quietly bound the default port).-v is logging-only
-v is logging-only
-v/--verbose changes log verbosity and nothing else. Default level is
info; -v enables debug; -vv adds source locations. It does not change the
table output, add columns, or reveal more components. To see more components,
lower --min-confidence; to see more detail in the document, use --stats or
a structured format via -o.-q and -v are mutually exclusive when both are passed on the command line.--format vs. -o/--output
--format vs. -o/--output
--format is a convenience alias for a single -o. Passing both explicitly
on the command line is an error. Use repeated -o for multi-output:Multi-output
Exit codes
--exit-code alone, with no --fail-on, means “fail on any component”.
--exit-code 0 with an active --fail-on reports matches without failing the
build — useful for a soft rollout of a new gate.
The —fail-on grammar
Grammar
& binds tighter than |. Every term in a clause must hold for the same
component — a clause is a per-component predicate, not a whole-document one.
An unknown term is a usage error at parse time, never a silently-passing gate.
Policy examples
ident: hosted-llm,
local-model-file, embedding-model, framework, library, vector-db,
prompt, dataset, ai-config, infra, service, rag-pipeline,
application. Beyond kinds: the risk selectors (risk,
risk:<severity>, risk:<slug>; pickle-risk is a deprecated alias for
risk:pickle-import), the CVE selectors (cve,
cve:<severity> — a threshold; the overlay is on by default), the
model-lifecycle selectors (eol, eol:retired,
eol:deprecated — a threshold — and eol:before:<YYYY-MM-DD>, which fails when
anything dies before a date you name), and the
compliance selectors (compliance:gap,
compliance:<framework>, compliance:<framework>:<control>; requires
--compliance, cannot be &-combined).
Table output
The default output is a table on stdout.airom fs .
KIND, NAME, VERSION, PROVIDER, CONF,
LOCATION, EVIDENCE, plus a VULN column (and a per-CVE detail table below)
when a scan surfaces CVEs. LOCATION is the primary sighting (path:line) and
EVIDENCE renders as n occ — the number of occurrences backing the component.
--wide lists every one.
Configuration reference
Every flag here can also come from
AIROM_* env vars or .airom.yaml.