René's URL Explorer Experiment


Title: Harden unsafe Git option validation by Byron · Pull Request #2180 · gitpython-developers/GitPython · GitHub

Open Graph Title: Harden unsafe Git option validation by Byron · Pull Request #2180 · gitpython-developers/GitPython

X Title: Harden unsafe Git option validation by Byron · Pull Request #2180 · 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 GPT-5. Created by Codex on behalf of Byron. Byron will review before this is ready to merge. Summary Harden GitPython's unsafe-option validation against three high-severity advisories affecting GitPython <= 3.1.53: GHSA-r9mr-m37c-5fr3: prevent split single-character keyword values from smuggling unsafe option tokens. GHSA-6p8h-3wgx-97gf: reject caller-controlled clone templates by default because they can install executable hooks. GHSA-fjr4-x663-mwxc: reject diff output options before revision parsing or Git invocation to prevent arbitrary file overwrite. No CVEs or patched release versions are assigned yet. Changes Validate option-like values emitted when single-character kwargs are split. Add --template to the unsafe clone-option denylist. Add allow_unsafe_options=False to commit/tree/index diff paths and consistently guard --output/-o. Preserve explicit opt-in behavior with allow_unsafe_options=True. Add regression coverage for each bypass and affected call path. Validation Focused Python 3.12 security tests: 3 passed. Ruff lint and formatting: passed. Mypy: passed. Full pre-commit suite: passed. Full Python 3.12 suite: 667 passed, 75 skipped, 35 unrelated fixture/environment failures caused by uninitialized nested test submodules and local Git defaults. Git behavior was checked against baseline a23bace9.

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/2180

X: @github

direct link

