Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).

### Added

- **`kit audit verify --all` — the union view over every audit log this machine sealed.**
`kit audit verify` answers for one working tree, correctly: a git worktree IS a distinct
working tree, so it gets its own chain. On a machine running several — the normal case
under a worktree-per-session agent harness — that produced N green verdicts and no
whole-machine answer. The data was already on disk and unread: `~/.kit/audit-anchor.json`
keys the HMAC tip per log path and is shared by every tree (15 paths on the machine that
filed #470); the only reader outside `audit-anchor.ts` looked up one path.

Four outcomes, because collapsing them is what makes such a report unreadable: `verified`;
`stalled` (the log is there but its seal no longer covers it — an unsealed tail, or a
rotated anchor key); `missing` (the log path is gone — a temp dir or deleted clone, which
is most of those 15 paths and never a finding); `failed` (chain break, truncation, tip
mismatch, or a seal that could not be checked at all). Exit 1 on any `failed`; a `stalled`
seal warns and fails under `--strict` / `[governance.audit].require_anchor` — deliberately
the same policy `decideAnchorVerdict` already applies to a single tree, since the same
evidence must not verify green in one command and red in the other. `--json` for machines.

Exit codes stay `[0, 1]`: `public-surface.ts` declares that set for every stable command,
so the missing/stalled distinction is carried by the report, not by a third code.

- **`self-audit` now checks documentation in both directions.** The existing docs-claims
rules prove no doc names something kit lacks; they are structurally incapable of catching
the reverse, because an undocumented command has no doc reference to check. The new
Expand Down
1 change: 1 addition & 0 deletions docs/COMMANDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ fixture credentials at run time) so nothing new accumulates.
| `kit audit` | Print recent `.kit-audit.jsonl` entries. |
| `kit audit secrets [--key <name>] [--since-days <N>]` | Forensics: who/what touched each key + when. |
| `kit audit verify [--strict]` | Verify the keyless hash chain + the external HMAC anchor (tip mismatch = keyless rewrite, count mismatch = truncation; exit 1 on break/forge). `--strict` / `[governance.audit].require_anchor` makes an unanchored log / unreadable key / unsealed tail a hard fail. |
| `kit audit verify --all [--json]` | **Union view** over every audit log this machine has sealed (`~/.kit/audit-anchor.json` keys the tip per log path, so it spans every working tree; plain `kit audit verify` answers for `cwd` only). Outcomes: `verified`; `stalled` (log present, entries past its seal or a rotated anchor key — re-seal there); `missing` (log path gone: temp dir / deleted clone, never a finding); `failed` (chain break, truncation, tip mismatch, or a seal that could not be checked). Exit 1 on any `failed`; `stalled` warns and fails under `--strict` / `[governance.audit].require_anchor`. |
| `kit audit anchor` | Seal the log with the machine-local anchor key (`~/.kit/audit-anchor.key`, `0600`) so a keyless rewrite/truncation is detectable. Append path stays keyless; not tamper-proof against a same-UID key reader. |
| `kit audit export [--format cef\|syslog\|json]` | Emit the audit log for a SIEM. |
| `kit whoami [--json]` | Show current agent / user identity, active environment, and budget usage. |
Expand Down
Loading
Loading