security: narrow macOS sandbox file access and isolate command temp directories
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 30/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- macos, typescript
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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).
- Lingua principale
- TypeScript
- Stelle
- 2
- Fork
- 2
- Merge medio
- 6h 27m
- PR unite (30g)
- 37
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PierrunoYT/patch
-
Difficoltà 4/5 1-2 giorni Idoneità per principianti 52/100
PierrunoYT/patch#329 ·
I maintainer di solito rispondono entro 1 giorno
-
performance priority: low severity: low
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
PierrunoYT/patch#324 ·
I maintainer di solito rispondono entro 1 giorno
-
performance priority: low severity: low
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
PierrunoYT/patch#306 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 36/100
PierrunoYT/patch#272 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement priority: low security severity: low
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
PierrunoYT/patch#271 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di PierrunoYT/patch
Issue simili
-
VS Code extension: clickable file links in chat drop the :line suffix, never jump to the lineAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
MoonshotAI/kimi-code#4398 ·
I maintainer di solito rispondono entro 1 giorno
-
Xiaomi Mimo语音识别服务异常Apertapending triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
package-lock.json : les binaires natifs macOS et Linux de unrs-resolver ont disparu depuis #1823Apertabug dependencies
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
AxaFrance/design-system#2064 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100