chore(deps): Bump security constraints to clear dependabot alerts - #116
chore(deps): Bump security constraints to clear dependabot alerts#116mfranczel wants to merge 2 commits into
Conversation
Closes 42 open dependabot alerts across seven packages: - cryptography 48.0.1 -> 50.0.0 (CVE-2026-69247, PKCS#7 Bleichenbacher oracle) - pyopenssl 26.0.0 -> 26.4.0 (lifts the cryptography<49 cap; required for the above) - pillow 12.2.0 -> 12.3.0 (13 alerts: OOB writes, decompression bomb bypasses) - mistune 3.2.1 -> 3.3.4 (10 alerts: quadratic-time parsing DoS, XSS) - GitPython 3.1.50 -> 3.1.58 (12 alerts: unsafe git option forwarding) - soupsieve >=2.8.4 (new transitive pin: ReDoS, memory exhaustion) - pyasn1 >=0.6.4 (new transitive pin: decoder DoS) The remaining pyarrow alert is not actionable here: on Python 3.10/3.11 databricks-sqlalchemy 1.x caps pyarrow<17 for SQLAlchemy 1.x compatibility, so 23.0.1 is unreachable until the SQLAlchemy 2 migration. Python 3.12+ already resolves to a patched version. Unit suite passes on Python 3.11 (972 passed) and 3.13 (968 passed, 4 skipped).
📝 WalkthroughWalkthroughThe change updates security-related dependency constraints in Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
Comment |
|
📦 Python package built successfully!
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #116 +/- ##
=======================================
Coverage 74.42% 74.42%
=======================================
Files 95 95
Lines 5704 5704
Branches 850 850
=======================================
Hits 4245 4245
Misses 1182 1182
Partials 277 277
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
|
🚀 Review App Deployment Started
|
click 8.1.7 -> 8.4.2 (fixed in 8.3.3), resolving a command injection vulnerability in click.edit(). Reported by pip-audit but not by dependabot: the advisory exists in PYSEC/OSV with no corresponding GHSA, so it never reaches the GitHub advisory database that dependabot reads. click is a transitive dependency only (streamlit >=7.0,<9 and black >=8.0.0); both already permitted 8.3.3+, so nothing else needed to change. No toolkit code imports click, so click.edit() was never reachable from this package. Unit suite passes on Python 3.11 (972 passed) and 3.13 (968 passed, 4 skipped).
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pyproject.toml`:
- Line 146: Update the GitPython dependency constraint in the project dependency
list from a minimum of 3.1.57 to 3.1.58 while retaining the existing upper bound
of <4 and associated security reference.
- Line 137: Update the requests dependency constraint in pyproject.toml from a
2.32.4 minimum to >=2.33.0 while retaining the <3 upper bound. Regenerate
poetry.lock so it records the updated constraint and resolved version, then
validate the lockfile with Poetry.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: de1c666c-c848-436c-8078-1b8029c472c7
⛔ Files ignored due to path filters (1)
poetry.lockis excluded by!**/*.lock
📒 Files selected for processing (1)
pyproject.toml
| "cryptography>=48.0.1,<49", | ||
| "cryptography>=50.0.0,<51", # https://github.com/deepnote/deepnote-toolkit/security/dependabot/112 https://github.com/deepnote/deepnote-toolkit/security/dependabot/113 | ||
| "protobuf>=5.29.6,<6", | ||
| "requests>=2.32.4,<3", |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n '"requests>=2\.33\.0,<3"' pyproject.toml
rg -n -A2 '^name = "requests"$' poetry.lock
poetry check --lockRepository: deepnote/deepnote-toolkit
Length of output: 163
🏁 Script executed:
#!/bin/bash
set -u
printf '%s\n' '--- dependency declarations ---'
rg -n -A2 -B2 'requests|GitPython' pyproject.toml poetry.lock | head -80
printf '%s\n' '--- lock validation tools ---'
if command -v poetry >/dev/null 2>&1; then
poetry check --lock
else
printf '%s\n' 'poetry: unavailable'
fiRepository: deepnote/deepnote-toolkit
Length of output: 5144
🌐 Web query:
GHSA-gc5v-m9x4-r6x2 CVE-2026-25645 Requests 2.33.0 affected versions
💡 Result:
CVE-2026-25645, identified by advisory GHSA-gc5v-m9x4-r6x2, is a vulnerability in the Python Requests library where the extract_zipped_paths utility function uses a predictable filename when extracting files from zip archives into the system temporary directory [1][2]. Affected versions include all versions of the Requests library prior to 2.33.0 [1][3]. Key details regarding this vulnerability: - Impact: If a target file already exists in the temporary directory, it is reused without validation. A local attacker with write access to that directory could pre-create a malicious file, which would then be loaded in place of the legitimate file [1][2]. - Scope: Standard usage of the Requests library is not affected; only applications that directly call the extract_zipped_paths utility function are impacted [4][3]. - Remediation: Users should upgrade to Requests version 2.33.0 or later, where the library has been updated to extract files to a non-deterministic location [1][2]. - Workaround: If an immediate upgrade is not possible, developers can mitigate the risk by setting the TMPDIR environment variable to a directory with restricted write access [4][2].
Citations:
- 1: GHSA-gc5v-m9x4-r6x2
- 2: GHSA-gc5v-m9x4-r6x2
- 3: https://nvd.nist.gov/vuln/detail/cve-2026-25645
- 4: https://osv.dev/vulnerability/GHSA-gc5v-m9x4-r6x2
🏁 Script executed:
#!/bin/bash
set -u
printf '%s\n' '--- pyproject requests entry ---'
rg -n -C3 'requests' pyproject.toml || true
printf '%s\n' '--- poetry.lock requests package ---'
python3 - <<'PY'
from pathlib import Path
p = Path("poetry.lock")
text = p.read_text()
needle = 'name = "requests"'
start = text.find(needle)
if start < 0:
print("requests lock entry: not found")
else:
end = text.find("\n[[package]]", start + 1)
print(text[start:end if end >= 0 else None])
PY
printf '%s\n' '--- repository status summary ---'
git diff --statRepository: deepnote/deepnote-toolkit
Length of output: 1378
🌐 Web query:
site:github.com/advisories/GHSA-gc5v-m9x4-r6x2
💡 Result:
GHSA-gc5v-m9x4-r6x2
- Package:
requests(PyPI) - Issue: Insecure temporary-file reuse in
extract_zipped_paths() - Severity: Moderate, CVSS 4.4
- Affected versions:
< 2.33.0 - Patched version:
2.33.0 - CVE: CVE-2026-25645
- Impact: A local attacker could pre-create a predictable temporary filename and cause a malicious file to be loaded.
- Scope: Only applications directly calling
requests.utils.extract_zipped_paths()are affected; normal Requests usage is not. - Fix: Upgrade to
requests>=2.33.0. (github.com)
Citations:
🏁 Script executed:
#!/bin/bash
set -u
python3 - <<'PY'
from pathlib import Path
for filename in ("pyproject.toml", "poetry.lock"):
text = Path(filename).read_text()
print(f"--- {filename} ---")
for i, line in enumerate(text.splitlines(), 1):
if "requests" in line.lower():
print(f"{i}: {line}")
PY
printf '%s\n' '--- GitHub advisory API ---'
curl -fsSL --max-time 10 \
https://api.github.com/advisories/GHSA-gc5v-m9x4-r6x2 \
| python3 -c 'import json,sys; d=json.load(sys.stdin); print(json.dumps({k:d.get(k) for k in ("ghsa_id","cve_id","summary","severity","vulnerabilities","patched_versions")}, indent=2))' \
|| trueRepository: deepnote/deepnote-toolkit
Length of output: 5053
Raise the Requests minimum to 2.33.0. Requests versions below 2.33.0 are affected by CVE-2026-25645. The lock resolves 2.33.0, but the manifest permits vulnerable versions.
Proposed constraint update
- "requests>=2.32.4,<3",
+ "requests>=2.33.0,<3",Regenerate and validate poetry.lock.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "requests>=2.32.4,<3", | |
| "requests>=2.33.0,<3", |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pyproject.toml` at line 137, Update the requests dependency constraint in
pyproject.toml from a 2.32.4 minimum to >=2.33.0 while retaining the <3 upper
bound. Regenerate poetry.lock so it records the updated constraint and resolved
version, then validate the lockfile with Poetry.
Source: MCP tools
| "mistune>=3.3.4,<4", # https://github.com/deepnote/deepnote-toolkit/security/dependabot/74 through /83 | ||
| "nbconvert>=7.17.1,<8", # https://github.com/deepnote/deepnote-toolkit/security/dependabot/37 https://github.com/deepnote/deepnote-toolkit/security/dependabot/38 | ||
| "GitPython>=3.1.50,<4", # https://github.com/deepnote/deepnote-toolkit/security/dependabot/40 through /53 | ||
| "GitPython>=3.1.57,<4", # https://github.com/deepnote/deepnote-toolkit/security/dependabot/40 through /53, /99 through /111 |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n '"GitPython>=3\.1\.58,<4"' pyproject.toml
rg -n -A2 '^name = "gitpython"$' poetry.lock
poetry check --lockRepository: deepnote/deepnote-toolkit
Length of output: 163
🏁 Script executed:
#!/bin/bash
set -u
printf '%s\n' '--- pyproject.toml ---'
sed -n '130,152p' pyproject.toml
printf '%s\n' '--- poetry.lock GitPython entries ---'
rg -n -A12 -B3 '^name = "gitpython"$|^name = "GitPython"$|gitpython' poetry.lock
printf '%s\n' '--- tool availability ---'
command -v poetry || true
command -v gh || true
printf '%s\n' '--- advisory lookup ---'
if command -v gh >/dev/null 2>&1; then
gh api repos/gitpython-developers/GitPython/security-advisories/GHSA-9rj7-rf2p-w77r \
--jq '{ghsa: .ghsa_id, summary: .summary, published: .published_at, withdrawn: .withdrawn_at, vulnerable: .vulnerabilities, patched: .patched_versions}' || true
else
curl -L --fail --silent --show-error \
-H 'Accept: application/vnd.github+json' \
'https://api.github.com/repos/gitpython-developers/GitPython/security-advisories/GHSA-9rj7-rf2p-w77r' \
| jq '{ghsa: .ghsa_id, summary: .summary, published: .published_at, withdrawn: .withdrawn_at, vulnerable: .vulnerabilities, patched: .patched_versions}' || true
fiRepository: deepnote/deepnote-toolkit
Length of output: 5259
Raise the GitPython minimum to 3.1.58.
GitPython>=3.1.57,<4 permits versions affected by GHSA-9rj7-rf2p-w77r. The lock resolves 3.1.58, but the manifest must enforce that minimum.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pyproject.toml` at line 146, Update the GitPython dependency constraint in
the project dependency list from a minimum of 3.1.57 to 3.1.58 while retaining
the existing upper bound of <4 and associated security reference.
Source: MCP tools
Closes open dependabot alerts across seven packages:
The remaining pyarrow alert is not actionable here: on Python 3.10/3.11 databricks-sqlalchemy 1.x caps pyarrow<17 for SQLAlchemy 1.x compatibility, so 23.0.1 is unreachable until the SQLAlchemy 2 migration. Python 3.12+ already resolves to a patched version.
Summary by CodeRabbit