Command sandbox: no process or memory limits on macOS (Seatbelt)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 38/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- docker, typescript
Línea de trabajo
Start by locating the existing DEFAULT_LIMITS and the Linux bubblewrap, macOS Seatbelt, and container command-launch paths; the issue does not name their files. Read the backend tests and docs/USAGE.md to understand current behavior. Done means process and memory limits are applied where supported, failures are logged without blocking command execution, documentation is updated, and real backend tests verify fork and memory limits while ordinary commands still pass.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
The command sandboxes apply different resource limits:
| Backend | Processes | Memory | Time |
|---|---|---|---|
| Windows AppContainer | job object limit (512) | per process (8 GB) | tool timeout |
| Docker/Podman | --pids-limit=1024 |
none | tool timeout |
| Linux bubblewrap | none | none | tool timeout |
| macOS Seatbelt | none | none | tool timeout |
On Linux and macOS a sandboxed command, whether a runaway test or a prompt-injected one, can fork-bomb or exhaust memory. That hangs the user's machine and Patch with it. Background commands have no timeout, so a background command can keep consuming resources until it is stopped.
Proposed outcome
- Linux: run bubblewrap commands in a transient cgroup with
pids.maxandmemory.max, for example throughsystemd-run --user --scope -p TasksMax=… -p MemoryMax=…when it is available. Otherwise useprlimit/setrlimitfor the number of processes and the address space. - macOS: apply
setrlimit(RLIMIT_NPROC,RLIMIT_ASorRLIMIT_DATA) beforesandbox-exec, through a small launcher if needed. - Containers: add
--memory(and--memory-swap) next to--pids-limit. - Use the same defaults as Windows (
DEFAULT_LIMITS: 512 processes, 8 GB), in one place, and describe them indocs/USAGE.md. - If a limit can't be applied, the command still runs (these limits are not a security boundary) and the app log records that.
Acceptance checks
- Real backend tests: a fork loop stops at the process limit and a memory hog is killed, while an ordinary build or test command still passes.
Follow-up to #76.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2
- Forks
- 2
- Merge medio
- 8 h 28 min
- PR fusionados (30 d)
- 26
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
-
enhancement priority: low severity: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
PierrunoYT/patch#305 ·
Los mantenedores suelen responder en 1 día
-
security: isAppPageUrl checks devRendererUrl with startsWith instead of comparing parsed URL originsAbiertopriority: low security severity: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
PierrunoYT/patch#300 ·
Los mantenedores suelen responder en 1 día
-
Claude Code chats: tool calls made inside Claude Code subagents leave cards that end as "(stopped)"Abiertobug priority: low severity: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
PierrunoYT/patch#289 ·
Los mantenedores suelen responder en 1 día
-
bug priority: medium severity: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
PierrunoYT/patch#285 ·
Los mantenedores suelen responder en 1 día
-
priority: medium security severity: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
PierrunoYT/patch#283 ·
Los mantenedores suelen responder en 1 día
Todos los issues de PierrunoYT/patch
Issues similares
-
Edit: Travel Mix (RO)Abiertocheck:failed streams:edit
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
iptv-org/iptv#55901 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 2 días
-
package:ios ships XCFrameworks with absolute symlinks, which SwiftPM refuses to extractPosiblemente ocupada @cusnirvladislav la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
callstackincubator/rock#740 ·
-
S: triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 2 días
-
RED ladder stopped @ 4db4ed91Abiertoarea:workflow bug ready-for-human
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
fil-donadoni/tolaria#6108 ·
Los mantenedores suelen responder en 1 día