Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CI and automation

FAT commands are designed to be scripted: human progress goes to stderr where documented, machine-readable reports go to stdout, and exit status is explicit.

JSON first

Most analysis commands accept --json. Prefer the structured model over parsing terminal text:

fat identify --file firmware.bin --json > identify.json
fat inspect bmc --file flash.mtd --json > bmc.json
fat extract .fat-projects/firmware --json > extraction.json
fat inspect symbols --file ./usr/sbin/httpd --json > symbols.json

Schema versions are part of the CLI contract. See JSON schemas before pinning a parser to a field.

SARIF and exit gates

inspect bmc emits SARIF 2.1.0 with stable rule IDs, descriptions, input SHA-256, and binary byte locations:

fat inspect bmc --file flash.mtd --sarif > findings.sarif
fat inspect bmc --file flash.mtd --sarif --fail-on-warning > findings.sarif

Default inspection exits successfully when analysis completes. --fail-on-warning emits the full report and then exits nonzero when any warning/error finding exists. Invalid arguments, input I/O failures, and fatal analysis errors also exit nonzero. Malformed FDT candidates remain diagnostics in a successfully completed inspection.

Example GitHub Actions steps:

- name: Inspect BMC flash
  run: fat inspect bmc --file flash.mtd --sarif --fail-on-warning > findings.sarif

- name: Upload SARIF
  if: always()
  uses: github/codeql-action/upload-sarif@v3
  with:
    sarif_file: findings.sarif

Metadata observations are not automatically vulnerability verdicts; choose your CI policy explicitly.

External campaign replays

fat experiment external records bounded work performed by an external engine such as AFL++ or Fuzzware. It does not add a fuzzing engine or claim device fidelity.

fat experiment external validate \
  --file external-campaign.json \
  --root /path/to/campaign \
  --json

fat experiment external run \
  --project /path/to/fat-project \
  --file external-campaign.json \
  --root /path/to/campaign \
  --case minimized-crash \
  --json

An external-campaign/v1 manifest pins the engine, setup artifacts, evidence, one exact input and argv per case, accepted exit codes, and an idempotent cleanup command. FAT substitutes the verified input path and launches argv directly, without a shell. The run creates a session and replay run containing the input, manifest, logs, result, and cleanup outcome.

A replay succeeds only when its exit code is declared and cleanup passes. See External campaign evidence for the full contract.

Practical rules

  • Keep firmware, keys, and private fixtures outside Git.
  • Pin the FAT version and runtime-data version in CI; runtime data declares compatibility with the executable version.
  • Use fat doctor --strict to gate a runner on core prerequisites, and fat data verify to check the active data tree.
  • Normal commands do not access the network. fat data install --release is the explicit network path.
  • --details changes presentation only. Never use it to infer a different analysis result.