security: narrow macOS sandbox file access and isolate command temp directories
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- macos, typescript
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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).
- Lenguaje dominante
- TypeScript
- Estrellas
- 2
- Forks
- 2
- Merge medio
- 6 h 27 min
- PR fusionados (30 d)
- 37
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de PierrunoYT/patch
-
Dificultad 4/5 1-2 días Aptitud para principiantes 52/100
PierrunoYT/patch#329 ·
Los mantenedores suelen responder en 1 día
-
performance priority: low severity: low
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
PierrunoYT/patch#324 ·
Los mantenedores suelen responder en 1 día
-
performance priority: low severity: low
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
PierrunoYT/patch#306 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 36/100
PierrunoYT/patch#272 ·
Los mantenedores suelen responder en 1 día
-
enhancement priority: low security severity: low
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
PierrunoYT/patch#271 ·
Los mantenedores suelen responder en 1 día
Todos los issues de PierrunoYT/patch
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
awesome-dsh-plugin/awesome-dsh-plugin#9184 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
farion1231/cc-switch#8829 ·
Los mantenedores suelen responder en 1 día
-
[core-client] Remove unused hand-maintained transport helpers after the definition-table cutoverAbiertodoc-audit enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100