Skip to content

fix(deps): resolve pip-audit failures for tornado and pyasn1 - #146

Merged
tkislan merged 3 commits into
mainfrom
tk/fix-pip-audit-2026-10-29
Nov 5, 2026
Merged

tkislan merged 3 commits into
mainfrom
tk/fix-pip-audit-2026-10-29

Conversation

@tkislan

@tkislan tkislan commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Audit - Production and Audit - Server failed twice:

  • tornado: on PR run 40929536773 on tk/servable-stored-dataframes (2026-10-29). Three tornado advisories were published on 2026-10-28. All three are fixed only in tornado 6.6, which requires Python 3.11, so the tornado security floor is split by Python version, as pillow and dnspython already are.
  • pyasn1: on this PR's run 41994947741 (2026-11-05), after the tornado fix. Four pyasn1 advisories were published on 2026-10-30, all fixed in pyasn1 0.6.5. 0.6.5 supports every Python the toolkit does, so the existing floor is just raised.

No ignore-vulns entries are added.

Audit: the audit job in .github/workflows/ci.yml:476 runs on Python 3.11. It runs poetry export (--without dev, --extras server, --only dev), then pip-audit with --require-hashes --disable-pip, ignoring only PYSEC-2024-161 and PYSEC-2026-113. With this branch, all three exports are clean.

Package Group Before After Advisories Remediation
tornado (transitive via jupyter-server, ipykernel, jupyter-client, terminado) main 6.5.10 6.6 on ≥ 3.11, 6.5.10 on 3.10 CVE-2026-115927, CVE-2026-116577, CVE-2026-116578 floor of the existing constraint in the transitive security block, split by Python version like pillow
pyasn1 (transitive via google-auth → rsa, pyasn1-modules) main 0.6.4 0.6.5 CVE-2026-119194, CVE-2026-119195, CVE-2026-119196, CVE-2026-119197 (all high) floor of the existing constraint in the transitive security block, raised in place
     "requests>=2.32.4,<3",
-    "tornado>=6.5.9,<7",  # 6.5.9 fixes GHSA-3hv7-mjh2-fv65, GHSA-c2m8-h5v5-343r, GHSA-chx6-46f5-w4vp
+    "tornado>=6.6,<7; python_version >= '3.11'",  # 6.6 fixes CVE-2026-115927, CVE-2026-116577, CVE-2026-116578
+    "tornado>=6.5.9,<7; python_version < '3.11'",  # tornado 6.6 requires Python 3.11
     "filelock>=4.2.1,<5; python_version >= '3.11'",  # ...
@@
     "click>=8.3.3,<9",
-    "pyasn1>=0.6.4,<0.7",
+    "pyasn1>=0.6.5,<0.7",  # 0.6.5 fixes CVE-2026-119194, CVE-2026-119195, CVE-2026-119196, CVE-2026-119197 (transitive via google-auth)
     "soupsieve>=2.8.4,<3",

Precedent

