Skip to content

Make recover report-only and record considered attacks - #40

Merged
hmirin merged 6 commits into
mainfrom
claude/drop-recover-publish
Nov 16, 2026
Merged

hmirin merged 6 commits into
mainfrom
claude/drop-recover-publish

Conversation

@hmirin

@hmirin hmirin commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Stacked on #38.

What this does

  • recover is report-only. It classifies the storage head and lists authenticated descendants, replays, and forks, as before. --publish, --base, --discard-newer, and --accept-stale-floor are gone.
  • Storage support used only by publication is removed: observed-head compare-and-swap, historical object restore, and carrier recovery pruning.
  • Docs. guide, design, spec, and README describe recovery as diagnosis plus moving to new storage from a healthy clone. docs/security-model.md gains a Considered attacks section that records each raised attack, its effect, and the decision.

Why

Publishing from a base older than an update the client never saw could omit a revocation and hand new keys to the revoked device (audit #28). Directory storage has no history in which to look for such an update. Corrupting HEAD is a denial of service that storage writers can cause anyway, so the special publication path is not worth its risk. Service resumes by pushing a healthy clone to new storage under the membership the operator chooses then.

Audit findings settled here (docs only, no code change)

Tests

cargo test --all-targets, cargo clippy --all-targets -- -D warnings, cargo fmt --check pass locally. Tests that exercised publication were removed; report-side tests were kept and adjusted.

recover --publish could continue from a base older than a revocation the
client never saw and hand new keys to the revoked device; directory
storage cannot even look for such a state. Remove publication and the
storage support that existed only for it (observed-head CAS, historical
object restore, recovery pruning). recover now only classifies the head
and reports what it found. Service resumes by pushing a healthy clone to
new storage.

Add a Considered attacks section to the security model covering audit
findings #1, #13, #23, and #28, rollback, and long manifest chains.
@hmirin
hmirin changed the base branch from codex/e2ee-checkpoint-full-check to main November 16, 2026 11:22
Keep the coverage that discovery skips corrupt carrier copies for an older
valid manifest and charges rejected bytes, and that heads predating a
writer's enrollment are reported as replays without opening them. Only
the restoration and publication parts of those tests were obsolete.
The previous text claimed a swapped directory could only leave stray
ciphertext files. A replaced storage directory redirects every write,
including the rename that replaces HEAD. State that the local path is the
operator's to manage and that the client does not defend it.
Put the premise every considered attack is judged against at the top of
the security model: storage contents are untrusted and verified; the
client machine, its state, Git configuration, and the paths the user
points it at are trusted.
@hmirin
hmirin marked this pull request as ready for review November 16, 2026 11:39
@hmirin
hmirin merged commit 8e1d073 into main Nov 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant