René's URL Explorer Experiment


Title: fix(submodule): validate destinations before mutation by Byron · Pull Request #2264 · gitpython-developers/GitPython · GitHub

Open Graph Title: fix(submodule): validate destinations before mutation by Byron · Pull Request #2264 · gitpython-developers/GitPython

X Title: fix(submodule): validate destinations before mutation by Byron · Pull Request #2264 · gitpython-developers/GitPython

Description: 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. Created by Codex on behalf of Byron. Byron will review before this is ready to merge. Submodule destinations could fail index validation after cloning had already changed the filesystem. Validate checkout paths before mutation across creation, initialization, direct cloning, and moves, and validate metadata destinations before creation, reuse, and renaming. Reuse the existing portable path validator for .git aliases, including NTFS alternate streams and short names, HFS ignored characters, invalid components, and NULs. Apply Git for Windows' filename restrictions before path normalization or directory creation, preserving evidence that Windows would otherwise strip. Compare checkout components with the parent's Git and common directories by filesystem identity, protecting separately named metadata directories and their filesystem aliases. Reject metadata nested inside another submodule's Git directory. Repeat the check after cloning and disable a clone that became nested, following Git's behavior. Preserve supported metadata symlinks and safe relocation of a submodule's own metadata. Advisory summary GHSA-83vg-56qc-22m7: high severity; pip package Gitpython; affected range <= 3.2.0. No patched version or CVE is currently assigned. The advisory is a draft; this description omits its exploit details. Git reference Inspected Git at d38352cd43ab9745686d697872408bc3249a153f, including read-cache.c::verify_path_internal, NTFS/HFS path recognition, compat/mingw.c::is_valid_win32_path, and submodule.c::validate_submodule_git_dir. Git's t7450-bad-git-dotfiles.sh covers nested metadata; t7406-submodule-update.sh covers checkout symlinks. Regression tests also compare metadata aliases with native Git index validation using both filesystem protections. Validation Regression tests first reproduced writes before rejection and acceptance of nested metadata. Coverage includes all 16 HFS ignored characters, NTFS aliases, Windows reserved names and invalid characters, separate Git directories, relative and absolute destinations, reuse after deinitialization, moves and renames, and metadata nesting introduced during cloning. The fixtures use harmless file content. Final CI on 69d4702d: 50/50 checks passed across Linux, macOS, Windows (including free-threaded Python builds), Alpine, Cygwin, dependencies, and lint. Initial fix, pytest test/test_submodule.py test/test_submodule_no_fetch.py: 445 passed, 3 skipped, 1 expected failure on macOS/Python 3.14, with a temporary Git configuration using the suite's expected master default branch. The Windows CI follow-up adds two regressions that simulate native path normalization on every platform; both failed before the fix. Focused Windows destination, relative-path, and move tests then passed: 24 passed, 2 skipped. Windows-platform Mypy, Ruff lint and formatting, and whitespace checks also passed. Repository-wide Ruff lint and formatting passed. Mypy passed for both the native and win32 platforms (46 source files); basedpyright passed without errors or warnings. The required Codex commit review was attempted once for faf32c2b, but the CLI rejected its configured gpt-6.1-sol model with this ChatGPT account before reviewing code. Automated commit review is therefore unavailable for this commit. The follow-up commit 69d4702d passed its single Codex review using the supported gpt-5.5 model, with no findings.

Open Graph Description: 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 C...

X Description: 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 C...

Opengraph URL: https://github.com/gitpython-developers/GitPython/pull/2264

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:d6e55dab-8508-a926-e7a6-e7410b63c4c3
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9C1A:33F146:2EB66E:3DD8BC:6B00C2E7
html-safe-nonce24d925a33c645694a8db05820e4c703ec89a7c5db456b77788ec7164904ab55e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QzFBOjMzRjE0NjoyRUI2NkU6M0REOEJDOjZCMDBDMkU3IiwidmlzaXRvcl9pZCI6IjgyNDM5NDIxNTE2NjczNjg2NzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac42e157a4790ce03fd7e7ba3877d7ff2ed13c642869e28cedf0851fadcafb17c6
hovercard-subject-tagpull_request:4707117362
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/gitpython-developers/GitPython/pull/2264/files
twitter:imagehttps://avatars.githubusercontent.com/u/63622?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/63622?s=400&v=4
og:image:altTasks 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 C...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None93edd3bebc4afb7ce711ee74cb5d2a95927850b082a4d43e212222389cb1c415
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git
octolytics-dimension-user_id503709
octolytics-dimension-user_logingitpython-developers
octolytics-dimension-repository_id1126087
octolytics-dimension-repository_nwogitpython-developers/GitPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1126087
octolytics-dimension-repository_network_root_nwogitpython-developers/GitPython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release1fee81a280ea86312b69448e261b418189bfd5b5
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/gitpython-developers/GitPython/pull/2264/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fpull%2F2264%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fpull%2F2264%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=gitpython-developers%2FGitPython
Reloadhttps://github.com/gitpython-developers/GitPython/pull/2264/files
Reloadhttps://github.com/gitpython-developers/GitPython/pull/2264/files
Reloadhttps://github.com/gitpython-developers/GitPython/pull/2264/files
gitpython-developershttps://github.com/gitpython-developers
GitPythonhttps://github.com/gitpython-developers/GitPython
Codehttps://github.com/gitpython-developers/GitPython
Issues1 (1)https://github.com/gitpython-developers/GitPython/issues
Pull requestshttps://github.com/gitpython-developers/GitPython/pulls
Discussionshttps://github.com/gitpython-developers/GitPython/discussions
Actionshttps://github.com/gitpython-developers/GitPython/actions
Security and quality42 (42)https://github.com/gitpython-developers/GitPython/security
Insightshttps://github.com/gitpython-developers/GitPython/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fgitpython-developers%2FGitPython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgitpython-developers%2FGitPython%2Fissues%2Fnew%2Fchoose
Byronhttps://github.com/Byron
mainhttps://github.com/gitpython-developers/GitPython/tree/main
submodule-destination-fixhttps://github.com/gitpython-developers/GitPython/tree/submodule-destination-fix
Conversation 20 https://github.com/gitpython-developers/GitPython/pull/2264
Commits 1 https://github.com/gitpython-developers/GitPython/pull/2264/commits
Checks 50 https://github.com/gitpython-developers/GitPython/pull/2264/checks
Files changed 3 https://github.com/gitpython-developers/GitPython/pull/2264/files
fix(submodule): validate destinations before mutation https://github.com/gitpython-developers/GitPython/pull/2264/files#top
Show all changes 1 commit https://github.com/gitpython-developers/GitPython/pull/2264/files
97eadb8 fix(submodule): validate destinations before mutation Byron Oct 1, 2026 https://github.com/gitpython-developers/GitPython/pull/2264/commits/97eadb888d2f99567e3113f4e455be4ca128f697
Clear filters https://github.com/gitpython-developers/GitPython/pull/2264/files
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/2264/files
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/2264/files
changes.rst https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-18450dccedaf66680c6bfbfa443564198c3d480f939edb0e87f7d8078d0c2673
base.py https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
test_submodule.py https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-78179a32c1d54a6b78b018ee57328d6ea9424fbfbdbb36caf15e290331621024
doc/source/changes.rsthttps://github.com/gitpython-developers/GitPython/pull/2264/files#diff-18450dccedaf66680c6bfbfa443564198c3d480f939edb0e87f7d8078d0c2673
View file https://github.com/gitpython-developers/GitPython/blob/97eadb888d2f99567e3113f4e455be4ca128f697/doc/source/changes.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/gitpython-developers/GitPython/pull/2264/{{ revealButtonHref }}
https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-18450dccedaf66680c6bfbfa443564198c3d480f939edb0e87f7d8078d0c2673
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/2264/files
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/2264/files
https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-18450dccedaf66680c6bfbfa443564198c3d480f939edb0e87f7d8078d0c2673
git/objects/submodule/base.pyhttps://github.com/gitpython-developers/GitPython/pull/2264/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
View file https://github.com/gitpython-developers/GitPython/blob/97eadb888d2f99567e3113f4e455be4ca128f697/git/objects/submodule/base.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/gitpython-developers/GitPython/pull/2264/{{ revealButtonHref }}
https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/2264/files
https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/2264/files
https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
https://github.com/gitpython-developers/GitPython/pull/2264/files#diff-44dc32942e129beb7f738ff7d487bfbddb0a7802a91d43c9b8b8952a4d0806bc
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/2264/files
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/2264/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.