Skip to content

Commit 169019b

Browse files
[python] bump generated client dependency floors above vulnerable ranges (#24186)
* [python] bump generated client dependency floors above vulnerable ranges The python client generator's manifest templates declared urllib3/aiohttp/pytest floors that intersect known-vulnerable release ranges. Generated clients are libraries without a lockfile, so the dependency graph records the declared range and vulnerability scanners (Dependabot, pip-audit) flag any range that intersects a vulnerable one — every generated client trips security alerts for its downstream consumers even when the resolved version is safe. Raise the floors above the currently-published advisory ranges (keeping the urllib3 < 3.0.0 cap): urllib3 >= 2.1.0 -> >= 2.7.0 (GHSA-mf9v-mfxr-j63j / CVE-2026-44432, GHSA-qccp-gfcp-xxvc / CVE-2026-44431) aiohttp >= 3.8.4 -> >= 3.14.1 pytest >= 7.2.1 -> >= 9.0.3 (GHSA-6w46-j5rx-g56g / CVE-2025-71176, dev-only) Regenerate the affected python samples. Signed-off-by: Johannes Würbach <johannes.wuerbach@googlemail.com> * [python] keep bumped dependency floors installable on Python 3.9 The floors in the previous commit (urllib3 >= 2.7.0, aiohttp >= 3.14.1, pytest >= 9.0.3) are only published for Python >= 3.10, but the generated clients declare requires-python = ">=3.9". Python 3.9 consumers would fail to resolve these dependencies (the exact conflict raised in review). Lower the floors to the highest releases still published for Python 3.9, keeping them well above the original ranges: urllib3 >= 2.7.0 -> >= 2.6.3 (last 2.6.x; 2.7.0 first requires Python >= 3.10) aiohttp >= 3.14.1 -> >= 3.13.5 (last 3.13.x; 3.14.0 first requires Python >= 3.10) pytest >= 9.0.3 -> >= 8.4.2 (last 8.x; 9.0.0 first requires Python >= 3.10; dev-only) These floors clear the older/high-severity advisories the original ranges intersected while staying installable under the declared requires-python. The most recent fixes (urllib3 GHSA-mf9v-mfxr-j63j / GHSA-qccp-gfcp-xxvc, the aiohttp <= 3.14.0 batch, pytest GHSA-6w46-j5rx-g56g) ship only in releases that require Python >= 3.10, so fully clearing them at the declaration level would require raising requires-python to >= 3.10 (a breaking change left to maintainers). Consumers on Python >= 3.10 still resolve to those patched releases naturally, since the floors are open-ended upward. Regenerate the affected python samples. Signed-off-by: Johannes Würbach <johannes.wuerbach@googlemail.com> --------- Signed-off-by: Johannes Würbach <johannes.wuerbach@googlemail.com>
1 parent eae9b36 commit 169019b

28 files changed

Lines changed: 39 additions & 39 deletions

File tree

modules/openapi-generator/src/main/resources/python/pyproject.mustache

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ include = ["{{packageName}}/py.typed"]
3434
[tool.poetry.dependencies]
3535
python = "^3.10"
3636
{{^async}}
37-
urllib3 = ">= 2.1.0, < 3.0.0"
37+
urllib3 = ">= 2.6.3, < 3.0.0"
3838
{{/async}}
3939
python-dateutil = ">= 2.8.2"
4040
{{#asyncio}}
41-
aiohttp = ">= 3.8.4"
41+
aiohttp = ">= 3.13.5"
4242
aiohttp-retry = ">= 2.8.3"
4343
{{/asyncio}}
4444
{{#httpx}}
@@ -62,14 +62,14 @@ requires-python = ">=3.9"
6262

6363
dependencies = [
6464
{{^async}}
65-
"urllib3 (>=2.1.0,<3.0.0)",
65+
"urllib3 (>=2.6.3,<3.0.0)",
6666
{{/async}}
6767
"python-dateutil (>=2.8.2)",
6868
{{#httpx}}
6969
"httpx (>=0.28.1)",
7070
{{/httpx}}
7171
{{#asyncio}}
72-
"aiohttp (>=3.8.4)",
72+
"aiohttp (>=3.13.5)",
7373
"aiohttp-retry (>=2.8.3)",
7474
{{/asyncio}}
7575
{{#tornado}}
@@ -101,7 +101,7 @@ requires-poetry = ">=2.0"
101101
{{^poetry1}}
102102
[tool.poetry.group.dev.dependencies]
103103
{{/poetry1}}
104-
pytest = ">= 7.2.1"
104+
pytest = ">= 8.4.2"
105105
pytest-cov = ">= 2.8.1"
106106
tox = ">= 3.9.0"
107107
flake8 = ">= 4.0.0"

modules/openapi-generator/src/main/resources/python/requirements.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{{^async}}
2-
urllib3 >= 2.1.0, < 3.0.0
2+
urllib3 >= 2.6.3, < 3.0.0
33
{{/async}}
44
python_dateutil >= 2.8.2
55
{{#asyncio}}
6-
aiohttp >= 3.8.4
6+
aiohttp >= 3.13.5
77
aiohttp-retry >= 2.8.3
88
{{/asyncio}}
99
{{#httpx}}

modules/openapi-generator/src/main/resources/python/setup.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ VERSION = "{{packageVersion}}"
1313
PYTHON_REQUIRES = ">= 3.10"
1414
REQUIRES = [
1515
{{^async}}
16-
"urllib3 >= 2.1.0, < 3.0.0",
16+
"urllib3 >= 2.6.3, < 3.0.0",
1717
{{/async}}
1818
"python-dateutil >= 2.8.2",
1919
{{#asyncio}}
20-
"aiohttp >= 3.8.4",
20+
"aiohttp >= 3.13.5",
2121
"aiohttp-retry >= 2.8.3",
2222
{{/asyncio}}
2323
{{#httpx}}

modules/openapi-generator/src/main/resources/python/test-requirements.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pytest >= 7.2.1
1+
pytest >= 8.4.2
22
pytest-cov >= 2.8.1
33
tox >= 3.9.0
44
flake8 >= 4.0.0

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "Echo Server API"]
1111
requires-python = ">=3.9"
1212

1313
dependencies = [
14-
"urllib3 (>=2.1.0,<3.0.0)",
14+
"urllib3 (>=2.6.3,<3.0.0)",
1515
"python-dateutil (>=2.8.2)",
1616
"pydantic (>=2.11)",
1717
"typing-extensions (>=4.7.1)",
@@ -24,7 +24,7 @@ Repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID"
2424
requires-poetry = ">=2.0"
2525

2626
[tool.poetry.group.dev.dependencies]
27-
pytest = ">= 7.2.1"
27+
pytest = ">= 8.4.2"
2828
pytest-cov = ">= 2.8.1"
2929
tox = ">= 3.9.0"
3030
flake8 = ">= 4.0.0"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
urllib3 >= 2.1.0, < 3.0.0
1+
urllib3 >= 2.6.3, < 3.0.0
22
python_dateutil >= 2.8.2
33
pydantic >= 2.11
44
typing-extensions >= 4.7.1

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
VERSION = "1.0.0"
2424
PYTHON_REQUIRES = ">= 3.10"
2525
REQUIRES = [
26-
"urllib3 >= 2.1.0, < 3.0.0",
26+
"urllib3 >= 2.6.3, < 3.0.0",
2727
"python-dateutil >= 2.8.2",
2828
"pydantic >= 2.11",
2929
"typing-extensions >= 4.7.1",

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/test-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pytest >= 7.2.1
1+
pytest >= 8.4.2
22
pytest-cov >= 2.8.1
33
tox >= 3.9.0
44
flake8 >= 4.0.0

samples/client/echo_api/python/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ keywords = ["OpenAPI", "OpenAPI-Generator", "Echo Server API"]
1111
requires-python = ">=3.9"
1212

1313
dependencies = [
14-
"urllib3 (>=2.1.0,<3.0.0)",
14+
"urllib3 (>=2.6.3,<3.0.0)",
1515
"python-dateutil (>=2.8.2)",
1616
"pydantic (>=2.11)",
1717
"typing-extensions (>=4.7.1)",
@@ -24,7 +24,7 @@ Repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID"
2424
requires-poetry = ">=2.0"
2525

2626
[tool.poetry.group.dev.dependencies]
27-
pytest = ">= 7.2.1"
27+
pytest = ">= 8.4.2"
2828
pytest-cov = ">= 2.8.1"
2929
tox = ">= 3.9.0"
3030
flake8 = ">= 4.0.0"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
urllib3 >= 2.1.0, < 3.0.0
1+
urllib3 >= 2.6.3, < 3.0.0
22
python_dateutil >= 2.8.2
33
pydantic >= 2.11
44
typing-extensions >= 4.7.1

0 commit comments

Comments
 (0)