audit_export
Export audit bundles with verification proofs for compliance and procurement. Outputs JSON, GUAC JSONL, or evidence-pack envelopes.
Instructions
Export a compliance or procurement audit bundle with optional verification proofs.
Use when auditors need envelope bundles (JSON, GUAC JSONL, or evidence-pack).
Prefer ``verify_pr_range`` for merge-gate pass/fail on a commit range.
Prefer ``list_envelopes`` to browse hosted metadata without exporting files.
Hosted (Team+): requires SSX360_API_KEY; calls ssx360.com/api/v1/audit/export.
Local fallback: exports from git notes or on-disk envelopes when no API key.
Side effects: writes files under ``output_dir`` locally; hosted mode returns
download metadata. Returns ``{ok, bundle?, download_url?, error?}``.
Parameters:
start_date / end_date: ISO 8601 UTC bounds (hosted filter).
signer_id: Filter by device_id or public-key fingerprint.
format: json, guac, or evidence-pack serialization.
include_verification: Attach per-envelope verification replay data.
workspace / base / head / output_dir: Local fallback range and output path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | Local-only: Git ref (exclusive) when exporting from git notes or on-disk envelopes. | origin/main |
| head | No | Local-only: Git ref (inclusive) when exporting from git notes or on-disk envelopes. | HEAD |
| format | No | Export serialization: json (envelope bundle), guac (GUAC JSONL ingest), or evidence-pack (hosted Team+ procurement bundle with verification metadata). | json |
| end_date | No | ISO 8601 UTC upper bound for audit records (inclusive), e.g. 2026-06-30T23:59:59Z. | |
| signer_id | No | Filter export to envelopes signed by this device_id (MS-XXXX-YYYY) or Ed25519 public-key fingerprint. Empty includes all signers in scope. | |
| workspace | No | Git repository root for local fallback export. Empty auto-detects from cwd. | |
| output_dir | No | Local-only: directory for exported files. Relative paths resolve under the repo root. | .matrixscroll/audit-export |
| start_date | No | ISO 8601 UTC lower bound for audit records (inclusive), e.g. 2026-01-01T00:00:00Z. Hosted export filters org audit history; local export filters by commit author date when available. | |
| include_verification | No | When true (default), attach per-envelope verification results and trusted-key policy outcomes to the export for auditor replay without re-running Scroll Gate. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||