You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Non-unix fallback for .sc/local-key permissions (P33 follow-on) #214
.sc/local-key is created 0600 from the first byte through a unix-only OpenOptions::mode call (crates/repo/src/cache.rs, write_key_0600). There is no non-unix path, so on a non-unix target the key file is left with default permissions, which may be world-readable. Deferred in ROADMAP.md (P33).
The key keys the protected-cache tag PRF, so leaking it lets a local reader test guesses against cached plaintext tags.
Needs a Windows environment to verify. Options: restrict the file ACL to the current user (via a small, justified dependency or icacls-free API calls), or refuse to create the key and run cacheless (spurious re-seals, never incorrect) when permissions cannot be set.
Acceptance criteria
On Windows the key file is readable only by the current user, or the cache is disabled with a clear warning.
A test that runs on the Windows CI target, if one exists; otherwise a documented manual check.
Amended framing (PR #225): the original cacheless idea was rejected because it makes status and the clean-tree gates refuse for non-unix users with protected files. #225 instead keeps the key and caches on non-unix with inherited default permissions and prints a one-time warning once a cache holds a protected entry. Checkout already writes protected plaintext with default permissions on every platform, so the added exposure is small (see THREAT-MODEL.md). Remaining, so this issue stays open: an owner-only Windows ACL (windows-sys is already a transitive dep) and a manual permissions check on a real Windows host. Neither is verified from the macOS dev environment.
Activity
fix(repo): delete a legacy local-key when cacheless; document the sta…
fix(repo): warn once instead of going cacheless when local-key cannot…
tonibergholm-codento commentedon Oct 20, 2026
Amended framing (PR #225): the original cacheless idea was rejected because it makes status and the clean-tree gates refuse for non-unix users with protected files. #225 instead keeps the key and caches on non-unix with inherited default permissions and prints a one-time warning once a cache holds a protected entry. Checkout already writes protected plaintext with default permissions on every platform, so the added exposure is small (see THREAT-MODEL.md). Remaining, so this issue stays open: an owner-only Windows ACL (
windows-sysis already a transitive dep) and a manual permissions check on a real Windows host. Neither is verified from the macOS dev environment.fix(repo): warn when the protected-cache key cannot be permission-res…
docs: owner-only local-key on Windows (THREAT-MODEL, ADR-0043, CLAUDE…
fix: cfg-gate unix-only test and keygen code so the workspace checks …
fix(repo): review findings: no link-following on create, warn only af…
docs: list windows-sys in the third-party inventory
fix(repo,cli): warn at ACL fallback, long-path ACL, keygen never over…
feat(repo): owner-only DACL for .sc/local-key on Windows, plus an adv…