Skip to content

fix(authz): redact capability ids and scrub persisted approval args - #1426

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-10679-security-hygiene-redact-capability-ids-credential
Oct 15, 2026
Merged

TheGreatAxios merged 2 commits into
mainfrom
cl-10679-security-hygiene-redact-capability-ids-credential

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Log and receipt sites on the approval rail emit a truncated+hashed correlation ID (redactedCorrelationId — prefix + sha-256 fragment, ~90 bits residual on a v4 UUID) instead of the bearer capability; a log reader no longer becomes a forgery actor. Event-sink audit recorded in PR: run.json carries status/usage only, message.correlated/gate.blocked fan out to in-memory consumers, metadata.json persists IDs by design for restart-resume.
  • Approval-snapshot arguments are secret-scrubbed at the persisted-metadata boundary (scopedPendingSnapshotScrub over every pending op in writeMetadata); live calls and the vendored suspendedCall re-dispatch path stay raw — snapshot-fidelity comparison normalizes both sides through the same scrub, so recovery of parked approvals with secret-carrying args still succeeds (regression test covers the exact flow that would otherwise fail snapshot-mismatch).
  • CredentialMaterial freezes at the source cell (shallow freeze on the material + its string-valued headers; callers receive copies); no production writer mutates headers afterwards; never logged.
  • Retry policies documented trusted-first-party-only (vendored harness.ts:1749 raw-warn is unreachable by app flow today and ledgered as an upstream promotion candidate, along with the vendored processDelivery fatal path that interpolates the full ID); the persisted-at-rest suspendedCall.arguments gap for the vendored re-dispatch owner is named in the ledger.
  • Error message texts in assertReplySend and ApprovalDeliveryTimeoutError redacted to the hashed form while keeping structured .correlationId props.

Verification

  • Failing test first for the scrub: a real persisted snapshot with a secret-shaped arg contained raw credentials before wiring (persistedHasSecret=true), redacted after; recovery flow passthrough asserted.
  • Recovery-vs-redaction regression: parked approval with secret args → writeMetadata → resolveSuspendedApprovalFromStore succeeds post-scrub (the flow that failed during review is now pinned green).
  • bun run check exit 0: full one-process suite 8965 pass / 0 fail across 584 files; git diff --stat -- vendor/ empty.

Fixes CL-10679

Correlation ids are bearer capabilities (see the provenance gate): log
and receipt sites now emit a truncated+hashed form, so a log reader no
longer becomes a forgery actor. Approval-snapshot arguments are secret-
scrubbed at the persisted-metadata boundary (live calls untouched), and
credential headers freeze at the source cell. The vendored raw-warn
sites are unreachable from the app path and are dispositioned in the
vendor ledger; retry policies are documented trusted-first-party-only.
@linear-code

linear-code Bot commented Oct 14, 2026

Copy link
Copy Markdown

CL-10679

@corbits-triage

corbits-triage Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by the comment below.

@corbits-triage

corbits-triage Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by the comment below.

Integrity compare no longer collapses every secret to one redaction token.
Redacted-at-rest snapshots still match the live call; raw re-dispatch
arguments must match exactly.
@corbits-triage

Copy link
Copy Markdown
Contributor

This supersedes the comment above because the rules changed: repository policy version 16 → version 19.

Triage: Pass

No changes needed from you. A maintainer will review this pull request.

@TheGreatAxios
TheGreatAxios changed the base branch from cl-10678-security-authenticate-approval-correlation-validator-gate to main October 15, 2026 19:17
@TheGreatAxios
TheGreatAxios merged commit 0176840 into main Oct 15, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant