[Aikido] Fix security issue in gitpython via minor version upgrade from 3.1.57 to 3.1.58 - #19
Draft
aikido-autofix[bot] wants to merge 1 commit into
Draft
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Upgrade GitPython to fix five HIGH-severity vulnerabilities: config-option injection enabling RCE via
core.sshCommand, unsafe-option guard bypass via single-char kwargs, path-traversal submodule directory creation, arbitrary file overwrite viaread-tree, and hook-planting via unguardedRepo.init().✅ 6 CVEs resolved by this upgrade
This PR will resolve the following CVEs:
=,#,;,[,], whitespace), allowing attackers to inject arbitrary git-config directives by embedding these characters in option names. This enables remote code execution viacore.sshCommandorcore.hooksPathwhen an application forwards attacker-controlled option names to the config writer.split_single_char_options=False, causing the security check to miss the smuggled option whiletransform_kwargemits a joined token that git parses as--upload-pack=<cmd>. This incomplete fix of a prior vulnerability affects all guarded methods at the defaultallow_unsafe_options=Falsesetting.IndexFile.from_tree,reset, andmerge_treefail to sanitize caller-controlled treeish arguments passed togit read-tree, allowing injection of--index-outputto overwrite arbitrary files with git-index blobs. This enables arbitrary file destruction/corruption at process privileges.Repo.init()passes unsanitized kwargs togit init, allowing an attacker to inject--templateparameter that plants malicious git hooks for arbitrary code execution on the next git operation.IndexFile.remove()andHead.checkout()methods that forward unsanitized kwargs to git commands, allowing attackers to read arbitrary files via--pathspec-from-fileand--pathspec-file-nuloptions with file contents returned in error messages.🤖 Remediation details
Fix gitpython security vulnerabilities by bumping minimum version to 3.1.58
This PR remediates six security advisories (ranging HIGH to MEDIUM severity) in the gitpython package. The fix is applied in the root
pyproject.toml(declared direct dependency) and reflected inuv.lock(resolved lockfile).gitpython
gitpythonis declared as a direct dependency in the rootpyproject.toml. The lower bound of the>=range spec was raised from>=3.1.55to>=3.1.58, which is the minimum patched release addressing all six advisories. Runninguv lock --upgrade-package gitpythonresolved the lockfile from the previously pinned3.1.57to3.1.58. No parent bumps, overrides, or constraint entries were required because the package is a direct dependency and the patched version was immediately reachable under the existing resolver constraints.Version changes
>=3.1.55(resolved3.1.57)>=3.1.58(resolved3.1.58)