fix(deps): raise dep floors past known vulns #2

Merged
thklein merged 2 commits from fix/deps-security into main 2026-10-18 10:48:01 +00:00
Owner

Summary

Clear the known vulnerabilities reported by pip-audit in the runtime and dev dependencies.

Runtime (pyproject.toml)

As a library, gptscript should not hard-pin its dependencies with ==, because that forces exact versions on every consumer and blocks their security updates. The runtime deps are now lower bounds at fixed-or-newer versions:

Dependency Before After
idna ==3.7 >=3.15
requests ==2.32.5 >=2.33.0
urllib3 ==2.6.2 >=2.8.0,<3
httpx ==0.27.0 >=0.27.0,<1
pydantic ==2.12.5 >=2.12.5,<3
certifi, charset-normalizer, tqdm, uvicorn, pywin32 == >= (same version)
  • Adds requires-python = ">=3.10". requests 2.33+ and urllib3 2.8+ already need it, and the code uses X | None annotations.
  • The upper bounds (<1 for httpx, <3 for urllib3 and pydantic) guard against known-breaking major lines only.

Dev (requirements.txt, lock.txt)

  • wheel 0.45.1 -> 0.48.0 (wheel.wheelfile.WheelFile, used by scripts/package, still exists)
  • lock.txt regenerated with uv pip compile for Python 3.12 (the CI version) on Linux. Notable changes: cryptography 46.0.3 -> 50.0.2, filelock 3.20.0 -> 4.2.2, virtualenv 20.35.4 -> 21.14.11, pygments 2.19.2 -> 2.21.0, jaraco-context 6.0.1 -> 6.1.2, idna 3.11 -> 3.20, requests 2.32.5 -> 2.34.2, urllib3 2.6.2 -> 2.8.0. The lock now also lists build, pyproject-hooks and wheel, which it was missing. Top-level pins (tox 4.14.1, twine 6.2.0, build 1.3.0, pydantic, uvicorn, tqdm) are unchanged.

The gptscript binary version (v0.9.10) is unchanged.

Audit (uvx pip-audit)

Target Before (main) After
pip-audit . (runtime, pyproject) 13 findings / 8 advisories in idna, requests, urllib3 0
runtime floors pinned exactly (idna==3.15, requests==2.33.0, urllib3==2.8.0, httpx==0.27.0, ...) n/a 0
pip-audit -r requirements.txt (dev) 44 findings / 25 advisories in 9 packages (cryptography, virtualenv, urllib3, filelock, idna, jaraco-context, pygments, requests, wheel) 0

Verification

  • A fresh Python 3.12 venv from requirements.txt runs tox 4.14.1 against virtualenv 21 and filelock 4 without problems. The tox env resolves the new ranges to the latest releases (httpx 0.28.1, pydantic 2.14.1, requests 2.34.2, urllib3 2.8.0, uvicorn 0.54.0).
  • In tox, install_gptscript fetches v0.9.10 from the Forgejo release.
  • pytest with a placeholder key, restricted to tests that don't call a model (version, load_*, parse_*, fmt*, credentials, local workspace tests): 16 passed, 3 skipped (S3 tests need AWS). The full suite needs provider keys and is skipped in CI without them.
  • python -m build and twine check dist/*: PASSED.
## Summary Clear the known vulnerabilities reported by `pip-audit` in the runtime and dev dependencies. ### Runtime (`pyproject.toml`) As a library, gptscript should not hard-pin its dependencies with `==`, because that forces exact versions on every consumer and blocks their security updates. The runtime deps are now lower bounds at fixed-or-newer versions: | Dependency | Before | After | |---|---|---| | idna | `==3.7` | `>=3.15` | | requests | `==2.32.5` | `>=2.33.0` | | urllib3 | `==2.6.2` | `>=2.8.0,<3` | | httpx | `==0.27.0` | `>=0.27.0,<1` | | pydantic | `==2.12.5` | `>=2.12.5,<3` | | certifi, charset-normalizer, tqdm, uvicorn, pywin32 | `==` | `>=` (same version) | - Adds `requires-python = ">=3.10"`. requests 2.33+ and urllib3 2.8+ already need it, and the code uses `X | None` annotations. - The upper bounds (`<1` for httpx, `<3` for urllib3 and pydantic) guard against known-breaking major lines only. ### Dev (`requirements.txt`, `lock.txt`) - `wheel` 0.45.1 -> 0.48.0 (`wheel.wheelfile.WheelFile`, used by `scripts/package`, still exists) - `lock.txt` regenerated with `uv pip compile` for Python 3.12 (the CI version) on Linux. Notable changes: cryptography 46.0.3 -> 50.0.2, filelock 3.20.0 -> 4.2.2, virtualenv 20.35.4 -> 21.14.11, pygments 2.19.2 -> 2.21.0, jaraco-context 6.0.1 -> 6.1.2, idna 3.11 -> 3.20, requests 2.32.5 -> 2.34.2, urllib3 2.6.2 -> 2.8.0. The lock now also lists `build`, `pyproject-hooks` and `wheel`, which it was missing. Top-level pins (tox 4.14.1, twine 6.2.0, build 1.3.0, pydantic, uvicorn, tqdm) are unchanged. The gptscript binary version (v0.9.10) is unchanged. ## Audit (`uvx pip-audit`) | Target | Before (main) | After | |---|---|---| | `pip-audit .` (runtime, pyproject) | 13 findings / 8 advisories in idna, requests, urllib3 | **0** | | runtime floors pinned exactly (`idna==3.15`, `requests==2.33.0`, `urllib3==2.8.0`, `httpx==0.27.0`, ...) | n/a | **0** | | `pip-audit -r requirements.txt` (dev) | 44 findings / 25 advisories in 9 packages (cryptography, virtualenv, urllib3, filelock, idna, jaraco-context, pygments, requests, wheel) | **0** | ## Verification - A fresh Python 3.12 venv from `requirements.txt` runs `tox` 4.14.1 against virtualenv 21 and filelock 4 without problems. The tox env resolves the new ranges to the latest releases (httpx 0.28.1, pydantic 2.14.1, requests 2.34.2, urllib3 2.8.0, uvicorn 0.54.0). - In tox, `install_gptscript` fetches v0.9.10 from the Forgejo release. - pytest with a placeholder key, restricted to tests that don't call a model (`version`, `load_*`, `parse_*`, `fmt*`, `credentials`, local `workspace` tests): 16 passed, 3 skipped (S3 tests need AWS). The full suite needs provider keys and is skipped in CI without them. - `python -m build` and `twine check dist/*`: PASSED.
fix(deps): raise dep floors past known vulns
All checks were successful
test / test (pull_request) Successful in 27s
291e4c039c
pip-audit reported 13 findings (8 advisories) in the runtime deps
pinned in pyproject.toml (idna 3.7, requests 2.32.5, urllib3 2.6.2)
and 44 (25 advisories) in the dev requirements.

As a library, gptscript should not hard-pin its dependencies: switch
the runtime deps to lower bounds at fixed-or-newer versions
(idna>=3.15, requests>=2.33.0, urllib3>=2.8.0) and declare
requires-python >=3.10, which those versions already need.

Bump wheel to 0.48.0 and regenerate lock.txt for Python 3.12 on Linux,
which lifts cryptography, filelock, virtualenv, pygments,
jaraco-context and the rest to fixed versions.
fix(deps): require Python 3.11 for typing.Self
All checks were successful
test / test (pull_request) Successful in 16s
f62182f1ce
thklein deleted branch fix/deps-security 2026-10-18 10:48:01 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
basepeak-ai/py-gptscript!2
No description provided.