Skip to content

Bump vulnerable dependencies to minimum patched versions (uv.lock only) - #290

Merged
Rick Brighenti (rbrighenti) merged 3 commits into
mainfrom
users/rbrighenti-microsoft/python-minimal-vuln-fixes
Oct 30, 2026
Merged

Rick Brighenti (rbrighenti) merged 3 commits into
mainfrom
users/rbrighenti-microsoft/python-minimal-vuln-fixes

Conversation

@rbrighenti

@rbrighenti Rick Brighenti (rbrighenti) commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Clears 92 of 93 open Dependabot alerts with a lockfile-only change (uv.lock; no pyproject.toml edits). Each vulnerable package moves to its smallest patched version using uv lock --upgrade-package <pkg>==<min patched>. Transitive packages move only when a patched version requires it, and then to the lowest compatible version.

To keep the diff reviewable, entries for unchanged packages keep their original text. Newer uv versions add size/upload-time metadata to every entry, and that churn has been reverted. CI's uv 0.6.17 uv lock accepts the file unchanged.

Supersedes #265 (setuptools).

Direct fixes (vulnerable package → minimum patched)

Package From → To Dependabot alerts fixed
virtualenv (tox) 21.2.0 → 21.14.13 150 151 152 153 170 171 172 173 174 175 176 179 182 183 184 185 186 187 188 (19)
filelock (tox/virtualenv) 3.25.2 → 4.2.1 (major) 181 189 190
uv (tox-uv) 0.11.6 → 0.13.4 74 163 (critical)
aiohttp 3.13.4 → 3.14.4 75 76 88 89 90 91 92 93 94 95 96 117 118 119 160 161 162 165 166 167 168 169 (22)
multidict 6.7.1 → 6.9.1 154
authlib (google-adk) 1.6.9 → 1.9.1 61 71 78 193 (critical) 195 196 197 198 199 200 201 (11)
mako (google-adk/alembic) 1.4.1 → 1.4.2 155
urllib3 2.6.3 → 2.8.0 69 70 145 146 147
cryptography 46.0.7 → 50.0.0 (major) 97 120 134 135
certifi 2026.1.4 → 2026.10.19 191 (critical)
idna 3.11 → 3.15 73
h2 / hpack 4.3.0 → 4.4.1 / 4.1.0 → 4.2.0 123 / 133
pyjwt 2.14.0 → 2.15.0 148 156
python-dotenv 1.2.1 → 1.2.2 63
pydantic-settings 2.12.0 → 2.14.2 104
python-multipart 0.0.30 → 0.0.31 86
oauthlib 3.3.1 → 4.0.0 (major) 136 137 192
dnspython 2.8.0 → 2.9.0 194
werkzeug 3.1.6 → 3.1.9 157
mcp 1.28.1 → 1.30.0 158 202 203 204
claude-agent-sdk 0.1.48 → 0.2.121 159 (critical)
mem0ai 1.0.11 → 2.0.0 (major) 67
black 26.3.1 → 26.10.1 177
setuptools 82.0.1 → 84.1.0 112 180
langchain-openai 1.1.12 → 1.1.14 62

