| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
<!-- agent --> Commit.count forwards keyword arguments to git rev-list but did not apply the unsafe-option validation used by the sibling revision APIs. Validate forwarded options with the existing Git.check_unsafe_options helper and retain the explicit allow_unsafe_options escape hatch. This covers GHSA-p538-c434-8v24 without adding another option parser. Git baseline: git.git a23bace963 defines --output as a shared diff option consumed by setup_revisions; t/t6000-rev-list-misc.sh exercises that option with rev-list. Co-authored-by: GPT 5.6 <codex@openai.com>
There was a problem hiding this comment.
This PR closes a security gap by ensuring Commit.count() rejects unsafe git rev-list options (notably --output/-o) unless explicitly allowed, aligning it with existing unsafe-option protections used elsewhere in GitPython’s revision/diff surfaces.
Changes:
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| git/objects/commit.py | Adds unsafe-option validation to Commit.count() with an allow_unsafe_options bypass flag. |
| test/test_commit.py | Adds a regression test ensuring Commit.count() rejects unsafe output options. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
| 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
Advisory summary
The advisory is unpublished, so this public PR intentionally omits unnecessary exploitation detail.
Git reference
Git baseline a23bace963: diff.c defines --output as a shared diff option consumed by setup_revisions; t/t6000-rev-list-misc.sh covers the option with rev-list.
Validation