Reject submodule move destinations through intermediate symlinks by Byron · Pull Request #2232 · gitpython-developers/GitPython
Tasks This section is for Byron only. Models continuing this PR must not add, remove, check, uncheck, rename, or reorder checkboxes here. refackiew Everything below this line was generated by Codex GPT-6. Created by Codex on behalf of Byron. Byron will review before this is ready to merge. Submodule moves now validate intermediate destination components before changing the checkout, index, or configuration. The check shares the existing checkout-path validation and preserves ordinary moves, no-op moves, and final-component symlink behavior. Advisory summary GHSA-gq48-pqfc-9p58: medium severity; GitPython (pip), reported affected version = 3.1.62. No patched version or CVE is currently assigned. Reproducer details are omitted from this description. Validation Regression reproduced before the fix; all 30 new parameterized cases pass. Complete submodule suite: 75 passed, 3 skipped, 1 expected failure, with commit signing disabled only for the test process. Ruff lint/format, mypy (45 source files), and git diff --check pass. Codex reviewed commits 5a1b6f38 and d7efa37d once each after creation and found no actionable regressions. Git reference: 1630431f326e15fcde608827b5ff38422528eb59, builtin/mv.c and t/t7001-mv.sh, which reject intermediate symlinks without changing the index. This check addresses existing symlinks; concurrent directory replacement remains outside its scope. Windows CI exposed open clone handles in the normal-move test fixture. Follow-up d7efa37d closes the fixture module repository before yielding it, using the existing Windows cleanup in Repo.close(). All 30 focused cases pass locally after this test-only adjustment.
Skip to content