Skip to content

fix: isolate recorder files in verified private runtime jobs - #64

Merged
TimInTech merged 1 commit into
mainfrom
fix/recorder-runtime-hardening
Oct 13, 2026
Merged

TimInTech merged 1 commit into
mainfrom
fix/recorder-runtime-hardening

Conversation

@TimInTech

@TimInTech TimInTech commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Recorder files previously used predictable names derived from USER under an insufficiently verified runtime path. A writable or substituted directory could redirect file access or overwrite unrelated files.

This change verifies absolute runtime paths component by component, rejects symlinks and unsafe ownership/permissions, and creates unique private recording jobs. Files are created exclusively as 0600 through pinned directory descriptors; parec writes through an inherited WAV descriptor. PIDFD identity binding and the startup gate are preserved.

Successful WAVs remain available through transcription, including when the recorder is discarded, reused, or destroyed. The transcription worker removes the completed job in its finally block; aborted and failed jobs are cleaned separately.

Validation:

  • Full local offscreen suite: 784 passed (Python 3.14.4), including 100 recorder tests.
  • Independent security/code review: no confirmed blockers; recorder tests passed independently.
  • Isolated regression reproduction against main: nine runtime/path cases fail as expected.
  • Compile, shell syntax, diff, tracked-file secret scan, and critical Ruff checks pass. Full Ruff has no new findings relative to main (42 existing findings versus 43).
  • Installed libsndfile successfully writes a valid WAV through /proc/self/fd/N in an isolated file test; no productive audio services were changed.

GitHub validation on commit 2bd940e:

TTS, Wayland detection, unrelated alerts, versions, tags, and releases are out of scope. The private-directory boundary protects against other UIDs; same-UID/root processes remain outside that boundary. Abrupt application or host termination can leave private recording jobs; this fix adds no global sweeper.

Copilot AI balanced review requested due to automatic review settings October 13, 2026 10:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T11:01:53.010079Z 2bd940e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@TimInTech
TimInTech merged commit b06425a into main Oct 13, 2026
12 checks passed
@TimInTech
TimInTech deleted the fix/recorder-runtime-hardening branch October 13, 2026 11:02
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.

2 participants