MAQPNADocs

maqpna incident export

Export a verified incident timeline from the audit ledger for a 6-hour (CERT-In) report

Observe-o json | yaml

Synopsis#

maqpna incident export [FILE] [--gateway URL] [--since 6h] [--until RFC3339] [-n NS] [--session S] [--agent A]
                       [--all] [--detected RFC3339] [--format json|md] [--out FILE]

Description#

From the help of maqpna incident:

Builds an incident timeline from the hash-chained audit ledger: a local FILE (e.g. one fetched with "maqpna audit fetch ledger"), or the live gateway (--gateway / MAQPNA_GATEWAY_URL, auditor token). The chain is verified over the exported window. Notable events are denials, approvals, admin operations (kill switch, revocations, vault), DLP and taint hits; --all adds allowed calls.

--detected sets when the incident was noticed (default: now); the document then states the CERT-In reporting deadline (detected + 6h). Times are UTC from the ledger; the gateway's clock must be synchronised (CERT-In: NTP to the NIC / NPL servers, see the Cloud profiles docs).

This is a fact sheet from the ledger to help fill in a report, not legal advice and not a filed report.

Flags#

FlagTypeDescriptionDefault
--agentstringonly this agentnone
--allswitchinclude allowed calls, not only notable eventsnone
--allow-gateway-mismatchswitchsend the context's login token to a gateway other than the one it was issued for (env MAQPNA_ALLOW_GATEWAY_MISMATCH=1)none
--detectedstringwhen the incident was noticed (RFC3339; default now)none
--formatstringjson (machine-readable) or md (a report draft)json
--gatewaystringgateway base URL (env MAQPNA_GATEWAY_URL; default: the context's gateway)none
-n, --namespacestringonly this namespacenone
--oidc-token-filestringfile holding an OIDC access token for the admin API (env MAQPNA_OIDC_TOKEN_FILE); wins over --tokennone
--outstringwrite to FILE (0600) instead of stdoutnone
--sessionstringonly this sessionnone
--sincestringwindow start: a duration ago (6h) or an RFC3339 time6h
--tokenstringstatic admin token (env MAQPNA_ADMIN_TOKEN; dev/break-glass)none
--untilstringwindow end (exclusive), RFC3339; default nownone

The global flags (--context, -o, --no-color, ...) work with every command.

Examples#

maqpna incident export --gateway "$GW" --since 6h --format md --out incident.md
maqpna incident export audit.jsonl --since 2026-10-10T02:00:00Z --until 2026-10-10T08:00:00Z -n team-a
maqpna incident export --gateway "$GW" --since 24h --detected 2026-10-10T07:45:00Z --all -o json

What happens when you run it#

  • Talks to the gateway: --gateway, else MAQPNA_GATEWAY_URL, else the current context's gateway (maqpna context).
  • Authenticates to the admin API with the token stored by maqpna login, --oidc-token-file, or a static --token (MAQPNA_ADMIN_TOKEN).
  • Prints a table by default; -o json or -o yaml print the data, and --jq EXPR filters the JSON.

Exit codes#

CodeMeaning
0success
1error (the message says what failed, with a hint when there is one)
2usage error: unknown flag, missing argument or bad value; the synopsis is printed
3a check failed, a change is blocked, or a result did not match (tamper, policy mismatch) (not used by this command)