Skip to content

Trust local paths for the continuity floor - #41

Merged
hmirin merged 2 commits into
mainfrom
claude/trust-local-floor
Nov 16, 2026
Merged

hmirin merged 2 commits into
mainfrom
claude/trust-local-floor

Conversation

@hmirin

@hmirin hmirin commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

What this does

Removes the continuity-floor permission checks in src/continuity.rs: the walk over every parent directory for group/other write access without the sticky bit, the macOS ACL check, the link-owner check, and the mode checks on the existing floor and lock files. New floor directories are still created with mode 0700 and the floor and its lock with 0600. Key-file permission checks (crypto.rs) are unchanged.

Why

docs/security-model.md now states the trust boundary as remote untrusted, local trusted. Other accounts on the same machine are local, so defending the floor against them contradicts the model. In practice the checks blocked legitimate setups found while rolling 8e1d073 out to the production Vault:

  • a hosted VM whose home is 2770 root:nogroup (every operation failed with "continuity directory /home/hatch can be replaced by another user");
  • Linux state directories created under umask 002 (775), which had to be tightened by hand.

Tests

floor_works_under_group_writable_existing_directories fails on main with the error above and passes here. The rejection tests for writable, symbolic, and ACL-exposed floor paths are removed; the test that new paths stay private under a permissive umask is kept. cargo test --all-targets, cargo clippy --all-targets -- -D warnings, cargo fmt --check pass locally.

The floor checks refused any group- or other-writable ancestor, ACL, or
foreign link, which stopped a hosted VM whose home is 2770 root:nogroup
and Linux state created under umask 002. The security model treats the
local machine, including its other accounts, as trusted, so drop the
checks. New floor directories are still created 0700 and floor files
0600; key files still refuse other readers.
@hmirin
hmirin merged commit af8149d 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