Domain: Github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:a5187391-90aa-0a43-2664-8f6d71d022eb
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9084:EEFB6:4FB5A9:7070F4:6A630DF6
html-safe-noncea7bc447feaf4f5073f8b2d15736661e5d580d1909d084e94e237212956a9e6e2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDg0OkVFRkI2OjRGQjVBOTo3MDcwRjQ6NkE2MzBERjYiLCJ2aXNpdG9yX2lkIjoiNjE4NTkxNTg1NjMxOTYxNDQ1NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac2728dca66ed77a1e7da5af7b834d5ff13f3cbe0d6bd1f7844747d4b3f924269d
hovercard-subject-tagpull_request:4104720003
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/2180/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
None1a6c056e02f174fffc096c521ec0ff6fb83e40a2ec8cb8875466ec1524872dd6
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
release6a93e25585f487ddff9e3996c06d5b869d6e1828
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://Github.com/gitpython-developers/GitPython/pull/2180/files#start-of-content
https://Github.com/
Sign in https://Github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fpull%2F2180%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://Github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fpull%2F2180%2Ffiles
Sign up https://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/2180/files
Reloadhttps://Github.com/gitpython-developers/GitPython/pull/2180/files
Reloadhttps://Github.com/gitpython-developers/GitPython/pull/2180/files
Please reload this pagehttps://Github.com/gitpython-developers/GitPython/pull/2180/files
gitpython-developers https://Github.com/gitpython-developers
GitPythonhttps://Github.com/gitpython-developers/GitPython
Please reload this pagehttps://Github.com/gitpython-developers/GitPython/pull/2180/files
Notifications https://Github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Fork 983 https://Github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Star 5.2k https://Github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Code https://Github.com/gitpython-developers/GitPython
Issues 15 https://Github.com/gitpython-developers/GitPython/issues
Pull requests 3 https://Github.com/gitpython-developers/GitPython/pulls
Discussions https://Github.com/gitpython-developers/GitPython/discussions
Actions https://Github.com/gitpython-developers/GitPython/actions
Security and quality 17 https://Github.com/gitpython-developers/GitPython/security
Insights https://Github.com/gitpython-developers/GitPython/pulse
Code https://Github.com/gitpython-developers/GitPython
Issues https://Github.com/gitpython-developers/GitPython/issues
Pull requests https://Github.com/gitpython-developers/GitPython/pulls
Discussions https://Github.com/gitpython-developers/GitPython/discussions
Actions https://Github.com/gitpython-developers/GitPython/actions
Security and quality https://Github.com/gitpython-developers/GitPython/security
Insights https://Github.com/gitpython-developers/GitPython/pulse
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
single-char-kwarghttps://Github.com/gitpython-developers/GitPython/tree/single-char-kwarg
Conversation 2 https://Github.com/gitpython-developers/GitPython/pull/2180
Commits 3 https://Github.com/gitpython-developers/GitPython/pull/2180/commits
Checks 30 https://Github.com/gitpython-developers/GitPython/pull/2180/checks
Files changed https://Github.com/gitpython-developers/GitPython/pull/2180/files
Please reload this pagehttps://Github.com/gitpython-developers/GitPython/pull/2180/files
Harden unsafe Git option validation https://Github.com/gitpython-developers/GitPython/pull/2180/files#top
Show all changes 3 commits https://Github.com/gitpython-developers/GitPython/pull/2180/files
e8d0fbf fix: validate split short-option values codex Jul 22, 2026 https://Github.com/gitpython-developers/GitPython/pull/2180/commits/e8d0fbf774d1f6baa3b481adfe48bd262e43b453
ffcb535 fix: reject unsafe clone templates codex Jul 22, 2026 https://Github.com/gitpython-developers/GitPython/pull/2180/commits/ffcb5359e87619f4fe4a70a4aff5f08c5580ba97
1d51b89 fix: guard diff output options codex Jul 22, 2026 https://Github.com/gitpython-developers/GitPython/pull/2180/commits/1d51b891d7f236044a6aa17498ec682b63dad6e6
Clear filters https://Github.com/gitpython-developers/GitPython/pull/2180/files
Please reload this pagehttps://Github.com/gitpython-developers/GitPython/pull/2180/files
Please reload this pagehttps://Github.com/gitpython-developers/GitPython/pull/2180/files
cmd.py https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-35a18a749eb4d6efad45e56e78a9554926be5526e2ba2159b44311e718450e88
diff.py https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-300633890a1b325dfed86bb5120d89465f0687f4f6b8d5701c44c02f0eee723a
base.py https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-56d167dc0ca4d51682e56b5e602c096f3f264fd1ebb61cc03bbb6c409c866eeb
base.py https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-3cc1aaf2f1e2bc1341d3f71ceec44b2762b981280b4d162e26327bd558721fe1
test_clone.py https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-55c336bc9212ba346c26cda95a6fb0702302ec3969e205ba85ac76db08447194
test_diff.py https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-a4c794e0849bb401148549f5efcaa756477ae6f7c2976d2ebf7cb56ff7850139
test_git.py https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-84c4b72d5c62026240fad69041a453efc37f7336a89035b69672cce0e8beaca1
git/cmd.pyhttps://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-35a18a749eb4d6efad45e56e78a9554926be5526e2ba2159b44311e718450e88
View file https://Github.com/gitpython-developers/GitPython/blob/1d51b891d7f236044a6aa17498ec682b63dad6e6/git/cmd.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://Github.com/gitpython-developers/GitPython/pull/2180/{{ revealButtonHref }}
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-35a18a749eb4d6efad45e56e78a9554926be5526e2ba2159b44311e718450e88
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-35a18a749eb4d6efad45e56e78a9554926be5526e2ba2159b44311e718450e88
git/diff.pyhttps://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-300633890a1b325dfed86bb5120d89465f0687f4f6b8d5701c44c02f0eee723a
View file https://Github.com/gitpython-developers/GitPython/blob/1d51b891d7f236044a6aa17498ec682b63dad6e6/git/diff.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://Github.com/gitpython-developers/GitPython/pull/2180/{{ revealButtonHref }}
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-300633890a1b325dfed86bb5120d89465f0687f4f6b8d5701c44c02f0eee723a
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-300633890a1b325dfed86bb5120d89465f0687f4f6b8d5701c44c02f0eee723a
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-300633890a1b325dfed86bb5120d89465f0687f4f6b8d5701c44c02f0eee723a
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-300633890a1b325dfed86bb5120d89465f0687f4f6b8d5701c44c02f0eee723a
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-300633890a1b325dfed86bb5120d89465f0687f4f6b8d5701c44c02f0eee723a
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-300633890a1b325dfed86bb5120d89465f0687f4f6b8d5701c44c02f0eee723a
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-300633890a1b325dfed86bb5120d89465f0687f4f6b8d5701c44c02f0eee723a
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-300633890a1b325dfed86bb5120d89465f0687f4f6b8d5701c44c02f0eee723a
git/index/base.pyhttps://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-56d167dc0ca4d51682e56b5e602c096f3f264fd1ebb61cc03bbb6c409c866eeb
View file https://Github.com/gitpython-developers/GitPython/blob/1d51b891d7f236044a6aa17498ec682b63dad6e6/git/index/base.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://Github.com/gitpython-developers/GitPython/pull/2180/{{ revealButtonHref }}
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-56d167dc0ca4d51682e56b5e602c096f3f264fd1ebb61cc03bbb6c409c866eeb
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-56d167dc0ca4d51682e56b5e602c096f3f264fd1ebb61cc03bbb6c409c866eeb
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-56d167dc0ca4d51682e56b5e602c096f3f264fd1ebb61cc03bbb6c409c866eeb
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-56d167dc0ca4d51682e56b5e602c096f3f264fd1ebb61cc03bbb6c409c866eeb
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-56d167dc0ca4d51682e56b5e602c096f3f264fd1ebb61cc03bbb6c409c866eeb
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-56d167dc0ca4d51682e56b5e602c096f3f264fd1ebb61cc03bbb6c409c866eeb
git/repo/base.pyhttps://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-3cc1aaf2f1e2bc1341d3f71ceec44b2762b981280b4d162e26327bd558721fe1
View file https://Github.com/gitpython-developers/GitPython/blob/1d51b891d7f236044a6aa17498ec682b63dad6e6/git/repo/base.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://Github.com/gitpython-developers/GitPython/pull/2180/{{ revealButtonHref }}
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-3cc1aaf2f1e2bc1341d3f71ceec44b2762b981280b4d162e26327bd558721fe1
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-3cc1aaf2f1e2bc1341d3f71ceec44b2762b981280b4d162e26327bd558721fe1
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-3cc1aaf2f1e2bc1341d3f71ceec44b2762b981280b4d162e26327bd558721fe1
test/test_clone.pyhttps://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-55c336bc9212ba346c26cda95a6fb0702302ec3969e205ba85ac76db08447194
View file https://Github.com/gitpython-developers/GitPython/blob/1d51b891d7f236044a6aa17498ec682b63dad6e6/test/test_clone.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://Github.com/gitpython-developers/GitPython/pull/2180/{{ revealButtonHref }}
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-55c336bc9212ba346c26cda95a6fb0702302ec3969e205ba85ac76db08447194
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-55c336bc9212ba346c26cda95a6fb0702302ec3969e205ba85ac76db08447194
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-55c336bc9212ba346c26cda95a6fb0702302ec3969e205ba85ac76db08447194
test/test_diff.pyhttps://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-a4c794e0849bb401148549f5efcaa756477ae6f7c2976d2ebf7cb56ff7850139
View file https://Github.com/gitpython-developers/GitPython/blob/1d51b891d7f236044a6aa17498ec682b63dad6e6/test/test_diff.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://Github.com/gitpython-developers/GitPython/pull/2180/{{ revealButtonHref }}
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-a4c794e0849bb401148549f5efcaa756477ae6f7c2976d2ebf7cb56ff7850139
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-a4c794e0849bb401148549f5efcaa756477ae6f7c2976d2ebf7cb56ff7850139
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-a4c794e0849bb401148549f5efcaa756477ae6f7c2976d2ebf7cb56ff7850139
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-a4c794e0849bb401148549f5efcaa756477ae6f7c2976d2ebf7cb56ff7850139
test/test_git.pyhttps://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-84c4b72d5c62026240fad69041a453efc37f7336a89035b69672cce0e8beaca1
View file https://Github.com/gitpython-developers/GitPython/blob/1d51b891d7f236044a6aa17498ec682b63dad6e6/test/test_git.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://Github.com/gitpython-developers/GitPython/pull/2180/{{ revealButtonHref }}
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-84c4b72d5c62026240fad69041a453efc37f7336a89035b69672cce0e8beaca1
https://Github.com/gitpython-developers/GitPython/pull/2180/files#diff-84c4b72d5c62026240fad69041a453efc37f7336a89035b69672cce0e8beaca1
Please reload this pagehttps://Github.com/gitpython-developers/GitPython/pull/2180/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.