agentguardian-scan-v1) and SARIF 2.1.0 for code-scanning tool consumers. Both are deterministic (sorted-key), both are PII-redacted by default, and both surface the same underlying Scan model.
When to use this
- You are writing a parser, dashboard, or gate against a report and need to know the exact field set.
- You are debugging why a downstream consumer (GHAS, Sonar) rejected a SARIF file.
- You need to know which fields are signed and which are advisory metadata.
docs/_assets/sample-report.pdf. Open it to see the field set before you run your first scan.
Produce a report
JSON schema: agentguardian-scan-v1
Top-level keys in canonical (sorted) order:
Finding object
Every entry infindings[] carries the full attack record:
Sample JSON (header)
Signing model
Whensign=True (CLI default), signatures.hmac_sha256 and signatures.ed25519 are computed over the canonical JSON of the payload with the signatures key removed. This makes signing idempotent: re-signing an already-signed payload reproduces the same bytes. Verifiers reconstruct the signed input the same way.
To verify a report:
verify exits non-zero and prints UNANCHORED. Details in Signatures.
SARIF 2.1.0 schema
The SARIF emitter wraps a singlerun per scan: one rule per observed probe_id, one result per finding. The bundled SARIF 2.1.0 schema is enforced before the file is written — a malformed payload raises ReportError rather than persisting a file that downstream consumers would silently reject.
Top-level shape
Severity mapping
The AgentGuardian severity is mapped to SARIF’slevel field as follows:
Anything outside this set defaults to
warning.
Result properties
Eachresult carries the verdict plus the metadata SARIF has no native slot for:
Rule properties
Each rule (one perprobe_id observed) carries ASI / CSA / MITRE metadata so downstream consumers don’t lose taxonomy when SARIF is the only artifact they ingest:
Contract provenance (Stage 1B)
When a scan was authorised by a Rules-of-Engagement contract, four provenance keys are lifted ontoruns[0].properties:
contract_sha256contract_versionauthorization_refenvironment
runs[0].invocations[0].properties:
budgets_grantedbudgets_consumedsuppressed_tool_attemptsstarted_at
run.invocations is always an array (SARIF 2.1.0 rejects a singular invocation key).
How JSON, SARIF, and bundles fit together
Schema versioning
Breaking changes to the JSON shape bump the
schema string. Additive fields do not.
Next step
- Wire SARIF into GitHub code-scanning in GitHub Actions.
- Package the JSON, SARIF, PoVs, and transcripts together with Evidence packs.
- Verify provenance end-to-end in Signatures.