Required transitive changes (called out for review)

  • agent-framework / agent-framework-core 1.0.1 → 1.11.0 (same major). tooling-extensions-agentframework depends on the agent-framework meta package, which pulls agent-framework-claude and agent-framework-mem0.
    • The old versions cap the vulnerable packages: claude-agent-sdk<0.1.49 and mem0ai<2.
    • The first releases that lift those caps are agent-framework-claude 1.0.0b260609 (needs core >=1.8.1) and agent-framework-mem0 1.0.0b260709 (needs core >=1.11.0). Those are the versions used here, so 1.11.0 is the minimum core.
    • Core 1.11's [all] extra adds agent-framework-hyperlight and the hyperlight-sandbox* packages, and restricts powerfx/pythonnet/clr-loader to Python <3.14 (marker-only change).
    • All other agent-framework-* sub-packages are unchanged.
  • pyopenssl 26.0.0 → 26.4.0: the only release that allows cryptography 50.
  • msal 1.34.0 → 1.37.0: the first release that allows cryptography 50.
  • joserfc 1.7.7 (new): required by authlib >=1.9.
  • yarl 1.22.0 → 1.25.1: required by aiohttp 3.14.4.
  • packaging 26.0 → 26.3, distlib 0.4.0 → 0.4.3, python-discovery 1.2.1 → 1.6.1: minimums required by virtualenv 21.14.9+.
  • virtualenv 21.14.13 / certifi 2026.10.19 (instead of 21.14.9 / 2026.10.18): the dependency-review check flagged GHSA-cx6f-vjhg-g3cc (virtualenv >=21.14.9,<21.14.13, high) and PYSEC-2026-4320 (certifi).
  • tox config (pyproject.toml [tool.tox.env_run_base]): added set_env = { PYTHONPATH = "{tox_root}/versioning/helper" }. The uv 0.11 → 0.13 bump makes uv sync --locked in tox rebuild the workspace editables, and tox strips PYTHONPATH, so the custom build_backend couldn't be imported.

Intentionally unchanged: wrapt stays <2 (2.x breaks the langchain tracer instrumentor), ruff stays 0.15.x, and microsoft-agents-*, openai-agents and a2a-sdk are untouched.

Platform impact (accepted trade-offs)

