GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Require explicit opt-in for filesystem diffs by Byron · Pull Request #2217 · gitpython-developers/GitPython

Conversation

@Byron

@Byron Byron commented Aug 17, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

Advisory

GHSA-whh4-5q6c-9v3x

GHSA-whh4-5q6c-9v3x reports a repository-boundary bypass in the high-level diff API. This change requires callers to explicitly opt in before diff paths may use filesystem-wide semantics. Reproduction mechanics are intentionally omitted while the advisory is unpublished.

Advisory summary

  • Severity: medium
  • Package: GitPython (pip)
  • Affected range: = 3.1.59
  • Patched versions: none published
  • CVE: none assigned

Changes

  • Classify --no-index as an unsafe diff option.
  • Cover keyword and raw-option spellings through commit and index APIs.
  • Clarify the existing explicit opt-in documentation.

Validation

  • Focused diff security tests: 2 passed.
  • Complete test/test_diff.py: 25 passed, 1 unrelated local-environment failure in staged conflict reporting.
  • Ruff check and format checks passed.
  • git diff --check passed.
  • Git baseline: Git 2.50.1 documents filesystem operand behavior in Documentation/git-diff.adoc and implements it in builtin/diff.c.
  • Post-commit Codex review was attempted once for 14200584 but the CLI usage allowance was exhausted before review began.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Copilot AI lite review requested due to automatic review settings August 17, 2026 04:15
Copilot started reviewing on behalf of Byron August 17, 2026 04:17
View session
Copilot AI reviewed Aug 17, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens GitPython’s high-level diff APIs against repository-boundary bypass by requiring explicit caller opt-in before enabling filesystem-wide diff semantics (--no-index).

Changes:

  • Mark --no-index as an unsafe diff option (requires allow_unsafe_options=True).
  • Add regression tests ensuring both keyword (no_index=True) and raw-option ("--no-index") spellings are rejected by default.
  • Update Diffable.diff documentation to include --no-index in the unsafe-options description.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
test/test_diff.py Adds tests that --no-index/no_index are blocked unless explicitly allowed.
git/repo/base.py Adds --no-index to the repo’s unsafe diff option allowlist/denylist used by high-level diff APIs.
git/diff.py Updates the allow_unsafe_options docstring to document --no-index as unsafe.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread git/repo/base.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Copilot AI review requested due to automatic review settings August 17, 2026 04:34
Copilot started reviewing on behalf of Byron August 17, 2026 04:34
View session
Copilot AI reviewed Aug 17, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Byron
Byron force-pushed the fix-advisory branch from df56a12 to 60f9e66 Compare August 17, 2026 04:45
@Byron @codex
fix: require opt-in for no-index diffs
09f2cf3
<!-- agent -->
Treat --no-index as an unsafe diff option because it changes path operands
from repository pathspecs to arbitrary filesystem paths. This addresses
GHSA-whh4-5q6c-9v3x without exposing advisory reproduction details.

Assisted-by: GPT 5.6
Co-authored-by: GPT 5.6 <[email protected]>
Copilot AI review requested due to automatic review settings August 17, 2026 04:47
@Byron
Byron force-pushed the fix-advisory branch from 60f9e66 to 09f2cf3 Compare August 17, 2026 04:47
Copilot started reviewing on behalf of Byron August 17, 2026 04:48
View session
Copilot AI reviewed Aug 17, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Byron
Byron merged commit d160fb4 into main Aug 17, 2026
54 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@Byron
Byron deleted the fix-advisory branch October 5, 2026 03:24
@p-linnane p-linnane mentioned this pull request Oct 31, 2026
Should GHSA-whh4-5q6c-9v3x cover releases before 3.1.59? #2330
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@Byron
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.