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
fix(launcher): create desktop-runtime-v1.json with mode 0600 on non-Linux Unix - #1004
desktop-runtime-v1.json carries the launcher's control port and nonce. On Linux it is already written privately, but on macOS (and other non-Linux Unix) it was created with umask defaults, typically 0644, so any local user could read the nonce.
This creates the temporary descriptor with mode(0o600) on non-Linux Unix before the atomic rename. Windows and Linux paths are unchanged.
cargo test -p codexhost-launcher --bins unix_runtime_descriptor_is_created_with_private_mode passes on macOS; with the options.mode(0o600) line removed it fails (420 vs 384, i.e. 0644 vs 0600).
This change makes the runtime descriptor private (mode 0600) on non-Linux Unix, closing the default-permission exposure of the launcher nonce. A residual case remains where a non-default inheritable ACL on a macOS user's home tree could still grant other users read access. That case is unlikely and can be handled as a follow-up.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
标题描述了主要变更:在非 Linux Unix 平台上以 0600 权限创建 desktop-runtime-v1.json。该标题与变更集和 PR 目标一致,且指出了具体平台与权限。
Description check
描述说明了问题原因:在 macOS 及其他非 Linux Unix 上,描述符文件以默认 umask(通常为 0644)创建,本地其他用户可读取 nonce。描述也说明了修改方式(在原子重命名前设置 mode(0o600))、Windows 与 Linux 路径不变,并给出了测试与验证步骤。与变更集直接相关。
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between ae460a9 and 40b71da.
Files selected for processing: 1
crates/launcher/src/runtime_instance.rs
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
Eleven manifest lines still carried fork copies of changes that upstream has
already released. Each one names a merged PR whose head commit is an ancestor
of v0.28.2, so the line only re-applies the pre-review copy of code that the
release tag already contains, and that duplication is what turns the manifest
replay into conflicts.
Removed lines and their merged PRs:
- thin/cursor-fast-selection (BytePioneer-AI#782)
- thin/delegation-inspect-fast-models (BytePioneer-AI#986)
- thin/delegation-catalog-parent (BytePioneer-AI#970)
- thin/settings-hide-desktop-envs (BytePioneer-AI#972)
- thin/settle-turns-after-session-fault (BytePioneer-AI#969)
- thin/external-thread-turn-recency (BytePioneer-AI#973)
- thin/claude-code-todo-tools (BytePioneer-AI#976)
- thin/reasoning-summary-parts (BytePioneer-AI#967)
- thin/shared-archived-thread-revival (BytePioneer-AI#988)
- fix/desktop-mcp-session-reap-v0.22 (BytePioneer-AI#981)
- fix/macos-descriptor-mode (BytePioneer-AI#1004)
For the two lines whose comments noted that the fork copy predated the PR's
review changes (BytePioneer-AI#969, BytePioneer-AI#976), the reviewed upstream version replaces it.
Checked with `scripts/vincent-release.sh audit` (ancestor and patch-cherry
checks) and by replaying the manifest onto v0.28.2 in a scratch worktree: these
eleven lines no longer merge, and the fifteen remaining lines are fork-only
changes that need re-cutting from the new tag.
Lines for fork-only additions are untouched: the extras documented for BytePioneer-AI#470,
BytePioneer-AI#987 and BytePioneer-AI#989 stay, and the lines for the closed PRs BytePioneer-AI#576, BytePioneer-AI#783, BytePioneer-AI#784, BytePioneer-AI#785 and
BytePioneer-AI#396 stay.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
desktop-runtime-v1.jsoncarries the launcher's control port and nonce. On Linux it is already written privately, but on macOS (and other non-Linux Unix) it was created with umask defaults, typically0644, so any local user could read the nonce.This creates the temporary descriptor with
mode(0o600)on non-Linux Unix before the atomic rename. Windows and Linux paths are unchanged.Validation
unix_runtime_descriptor_is_created_with_private_mode(non-Linux Unix).cargo test -p codexhost-launcher --bins unix_runtime_descriptor_is_created_with_private_modepasses on macOS; with theoptions.mode(0o600)line removed it fails (420vs384, i.e.0644vs0600).cargo fmt --checkclean.