Both of these come directly from the minimum patched versions. They only affect this repo's locked dev/CI environment (uv.lock). Published packages declare floors only, so downstream consumers already resolve the latest versions independently of this lock.

  • Hyperlight (x86_64 Linux with glibc < 2.34). agent-framework-core 1.11.0 is the minimum core required by the patched agent-framework-mem0/agent-framework-claude (see above). Its [all] extra pulls in agent-framework-hyperlight → hyperlight-sandbox-backend-wasm 0.4.0. That package ships only manylinux_2_34_x86_64 and win_amd64 wheels and no sdist. As a result, uv sync fails on x86_64 Linux hosts with glibc 2.28–2.33 (RHEL/Rocky/Alma 8, Debian 11 / *-bullseye images, Ubuntu 20.04) under Python <3.14. CI (ubuntu-latest), Windows x64, macOS and current Linux distros are unaffected.
  • cryptography 50.0.0 (Intel macOS, 32-bit Windows). 50.0.0 is the minimum patched version (alert Bump aiohttp from 3.13.2 to 3.13.3 #120). Upstream publishes no universal2/x86_64-macOS or win32 wheels for it. Contributors on those platforms build from the sdist, which needs a Rust toolchain and OpenSSL headers.

Remaining alert (blocked)

  • 178 opentelemetry-api (medium): the fix needs >=1.45.1. google-adk caps OpenTelemetry: the latest 1.x (1.39.1) at <=1.41.1, and even the latest 2.x (2.13.0) at <=1.44. This can't be cleared until google-adk relaxes its cap.

Validation

  • uv sync --locked --all-extras --dev on 3.11 and 3.12 ✅
  • uv 0.6.17 (CI's version) uv lock leaves the file byte-identical ✅
  • tox -e verify-constraints,lint,format ✅ (no external PYTHONPATH needed)
  • Unit tests (pytest tests/ -m "not integration"): 859 passed, 3 skipped, 0 failed on both 3.11 and 3.12 (via tox -e py311,py312) ✅
  • Re-ran all 93 open alert ranges against the new uv.lock: 92 cleared, 1 remaining (178).

Lockfile-only update that clears 92 of 93 open Dependabot alerts by moving
each vulnerable package to its smallest patched version. Transitive bumps
are limited to what the patched versions require.

opentelemetry-api (#178) remains: the fix needs >=1.45.1 but google-adk
caps opentelemetry at <=1.41.1 (1.x) / <=1.44 (2.x).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@rbrighenti
Rick Brighenti (rbrighenti) requested a review from a team as a code owner October 29, 2026 16:43
Copilot AI balanced review requested due to automatic review settings October 29, 2026 16:43

Copilot AI 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.

Copilot wasn't able to review any files in this pull request. Check if the Files changed in this pull request are included in default exclusions.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 1 package(s) with unknown licenses.
See the Details below.

License Issues

uv.lock

PackageVersionLicenseIssue Type
agent-framework-hyperlight1.0.0b260721NullUnknown License
Denied Licenses: GPL-3.0-only, AGPL-3.0-only

OpenSSF Scorecard

Scorecard details
PackageVersionScoreDetails
pip/mem0ai 2.0.0 UnknownUnknown
pip/agent-framework 1.11.0 UnknownUnknown
pip/agent-framework-claude 1.0.0b260609 UnknownUnknown
pip/agent-framework-core 1.11.0 UnknownUnknown
pip/agent-framework-hyperlight 1.0.0b260721 UnknownUnknown
pip/agent-framework-mem0 1.0.0b260709 UnknownUnknown
pip/aiohttp 3.14.4 UnknownUnknown
pip/authlib 1.9.1 UnknownUnknown
pip/black 26.10.1 UnknownUnknown
pip/certifi 2026.10.19 🟢 6.5
Details
CheckScoreReason
Code-Review🟢 6Found 4/6 approved changesets -- score normalized to 6
Security-Policy🟢 10security policy file detected
Binary-Artifacts🟢 10no binaries found in the repo
Maintained🟢 88 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 8
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Pinned-Dependencies🟢 5dependency not pinned by hash detected -- score normalized to 5
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 9license file detected
Fuzzing⚠️ 0project is not fuzzed
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
Packaging🟢 10packaging workflow detected
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0
pip/claude-agent-sdk 0.2.121 UnknownUnknown
pip/cryptography 50.0.0 UnknownUnknown
pip/distlib 0.4.3 UnknownUnknown
pip/dnspython 2.9.0 UnknownUnknown
pip/filelock 4.2.1 UnknownUnknown
pip/h2 4.4.1 UnknownUnknown
pip/hpack 4.2.0 UnknownUnknown
pip/hyperlight-sandbox 0.4.0 UnknownUnknown
pip/hyperlight-sandbox-backend-wasm 0.4.0 UnknownUnknown
pip/hyperlight-sandbox-python-guest 0.5.0 UnknownUnknown
pip/idna 3.15 UnknownUnknown
pip/joserfc 1.7.7 UnknownUnknown
pip/langchain-openai 1.1.14 UnknownUnknown
pip/mako 1.4.2 UnknownUnknown
pip/mcp 1.30.0 UnknownUnknown
pip/msal 1.37.0 🟢 7.4
Details
CheckScoreReason
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Maintained🟢 1015 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 10
Token-Permissions🟢 9detected GitHub workflow tokens with excessive permissions
Code-Review🟢 10all changesets reviewed
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies🟢 4dependency not pinned by hash detected -- score normalized to 4
CII-Best-Practices⚠️ 2badge detected: InProgress
Fuzzing🟢 10project is fuzzed
License🟢 9license file detected
Signed-Releases⚠️ -1no releases found
Security-Policy⚠️ 0security policy file not detected
SAST🟢 9SAST tool is not run on all commits -- score normalized to 9
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
pip/multidict 6.9.1 🟢 6.6
Details
CheckScoreReason
Code-Review⚠️ 0Found 0/22 approved changesets -- score normalized to 0
Maintained🟢 1030 commit(s) and 26 issue activity found in the last 90 days -- score normalized to 10
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Fuzzing🟢 10project is fuzzed
Security-Policy🟢 10security policy file detected
Packaging🟢 10packaging workflow detected
SAST🟢 10SAST tool is run on all commits
Branch-Protection🟢 3branch protection is not maximal on development and all release branches
Signed-Releases🟢 85 out of the last 5 releases have a total of 5 signed artifacts.
pip/oauthlib 4.0.0 🟢 7.8
Details
CheckScoreReason
Maintained🟢 1015 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Code-Review🟢 4Found 4/9 approved changesets -- score normalized to 4
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Security-Policy🟢 10security policy file detected
Token-Permissions🟢 9detected GitHub workflow tokens with excessive permissions
Binary-Artifacts🟢 10no binaries found in the repo
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing🟢 10project is fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
SAST⚠️ -1internal error: internal error: Client.Checks.ListCheckRunsForRef: error during graphqlHandler.setupCheckRuns: Although you appear to have the correct authorization credentials, the `mistralai` organization has an IP allow list enabled, and your IP address is not permitted to access this resource.
Branch-Protection🟢 6branch protection is not maximal on development and all release branches
Packaging🟢 10packaging workflow detected
pip/packaging 26.3 UnknownUnknown
pip/pydantic-settings 2.14.2 UnknownUnknown
pip/pyjwt 2.15.0 UnknownUnknown
pip/pyopenssl 26.4.0 UnknownUnknown
pip/python-discovery 1.6.1 UnknownUnknown
pip/python-dotenv 1.2.2 UnknownUnknown
pip/python-multipart 0.0.31 UnknownUnknown
pip/setuptools 84.1.0 UnknownUnknown
pip/urllib3 2.8.0 UnknownUnknown
pip/uv 0.13.4 UnknownUnknown
pip/virtualenv 21.14.13 UnknownUnknown
pip/werkzeug 3.1.9 UnknownUnknown
pip/yarl 1.25.1 🟢 6.3
Details
CheckScoreReason
Code-Review⚠️ 0Found 1/14 approved changesets -- score normalized to 0
Maintained🟢 1030 commit(s) and 6 issue activity found in the last 90 days -- score normalized to 10
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 1dependency not pinned by hash detected -- score normalized to 1
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing🟢 10project is fuzzed
License🟢 10license file detected
Security-Policy🟢 10security policy file detected
Packaging🟢 10packaging workflow detected
SAST🟢 10SAST tool is run on all commits
Branch-Protection🟢 3branch protection is not maximal on development and all release branches
Signed-Releases🟢 43 out of the last 5 releases have a total of 3 signed artifacts.

Scanned Files

  • uv.lock

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.

Your targeted upgrade approach keeps the remediation easy to audit, and the explanation of the required transitive changes is clear.

Three minor comments below.

Outside the changed lines:

  • Minor: Avoid making the sandbox's glibc requirement mandatory (uv.lock:295). This new dependency makes the normal workspace installation fail on x86_64 Linux with Python 3.11/3.12 and glibc below 2.34, such as RHEL 8. The platform marker selects Hyperlight there, but its backend has only manylinux_2_34 Linux wheels and no source distribution. Consequently, uv cannot install the locked environment even when no sandbox functionality is used.
  • Minor: New wheel-only hyperlight backend makes uv sync fail on x86_64 Linux with glibc < 2.34 (uv.lock:2527). Moving to agent-framework-core 1.11.0 brings in agent-framework-hyperlight through the [all] extra. On x86_64 Linux (and AMD64 Windows) with Python below 3.14, that in turn pulls hyperlight-sandbox-backend-wasm==0.4.0. That package has no sdist. Its only wheels are manylinux_2_34_x86_64 and win_amd64. So on x86_64 Linux hosts with glibc 2.28–2.33, the dev environment can no longer be installed. Examples are RHEL/Rocky/Alma 8, Debian 11 / python:3.1x-bullseye images and Ubuntu 20.04. Both plain uv sync (the setup step in docs/design.md) and uv sync --locked --all-extras --dev...
  • Minor: cryptography 50.0.0 entry drops the Intel-macOS and 32-bit Windows wheels, so those contributors now build from source (uv.lock:1372). The 46.0.7 entry included macosx_10_9_universal2 and win32 wheels. The 50.0.0 entry only has macosx_11_0_arm64 for macOS and win_amd64 for Windows. uv sync only installs from the files listed in the lock. So contributors on Intel Macs, or on a 32-bit Windows Python, now build cryptography from the sdist. That needs a Rust toolchain plus OpenSSL headers; without them, uv sync fails. cryptography is in every dev environment: azure-identity, msal, authlib, pyopenssl, joserfc and google-auth all depend on it. The "Required transitive changes" section doesn't mention this platform im...

- Set PYTHONPATH to versioning/helper in tox env_run_base so uv sync --locked can build workspace editables with the custom build backend (needed after the uv 0.13.4 bump).
- virtualenv 21.14.9 -> 21.14.13 (GHSA-cx6f-vjhg-g3cc) and certifi 2026.10.18 -> 2026.10.19 (PYSEC-2026-4320).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 29, 2026 18:22

Copilot AI 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.

🟢 Approval recommended

No active review issues remain for the tox configuration change supporting custom build-backend imports.

No open issues 🎉

Review effort: Balanced

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.

Your targeted upgrade approach and small, shared tox configuration adjustment keep this remediation focused and easy to audit.

One minor comment below.

Outside the changed lines:

  • Minor: virtualenv is now the only lock entry from pypi.org, so setups that use only the internal feed can't use the committed lock (uv.lock:6339). All 288 other registry entries in uv.lock come from https://packagefeedproxy.microsoft.io/pypi/simple/, and so did virtualenv in the base lock. This change locks virtualenv 21.14.13 from https://pypi.org/simple, with files.pythonhosted.org artifacts. When an index is configured, uv only trusts locked registry entries whose index is one of the configured ones. Otherwise it treats the lock as stale and re-resolves. That breaks contributors whose uv config uses the internal feed as the default index, which is where the rest of this lockfile comes from: - `uv sync --locked --all-extras --...

Since my last review:

  • Still open: Avoid making the sandbox's glibc requirement mandatory (uv.lock). The dependency remains mandatory for the default development environment: pyproject.toml:57 includes agent-framework, uv.lock:120-125 selects agent-framework-core[all], and uv.lock:295 includes Hyperl
  • Still open: New wheel-only hyperlight backend makes uv sync fail on x86_64 Linux with glibc < 2.34 (uv.lock). This duplicates F921 and remains unresolved. uv.lock:400 still selects hyperlight-sandbox-backend-wasm for Linux x86_64 on Python <3.14, while uv.lock:2521-2526 provides only manylinux_2_34_x86_64 and
  • Still open: cryptography 50.0.0 entry drops the Intel-macOS and 32-bit Windows wheels, so those contributors now build from source (uv.lock). uv.lock:1364-1417 still locks cryptography 50.0.0 without Intel-macOS or win32 wheels; its macOS wheels are arm64-only, and the sdist remains at line 1370. The unconditional azure-identity dependency

The internal feed now mirrors virtualenv 21.14.13, so lock it from the same index as every other entry instead of pypi.org. Same version and hashes; only the registry/URLs change.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 29, 2026 20:29
@rbrighenti

Copy link
Copy Markdown
Contributor Author

Krishnadheeraj (@DheerajPannala) thanks. On the virtualenv point: the internal feed now mirrors virtualenv 21.14.13, so 84c0a09 relocks it from packagefeedproxy.microsoft.io like every other entry. The version and hashes are unchanged, and uv.lock no longer has any pypi.org entries. I re-ran tox verify-constraints, lint, format, py311 and py312 against it, and everything passes (859 passed, 3 skipped). The hyperlight and cryptography points are still open; I'll follow up on those separately.

Copilot AI 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.

🟢 Approval recommended

No active review issues were identified for the tox PYTHONPATH change that makes the custom build backend available.

No open issues 🎉

Review effort: Balanced

@rbrighenti

Copy link
Copy Markdown
Contributor Author

Krishnadheeraj (@DheerajPannala) thanks, all three platform points are accurate. We're accepting them as trade-offs of the minimum patched versions rather than adding overrides or constraints:

Both affect only this repo's locked dev/CI environment (uv.lock). Our published packages declare floors only, so downstream consumers already resolve the latest versions independently of this lock. I've added a "Platform impact" section to the PR description that documents both.

@rbrighenti
Rick Brighenti (rbrighenti) merged commit 8ccf3f2 into main Oct 30, 2026
10 checks passed
@rbrighenti
Rick Brighenti (rbrighenti) deleted the users/rbrighenti-microsoft/python-minimal-vuln-fixes branch October 30, 2026 14:56
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.

4 participants