| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
GHSA-59cr-6r3x-644w identifies that submodule update paths could reach filesystem operations without the containment check already used by add and move. Add a regression that proves update rejects a parent-directory checkout path before cloning, and override Submodule.abspath to apply the shared _to_relative_path guard for every filesystem consumer. Git baseline: git.git read-cache.c verify_path_internal() rejects invalid index paths, covered for parent traversal by t/t9300-fast-import.sh. Assisted-by: GPT 5.6 Co-authored-by: GPT 5.6 <codex@openai.com>
There was a problem hiding this comment.
This PR hardens submodule checkout path handling to mitigate GHSA-59cr-6r3x-644w by ensuring submodule paths are confined to the parent repository before filesystem operations, including rejecting paths that traverse through symlink components.
Changes:
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| git/objects/submodule/base.py | Adds symlink-component rejection during submodule absolute path resolution. |
| test/test_submodule.py | Adds tests asserting update(init=True) rejects unsafe checkout paths. |
| doc/source/changes.rst | Adds a 3.1.62 changelog entry referencing the security advisory. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
| os.mkdir(osp.join(parent.working_tree_dir, "target")) | ||
| os.symlink("target", osp.join(parent.working_tree_dir, "link")) |
| Back | FazBrowse Home | New Git URL |
Tasks
This section is for Byron only. Models continuing this PR must not add, remove, check, uncheck, rename, or reorder checkboxes here.
Everything below this line was generated by Codex GPT-5.
Created by Codex on behalf of Byron. Byron will review before this is ready to merge.
Summary
Confine submodule checkout paths to the parent repository before filesystem operations. The shared absolute-path accessor now rejects parent traversal, paths resolving through symlinks outside the worktree, and paths resolving to the worktree root.
Advisory
GHSA-59cr-6r3x-644w
Advisory summary
Validation
Git behavior reference: commit e8d0608944, submodule.c::validate_submodule_path(), and t/t7423-submodule-symlinks.sh reject every existing symlink component before submodule update. read-cache.c::verify_path_internal() rejects parent-traversing index paths.
Commits