Download marks: the signing secret is re-minted on any read error at start, so every earlier mark stops verifying #1012

Closed
opened 2026-10-26 10:56:20 +00:00 by Cordy · 0 comments
Owner

Found in the #1007 review (.superpowers/sdd/2026-10-26-batch8/review-b.md B2, final-review.md R3).

marks.go:59-71 mints and writes a new secret whenever reading the secret fails for any reason, not only when the file is missing. A single failed s3 read at start is enough, and every mark issued before then stops verifying in the Trace tab. That defeats leak tracing.

Fix:

  • Mint a secret only when the file is absent (not-exist). On any other read error, refuse the start, or disable marking with an ERROR, and never overwrite.
  • Tests: a missing file mints a secret; an unreadable or corrupt file does not overwrite it.
Found in the #1007 review (`.superpowers/sdd/2026-10-26-batch8/review-b.md` B2, final-review.md R3). `marks.go:59-71` mints and writes a new secret whenever reading the secret fails for any reason, not only when the file is missing. A single failed s3 read at start is enough, and every mark issued before then stops verifying in the Trace tab. That defeats leak tracing. **Fix:** - Mint a secret only when the file is absent (not-exist). On any other read error, refuse the start, or disable marking with an ERROR, and never overwrite. - Tests: a missing file mints a secret; an unreadable or corrupt file does not overwrite it.
Cordy closed this issue 2026-10-27 01:28:42 +00:00
Sign in to join this conversation.
No labels
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#1012
No description provided.