GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||
GeezerVison is showing github.com — Block file-reading Git options by Byron · Pull Request #2208 · gitpython-developers/GitPython Conversation
|
| File | Description |
|---|---|
| test/test_repo.py | Adds regression coverage for newly blocked blame option spellings (including clustered short options). |
| test/test_refs.py | Adds regression coverage for unsafe tag message file options via positional args and legacy ref alias. |
| test/test_diff.py | Adds regression coverage for diff -O (orderfile) blocking and clustered forms; ensures -S remains allowed. |
| git/repo/base.py | Introduces per-command unsafe option lists for blame and diff; wires them into blame checks. |
| git/refs/tag.py | Expands tag unsafe-option checking to include positional inputs and ref-alias-sourced reference. |
| git/index/base.py | Switches index diff unsafe option list to the new diff-specific unsafe set and cluster parsing. |
| git/diff.py | Switches diff unsafe option list to the new diff-specific unsafe set and cluster parsing; updates docs. |
| git/cmd.py | Adds configurable clusterable-short-option support to Git.check_unsafe_options. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
git/refs/tag.py:139
ref kwarg is used as an alias for the reference argument, but it is left in kwargs. Since repo.git.tag(*args, **kwargs) transforms kwargs into CLI options, this will pass an unsupported --ref=... option to git tag and can break callers using ref=. Pop it from kwargs when consuming it as an alias. if "ref" in kwargs and kwargs["ref"]:
reference = kwargs["ref"]
test/test_diff.py:394
-O/clustered forms but not the equivalent long form --orderfile (or the orderfile= kwarg), which should be blocked for the same reason. Add regression coverage so bypasses via long-option spelling are caught. calls = (
lambda target: commit.diff(output=target),
lambda target: commit.diff(other=f"--output={target}"),
lambda target: commit.diff(O=target),
lambda target: commit.diff(other=f"-pO{target}"),
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
<!-- agent --> Reject file-reading options passed to blame, diff, and tag APIs. Inspect positional values after resolving aliases, recognize unsafe options behind command-specific short-flag clusters, and retain the explicit allow_unsafe_options escape hatch. This closes GHSA-5xxx-qhh7-9287 and GHSA-3wxw-xv34-2frg and covers the adjacent diff order-file sink. Regression tests cover long, short, and clustered options, incremental blame, tag path/reference positionals, the ref keyword alias, both diff entry points, and preservation of diff pickaxe behavior. Git baseline: cf5497b14c; git-blame, git-diff, and git-tag document the relevant file-input options. Assisted-by: GPT 5.6 Co-authored-by: GPT 5.6 <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.