Secret vault (#60)
security.redact_secrets with vault: true replaces each detected secret by <SECRET_n> and keeps the originals in an in-memory SecretVault owned by the WarTools instance. The result carries a random vaultId.
- Per session, in memory, TTL 15 min (refreshed on each
vault: truecall), max 1000 entries per session and 1000 live session vaults (expired vaults are swept when a new one opens; past the cap the vault closest to expiry is evicted). Never part ofKvStore, snapshots, checkpoints,PolicyStateStoreor traces.toJSON/repr/ToStringreturn only[SecretVault n entries].resetSession(Node) clears it. - Never cached:
security.restore_secrets,security.vault_clearandsecurity.redact_secretswithvault: truebypass the idempotency cache even withallowSideEffects, so plaintext never reaches thePolicyStateStoreand a cleared vault stays cleared. - Traces:
RedactingTraceSinkmasks every live vault value ([REDACTED_VAULT]) before the PatternEngine runs, even when the pattern engine would not have detected it. security.restore_secrets { text, vaultId? }replaces known canonical placeholders (<SECRET_1>, not<SECRET_01>) in one non-recursive pass; unknown ones stay untouched. It returns real secrets, so it isrequiresApprovalandsideEffects(never cached or retried by default). A wrong or missing vault, another session, or an expired vault givesINVALID_INPUTwithout echoing any value.vaultIdis compared in constant time.security.vault_cleardiscards the session's vault and returns{ cleared }.- Input that already contains
<SECRET_is rejected whenvault: true(it would be ambiguous on restore).