Sandbox: a sandboxed command can replace a submodule's .git, which host Git recurses into
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
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- git, typescript
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 2
- Fork
- 2
- Merge medio
- 5h 28m
- PR unite (30g)
- 24
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
-
Claude Code chats: tool calls made inside Claude Code subagents leave cards that end as "(stopped)"Apertabug priority: low severity: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
PierrunoYT/patch#289 ·
I maintainer di solito rispondono entro 1 giorno
-
bug priority: medium severity: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
PierrunoYT/patch#285 ·
I maintainer di solito rispondono entro 1 giorno
-
priority: medium security severity: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
PierrunoYT/patch#283 ·
I maintainer di solito rispondono entro 1 giorno
-
priority: low security severity: low
Difficoltà 4/5 1-2 giorni Idoneità per principianti 38/100
PierrunoYT/patch#293 ·
I maintainer di solito rispondono entro 1 giorno
-
priority: low security severity: low
Difficoltà 3/5 1-2 giorni Idoneità per principianti 67/100
PierrunoYT/patch#292 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di PierrunoYT/patch
Issue simili
-
bug help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
agent-task risk:low
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
guyellis/http-status-check#512 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
microsoft/playwright#43327 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
microsoft/TypeScript#64758 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
opensearch-project/OpenSearch-Dashboards#12937 ·
I maintainer di solito rispondono entro 2 giorni