security: narrow macOS sandbox file access and isolate command temp directories
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- macos, typescript
調査の方向性
Start with src/main/tools/sandbox.ts and the existing real Seatbelt tests and macOS CI leg; first trace how seatbeltProfile grants filesystem access and how command temp directories are configured. Run the native macOS tests and extend them to cover the listed access, alias, network, descendant, and cleanup cases. Done means the acceptance checks pass on a real Mac, with missing or broken Seatbelt execution treated as failure.
索引モデルが issue の本文から書いたものです。
説明
Observed policy
seatbeltProfile in src/main/tools/sandbox.ts starts with (deny default) but then grants (allow file-read*), denies reads beneath the current user's home, and reopens the project and selected toolchain directories.
Its writable set includes env.cwd, env.tmp, /tmp, /private/tmp, and all of /private/var/folders. Consequently, the filesystem policy is broader than a project plus a private command-temp directory:
- OS-readable files outside the current user's home are generally readable, including other project/data locations.
- Existing OS-writable files in shared temp trees are within the sandbox's permitted write scope, not just files created for this command.
These are findings from policy inspection, not a demonstrated macOS exploit. Ordinary filesystem permissions still apply. Do not describe this as a confirmed sandbox escape.
Proposed outcome
- Replace blanket filesystem reads with explicit system/runtime/toolchain read grants, plus the project and that command's temporary directory.
- Give each command a private temporary directory and point its temp environment variables there; do not grant entire shared temp trees merely to support temporary files.
- Keep required special-device and runtime exceptions narrow and documented.
- Resolve path aliases/symlinks consistently, including
/varversus/private/varand/tmpversus/private/tmp. - Preserve no-network defaults, foreground/background behavior and fail-closed startup. Additional access should require explicit approval rather than silent widening.
Acceptance checks on a real Mac
- Successfully launch a probe and demonstrate project/private-temp writes and required toolchain reads.
- Deny reading a disposable OS-readable fixture outside the project/home grants and modifying a sibling fixture in shared temp storage; retain an unsandboxed control proving the host can perform those operations.
- Cover symlink/path aliases, credential locations, network denial and background descendants.
- Exercise representative build tools and private-temp cleanup on success, timeout and cancellation.
- Keep native-backend CI requirements; missing or broken Seatbelt execution must not count as a passed isolation test.
Follow-up to #76. Existing real Seatbelt tests and the macOS CI leg should be extended, not replaced by another nominal coverage-only suite. Packaged-app signing/manual launch work remains separate (#22, #71).
- 主要言語
- TypeScript
- スター
- 2
- フォーク
- 2
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PierrunoYT/patch のほかの issue
-
tests
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
PierrunoYT/patch#393 · コメント 1 件 ·
-
ci: macOS hardened-runtime smoke step fails because the re-signed app's helpers cannot connect (#28)オープンbug platform: macos tests
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
PierrunoYT/patch#392 · コメント 1 件 ·
-
blocked platform: windows
難易度 4/5 1〜2日 初心者へのやさしさ 52/100
PierrunoYT/patch#329 · コメント 3 件 ·
-
performance priority: low severity: low
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
PierrunoYT/patch#324 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 36/100
PierrunoYT/patch#272 · コメント 1 件 ·
PierrunoYT/patch の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
area:plugins area:security area:skills bug has repro
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
anthropics/claude-code#105911 ·
メンテナーはふだん 1 日以内に返信
-
documentation good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
dev-five-git/devup-ui#879 ·
メンテナーはふだん 11 日以内に返信
-
openspec-apply-change skill: when blocked, may select a ready artifact unrelated to missingArtifactsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Fission-AI/OpenSpec#2165 ·
メンテナーはふだん 1 日以内に返信
-
🐞 bug 🧐 unconfirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
Tencent/tdesign-vue-next#7032 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信