Skip to content

v0.2.5 — self-healing state/status file permissions (0600/0700)

Choose a tag to compare

@shojikumaru shojikumaru released this 04 Sep 05:41
· 19 commits to main since this release
4aad210

Self-healing state/status file permissions in the TypeScript core (closes the single-UID assumption documented in SECURITY.md for the TS path).

  • state/<domain>.json and state/status.json are now written at mode 0600: temp files are opened with 0600 and fchmod'ed to 0600 before any content is written, then renamed into place.
  • The state/ root is chmod 0700 after every mkdir in both write paths, so a pre-existing looser directory is healed on the next write — matching the Python runtime (adapters/hermes/runtime.py).
  • Three POSIX-guarded tests (state root pre-loosened to 0755; stale fixed-name temp pre-existing at 0644; status/domain files after set + turn). They skip with an explicit reason on filesystems that cannot express permission bits (WSL2 DrvFs), via the existing fs-caps probe.

Out of scope, noted for follow-up: lock/recovery files are still created at umask default inside the now-0700 root (defense-in-depth only).

Full record: #1 / PR #53 (L1-7 completion record in PR comments; writer Codex GPT-5.6 Sol; 3-seat review GLM 5.3 / Kimi K3 / Grok 4.6 → GO-WITH-MINOR / GO / GO, delta re-review by GLM → cumulative GO 3/3; risk-reviewed label by roster owner).

npm 0.2.5 published (2026-09-04, via #56 / PR #58 / run 33887221802 — manifest aligned to this tag; registry tarball == this tree, CONTENT_IDENTICAL).