tornado

  • What the advisories cover:
    • CVE-2026-116577: header obs-fold parsing takes quadratic time.
    • CVE-2026-115927: chunked request bodies block the event loop.
    • CVE-2026-116578: RedirectHandler open redirect.
    • The GitHub advisories list < 6.6 as vulnerable and 6.6 as the first patched release. There is no 6.5.x backport; 6.5.10 is the last 6.5 release.
  • Why the floor is split by Python version:
  • Consumers: every tornado dependent in the lock accepts 6.6:
    • ipykernel 6.31.0, jupyter-client 8.6.3, jupyter-server 2.21.0 and terminado 0.18.1 all require >=6.1/>=6.2.
    • streamlit 1.56.0 caps tornado <7, but it only installs on 3.10, which stays on 6.5.10.
    • streamlit 1.66.1 (3.11+) no longer depends on tornado.
  • Compatibility: the toolkit's own tornado use is web.authenticated and web.HTTPError on a jupyter-server APIHandler in deepnote_core/widget_assets.py. None of the 6.6 changes touch it:
    • obs-fold rejection
    • data_received chunk merging
    • RedirectHandler/StaticFileHandler hardening
    • WebSocket check_origin changes
    • new deprecations
    • cross_origin_protection, which is opt-in in 6.6
  • jupyter-server: its only 6.6-related issue was the HTTPServerRequest(start_line=...) deprecation, fixed in test code only (jupyter_server#1717).
  • Upper bound: the cap stays <7, like every other line in the block. The 6.6 notes say cross_origin_protection is expected to become the default in 6.7. That is worth checking when 6.7 ships, given the Jupyter server runs with disable_check_xsrf = True.

pyasn1

  • What the advisories cover: four quadratic-time denial-of-service bugs in the BER/CER/DER decoder, all rated high and all fixed in 0.6.5:
  • Why 0.6.5: it is the first and only patched release (2026-10-27) and isn't yanked. It requires Python >= 3.8, so no Python-version split is needed.
  • Consumers: pyasn1 comes in only through google-auth 2.34.0, and both of its dependents in the lock accept 0.6.5:
    • rsa 4.9 requires >=0.1.3.
    • pyasn1-modules 0.4.0 requires >=0.4.6,<0.7.0.
  • Mechanism: both parents' ranges already admit 0.6.5, so a lockfile-only update would also clear the audit. The repository already has a pyasn1>=0.6.4,<0.7 floor from chore(deps): Address pip-audit vulnerability findings #118, so that floor is raised instead. A lock-only update would leave the floor below the vulnerable version. The <0.7 cap stays; it also keeps out the encoder change queued for 0.7.0.
  • Compatibility:
    • The toolkit doesn't import pyasn1 or rsa. Its only google-auth use is google.oauth2.credentials.Credentials with a bearer token, which parses no ASN.1.
    • 0.6.5 changes only the BER decoder. The one change in decoded values is for nested constructed OCTET STRINGs. DER rejects those, and DER is what rsa and pyasn1-modules decode.

Lock file

Checks

  • poetry check --lock passes.
  • pip-audit 2.10.1, with CI's flags (--require-hashes --disable-pip, ignoring only PYSEC-2024-161 and PYSEC-2026-113), on the Production, Server and Dev exports:
    • Before the pyasn1 commit, on Python 3.11: the four pyasn1 CVEs in Production and Server, the same as CI. Dev was clean.
    • Python 3.11, 3.12, 3.13 and 3.14: clean.
    • Python 3.10: the expected exposures remain, with no pyasn1 (see Not in this PR).
  • Lockless resolve: uv pip compile pyproject.toml --extra server, as in Wheel Install Check:
    • tornado 6.5.10 on 3.10 and 6.6 on 3.11+ (checked on 3.10–3.14 for the tornado change).
    • pyasn1 0.6.5 on 3.10 and 3.14.
  • Unit tests on Python 3.13, in the Poetry venv synced to this lock (tornado 6.6, pyasn1 0.6.5): 1462 passed, 4 skipped. None of the warnings come from tornado or pyasn1.
    • For the tornado change, the 232 server/widget/jupyter/streamlit tests also pass with -W error::DeprecationWarning:tornado.
  • pyasn1 smoke test on 0.6.5: rsa PKCS#1 key save/load and sign/verify, and google-auth's pure-Python RSASigner/RSAVerifier loading a PKCS#8 key.
  • Review pass, tornado 6.6 with the locked Jupyter versions:
    • On Python 3.11, tests/unit/test_widget_assets.py: 38 passed.
    • On Python 3.11 and 3.13, a smoke test that starts jupyter-server, creates a kernel and runs code over the kernel websocket passes.
  • 3.12 and 3.14 weren't run locally; this PR's CI matrix covers them.

Not in this PR

🤖 Generated with Claude Code

https://claude.ai/code/session_01HwkxN8YriHhdXBwMc4sd8h

Summary by CodeRabbit

  • Chores
    • Updated the Tornado version requirements based on the Python version in use.

tornado 6.5.10 carries CVE-2026-115927, CVE-2026-116577 and
CVE-2026-116578, fixed only in 6.6, which requires Python 3.11. The
security floor is split by Python version, as for pillow and dnspython:
6.6 on 3.11+, the old 6.5.9 floor on 3.10, which stays exposed.

Only the tornado blocks and content-hash were spliced into the lock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HwkxN8YriHhdXBwMc4sd8h
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Tornado requirement now varies by Python version. Python 3.11 and later require Tornado 6.6 or newer. Earlier versions require Tornado 6.5.9 or newer. Both constraints exclude version 7. The minimum pyasn1 version increases from 0.6.4 to 0.6.5; its upper bound remains below 0.7.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: mfranczel

Merge Risk: Minimal · up to 078c6

The dependency update is mergeable based on the supplied evidence. Python 3.10 retains its existing Tornado advisory exposure and should remain an explicit support consideration.

Pre-merge checks: Passed 4 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Updates Docs Inconclusive The PR changes only pyproject.toml and poetry.lock; it adds no documentation file. This check requires verification in the external deepnote/deepnote OSS documentation and the private landing-pa… Please verify or update the relevant documentation in deepnote/deepnote and the roadmap in deepnote/deepnote-internal, then rerun this check.
Passed Passed checks: 4 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.
Title check Passed The title clearly identifies dependency updates for Tornado and pyasn1 to resolve pip-audit findings. It is concise and directly related to the changes.
Full details: Updates Docs

Explanation

The PR changes only pyproject.toml and poetry.lock; it adds no documentation file. This check requires verification in the external deepnote/deepnote OSS documentation and the private landing-page roadmap, but those repositories are unavailable in this review.

Resolution

Please verify or update the relevant documentation in deepnote/deepnote and the roadmap in deepnote/deepnote-internal, then rerun this check.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 7fb52fe9-7d9c-4721-a097-f0163e852704
Commits

Reviewing files that changed from the base of the PR and between a43bb6d and 078c6b7.

Files ignored due to path filters: 1

  • poetry.lock is excluded by !**/*.lock
Files selected for processing: 1

  • pyproject.toml
Files skipped from review as they are similar to previous changes: 1

  • pyproject.toml

Included review availability: This review used your included allowance. 3 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

📦 Python package built successfully!

  • Version: 2.9.0.dev9+97a6190
  • Wheel: deepnote_toolkit-2.9.0.dev9+97a6190-py3-none-any.whl
  • Install:
    pip install "deepnote-toolkit @ https://deepnote-staging-runtime-artifactory.s3.amazonaws.com/deepnote-toolkit-packages/2.9.0.dev9%2B97a6190/deepnote_toolkit-2.9.0.dev9%2B97a6190-py3-none-any.whl"

coderabbitai[bot]
coderabbitai Bot previously approved these changes Oct 29, 2026
@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.43%. Comparing base (0f5f8d8) to head (078c6b7).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #146   +/-   ##
=======================================
  Coverage   78.43%   78.43%           
=======================================
  Files         121      121           
  Lines        6920     6920           
  Branches     1005     1005           
=======================================
  Hits         5428     5428           
  Misses       1182     1182           
  Partials      310      310           
Flag Coverage Δ
combined 78.43% <ø> (ø)

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.

@tkislan
tkislan marked this pull request as ready for review October 29, 2026 19:09
@tkislan
tkislan requested a review from a team as a code owner October 29, 2026 19:09
@tkislan
tkislan requested a review from m1so October 29, 2026 19:09
@deepnote-bot

deepnote-bot commented Oct 29, 2026 •

Copy link
Copy Markdown

🚀 Review App Deployment Started

📝 Description 🌐 Link / Info
🌍 Review application ra-146
🔑 Sign-in URL Click to sign-in
📊 Application logs View logs
🔄 Actions Click to redeploy
🚀 ArgoCD deployment View deployment
⏰ Last deployed 2026-11-05 08:57:54 (UTC)
📜 Deployed commit 1b745540a3cbed3347e47da5d1b4c1ca98b0ca00
🛠️ Toolkit version 97a6190

pyasn1 0.6.4 carries CVE-2026-119194, CVE-2026-119195, CVE-2026-119196
and CVE-2026-119197, all fixed in 0.6.5, which still supports every
Python the toolkit does. The existing floor in the transitive security
block is raised in place.

Only the pyasn1 block and content-hash were spliced into the lock.
@tkislan tkislan changed the title fix(deps): resolve pip-audit failure for tornado fix(deps): resolve pip-audit failures for tornado and pyasn1 Nov 5, 2026
@tkislan
tkislan merged commit 3122452 into main Nov 5, 2026
44 checks passed
@tkislan
tkislan deleted the tk/fix-pip-audit-2026-10-29 branch November 5, 2026 11:29
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.

3 participants