Skip to content

Harden daemon: socket permissions, env safety, telemetry, rewrite locking#1029

Draft
jwiegley wants to merge 1 commit intojohnw/review-security-fixesfrom
johnw/review-harden-daemon
Draft

Harden daemon: socket permissions, env safety, telemetry, rewrite locking#1029
jwiegley wants to merge 1 commit intojohnw/review-security-fixesfrom
johnw/review-harden-daemon

Conversation

@jwiegley
Copy link
Copy Markdown
Collaborator

@jwiegley jwiegley commented Apr 9, 2026

  • Set umask(077) before creating control/trace sockets to prevent
    TOCTOU race with subsequent chmod
  • Set daemon directory permissions to 0700
  • Move env var sanitization before tokio runtime build to avoid
    unsafe env modification from worker threads
  • Track dropped telemetry envelopes and CAS records via atomic
    counters, expose in FamilyStatus
  • Make watermark update a confirmed operation via oneshot channel
  • Scope watermark pruning to the correct worktree prefix
  • Add file locking for rewrite log read-modify-write cycles

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

…king

- Set umask(077) before creating control/trace sockets to prevent
  TOCTOU race with subsequent chmod
- Set daemon directory permissions to 0700
- Move env var sanitization before tokio runtime build to avoid
  unsafe env modification from worker threads
- Track dropped telemetry envelopes and CAS records via atomic
  counters, expose in FamilyStatus
- Make watermark update a confirmed operation via oneshot channel
- Scope watermark pruning to the correct worktree prefix
- Add file locking for rewrite log read-modify-write cycles

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@svarlamov svarlamov force-pushed the johnw/review-harden-daemon branch from a0f2607 to 9b1e189 Compare April 11, 2026 14:51
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