Sandbox: a sandboxed command can replace a submodule's .git, which host Git recurses into
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- git, typescript
Línea de trabajo
Start with src/main/tools/sandbox_git.ts and trace how validateSandboxGit protects the top-level Git metadata; inspect #262 for how protected top-level names handle renames. The issue lists several possible approaches, so first compare them against submodule gitlinks and sandbox command handling. Done means host Git cannot run planted submodule filters after a sandboxed command, with the chosen behavior covered by tests.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Follow-up to #273. Patch's own Git calls (Git panel, chat Git context) no longer look inside submodules: status and diffs run with --ignore-submodules=dirty, and checkout/restore with submodule.recurse=false.
What remains is the sandbox side: a submodule's .git is a working-tree entry (a gitfile, or an in-tree folder), so a sandboxed command can replace it with planted metadata, for example a folder whose config defines filter.x.clean plus a .gitattributes in the submodule. validateSandboxGit (src/main/tools/sandbox_git.ts) protects only the top-level .git, HEAD and the Git directories. The next git status the user runs in their own terminal or editor recurses into the submodule and runs that filter outside the sandbox.
Protecting <submodule>/.git by path is not enough on its own: the submodule folder itself stays writable, so a command can rename it away and create a new one with planted metadata. Options:
- Protect each submodule
.gitnamed by the index's gitlinks and also refuse (or undo) a rename of the submodule folder, as #262 does for protected top-level names. - After each sandboxed command, compare every submodule's
.gitwith a snapshot and report or restore a changed one. - Document that host Git in a project with submodules can run code a sandboxed command left behind, as USAGE.md already says for hooks and filters of existing integrations.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2
- Forks
- 2
- Métricas de merge de PR
- Sin PR fusionados en 30 d
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.
Issues similares
-
Add API: BlockVectra Data APIAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 74/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
remotion-dev/remotion#12905 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
supermomonga/paseo-plugin-zcode-provider#83 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
oxidecomputer/skepsis#102 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
voidzero-dev/void#677 ·
Los mantenedores suelen responder en 1 día