Repository navigation
feat(audit): kit audit secrets --key --since answers from a verified chain - #1132
Open
sandstream wants to merge 7 commits into
Open
sandstream wants to merge 7 commits into
sandstream wants to merge 7 commits into
Conversation
…chain "Was NAME read or written through kit since T, and by whom?" had no direct answer: the per-key view takes a window in whole days, never says what it cannot see, and never checks that the log it read is intact. kit audit secrets --key <NAME> --since <ISO> [--json] lists each read and write of the key since T with the declared agent, detected harness and kit surface, counts the secret events that name no key, verifies the hash chain and the HMAC anchor, and exits 1 when they do not verify. Every answer states its coverage: reads through kit only; processes that read .env.local directly are not visible. Found by kit-research note kms-decrypt-evidence-vs-kit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rotation plan assumes every key was read, because kit had no read evidence. The stores often keep it. Next to the rotation plan, kit secrets incident now prints, per key, the command that fetches the store's own access record since --since: CloudTrail GetSecretValue and KMS Decrypt lookups for aws-sm (90-day Event history), the AccessSecretVersion Data Access query for gcp-sm (off by default), the SecretGet AuditEvent query for azure-kv, the 1Password item-usages call and the Infisical get-secret audit-log query, each checked against the vendor page it cites. Vault, Doppler and Bitwarden are marked not verified with no command. Every key also gets kit's own kit audit secrets --key --since. Printed only, never run. Found by kit-research note kms-decrypt-evidence-vs-kit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base automatically changed from
claude/web-kit-status-sync-p6fg9a-protected-audit-secrets-keys
to
main
November 27, 2026 11:27
sandstream
dismissed
sandstream-kit-reviewer[bot]’s stale review
November 27, 2026 11:27
The base branch was changed.
…6fg9a-protected-incident-evidence-plan feat(secrets): print an evidence plan per key in kit secrets incident
|
Docker image built, scanned, and smoke-tested in CI. The PR image is local to this run and is not published. |
…audit-secrets-query
|
Docker image built, scanned, and smoke-tested in CI. The PR image is local to this run and is not published. |
There was a problem hiding this comment.
kit review gate at f1b2e8173867: not approved.
- checks did not pass: build-and-test, checks (format, lint, build, gates)
- touches protected paths (secrets), which the owner approves:
src/secrets-evidence-plan.test.ts,src/secrets-evidence-plan.ts,src/secrets-incident-cli.ts
docs/COMMANDS.md is at the 600-line file-size limit on main; the extra table row put it at 601 and failed the standards gate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Docker image built, scanned, and smoke-tested in CI. The PR image is local to this run and is not published. |
…dit-secrets-query Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Docker image built, scanned, and smoke-tested in CI. The PR image is local to this run and is not published. |
Kit-Hook-Tree: d1bf46e # Conflicts: # docs/FEATURES.md
|
Docker image built, scanned, and smoke-tested in CI. The PR image is local to this run and is not published. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #1115 (base branch
claude/web-kit-status-sync-p6fg9a-protected-audit-secrets-keys), next to #1126 (which records the reads this command reports). Protected — owner merges (branch touches the secrets audit surface).Found by kit-research note
kms-decrypt-evidence-vs-kit(Plan item 5, owner-approved): no command answered "was secret X read, and by whom, since T", and the existing view never said what it cannot see or whether the log it read is intact.Change
kit audit secrets --key <NAME> --since <ISO 8601> [--json](newsrc/audit-secrets-query.ts, CLI insrc/commands/audit-secrets-query.ts):secrets.readfrom feat(secrets): record every secret read in the audit chain, governance on or off #1126, the governedsecrets.generate,secrets.incident) and write (propagate,sync,rotate,migrate,onecli register) of NAME at or after T, oldest first, with who (declared agent, detected harness, kit surfacevia) and where (store or target).reads through kit only; processes that read .env.local directly are not visible.kit audit verifywithout--strict), and prints whether it verified. Broken chain, failed anchor, missing or empty log, or a--sincethat is not ISO 8601: exit 1, with a stderr line saying the answer cannot be relied on.--jsonemits the same answer (key,since,coverage,chain{verified,status,entries,detail},reads,writes,events[],unattributed).--since-daysand--targetbehave as before. Dispatch lives in a newcmdAuditSecretsOrQuery, so the frozencmdAuditSecretsdoes not grow.--sinceis added to the audit flag surface and the OpenCLI snapshot.Names only, never values: the events it reads carry none.
secrets.readis matched as a string here so this PR stands alone on #1115; #1126 exports the same name asSECRET_READ_OP.Before / after
src/commands/audit-secrets-query.test.tsagainst the #1115 head:On this branch (with the pure
answerKeyAccesstests):Harnesses
A plain CLI: same under Claude Code, Codex or a terminal. The
harnesscolumn is filled for Claude Code and Codex reads (#1126). Reads made under Cursor, Cline, Copilot, Gemini CLI or Augment showviaand the declared agent, with no harness name.Platforms
Linux tested.
node:pathonly; no shell. Windows runs in CI. macOS is unverified.node scripts/prepush.mjs --allow "enforcement gate liveness": all steps pass locally except the known local-onlykit review --enforcetool gaps and Semgrep (not installed).adr check: no new violations.Generated by Claude Code