[Aikido] Fix 13 security issues in gitpython, urllib3, requests and 1 more#21
Closed
aikido-autofix[bot] wants to merge 1 commit into
Closed
[Aikido] Fix 13 security issues in gitpython, urllib3, requests and 1 more#21aikido-autofix[bot] wants to merge 1 commit into
aikido-autofix[bot] wants to merge 1 commit into
Conversation
Author
|
Closed by Aikido: a new AutoFix has been created → #22 |
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, urllib3, requests, and Pygments to fix critical RCE vulnerabilities via Git hook injection and command execution bypasses. This update includes breaking changes that require manual migration.
gitpython (3.1.43 => 3.1.50)
1. Blocked unsafe underscored git kwargs (GHSA-rpm5-65cw-6hj4)
Where your code is affected:
cruft/_commands/check.pylines 21-26Impact: The code passes
no_checkout=Trueas a kwarg toRepo.clone_from(). This underscored parameter is now blocked by GitPython's security fix as it gets converted to the--no-checkoutgit option, which is subject to the new security validation.Remediation: Replace
no_checkout=Truewith the non-underscored equivalent parameter or use a different approach that doesn't rely on underscored git kwargs.2. Out-of-repo access prevention when manipulating references
Where your code is affected:
cruft/_commands/utils/generate.pyline 41Impact: The code accesses
repo.remotes.origin.refs["HEAD"]which may be affected by the new security restrictions on reference manipulation to prevent out-of-repo access.Remediation: Verify that the reference access pattern is within the allowed security boundaries or use alternative methods to get the HEAD reference that comply with the new restrictions.
urllib3, requests, pygments
No breaking changes from these packages affect this codebase:
This project requires Python >= 3.12 (per
pyproject.toml), so dropping support for Python 3.8 and 3.9 has no impactNo direct usage of
urllib3.HTTPResponse.getheaders(),getheader(), orContentDecoderfound in the codebaseNo direct usage of
urllib3found in the codebaseAll breaking changes by upgrading gitpython from version 3.1.43 to 3.1.50 (CHANGELOG)
shlex, and unsafe underscored git kwargs are blockedAll breaking changes by upgrading urllib3 from version 2.2.3 to 2.7.0 (CHANGELOG)
HTTPResponse.getheaders()method in favor ofHTTPResponse.headers. Removed theHTTPResponse.getheader(name, default)method in favor ofHTTPResponse.headers.get(name, default).urllib3.response.ContentDecoder.All breaking changes by upgrading pygments from version 2.18.0 to 2.20.0 (CHANGELOG)
✅ 13 CVEs resolved by this upgrade, including 1 critical 🚨 CVE
This PR will resolve the following CVEs:
extract_zipped_paths()utility function uses predictable filenames when extracting zip archives to the temp directory, allowing local attackers to pre-create malicious files that get loaded instead of legitimate ones, resulting in arbitrary code execution.