Skip to content

chore(deps): Bump security constraints to clear dependabot alerts - #116

Closed
mfranczel wants to merge 2 commits into
mainfrom
mf/package-upgrade-06-08-2026
Closed

chore(deps): Bump security constraints to clear dependabot alerts#116
mfranczel wants to merge 2 commits into
mainfrom
mf/package-upgrade-06-08-2026

Conversation

@mfranczel

@mfranczel mfranczel commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Closes 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.

Summary by CodeRabbit

  • Security
    • Updated security-related dependency requirements to use newer minimum versions.
    • Added safeguards for additional dependency vulnerabilities.
    • Expanded security issue documentation for improved tracking.

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).
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The change updates security-related dependency constraints in pyproject.toml. It raises minimum versions for cryptography, pyopenssl, pillow, mistune, GitPython, and soupsieve. It adds explicit constraints for pyasn1 and click, plus related security annotations.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: tkislan, m1so

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the dependency security constraint updates that address Dependabot alerts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Updates Docs ✅ Passed The PR only changes dependency constraints and poetry.lock; it does not implement a feature that requires documentation or roadmap updates.

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown

📦 Python package built successfully!

  • Version: 2.4.0.dev3+8662ed7
  • Wheel: deepnote_toolkit-2.4.0.dev3+8662ed7-py3-none-any.whl
  • Install:
    pip install "deepnote-toolkit @ https://deepnote-staging-runtime-artifactory.s3.amazonaws.com/deepnote-toolkit-packages/2.4.0.dev3%2B8662ed7/deepnote_toolkit-2.4.0.dev3%2B8662ed7-py3-none-any.whl"

@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.42%. Comparing base (6198101) to head (8d405c9).
✅ All tests successful. No failed tests found.

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           
Flag Coverage Δ
combined 74.42% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@deepnote-bot

deepnote-bot commented Aug 10, 2026

Copy link
Copy Markdown

🚀 Review App Deployment Started

📝 Description 🌐 Link / Info
🌍 Review application ra-116
🔑 Sign-in URL Click to sign-in
📊 Application logs View logs
🔄 Actions Click to redeploy
🚀 ArgoCD deployment View deployment
Last deployed 2026-08-11 07:56:00 (UTC)
📜 Deployed commit 56dbee3cabd6b9bb2a27ca5280aef6c93286a824
🛠️ Toolkit version 8662ed7

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).

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6198101 and 8d405c9.

⛔ Files ignored due to path filters (1)
  • poetry.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • pyproject.toml

Comment thread 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",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 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 --lock

Repository: 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'
fi

Repository: 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:


🏁 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 --stat

Repository: 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))' \
  || true

Repository: 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.

Suggested change
"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

Comment thread pyproject.toml
"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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 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 --lock

Repository: 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
fi

Repository: 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

@mfranczel mfranczel closed this Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants