Skip to content

Commit 0621237

Browse files
fix: patch development and release dependency vulnerabilities (#850)
1 parent 303cdd5 commit 0621237

5 files changed

Lines changed: 238 additions & 857 deletions

File tree

‎.github/workflows/check-types.yml‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ on:
55
branches:
66
- main
77
pull_request:
8-
branches:
9-
- main
108

119
jobs:
1210
type-check:
@@ -17,25 +15,28 @@ jobs:
1715
with:
1816
submodules: recursive
1917

20-
- name: Set up Python 3.9
18+
- name: Set up Python 3.12
2119
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
2220
with:
23-
python-version: 3.9
21+
python-version: "3.12"
2422

2523
- name: Install uv
2624
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
2725
with:
26+
version: "0.12.24"
2827
enable-cache: true
2928
cache-dependency-glob: "uv.lock"
3029

3130
- name: Install the project
32-
run: uv sync --all-extras --dev
31+
run: uv sync --locked --all-extras --dev
3332

3433
- name: Install workspace packages
3534
run: uv pip install -e livekit-protocol -e livekit-api -e livekit-rtc
3635

3736
- name: Download ffi
38-
run: uv run python livekit-rtc/rust-sdks/download_ffi.py --output .venv/lib/python3.9/site-packages/livekit/rtc/resources
37+
run: uv run python livekit-rtc/rust-sdks/download_ffi.py --output livekit-rtc/livekit/rtc/resources
3938

4039
- name: Check Types
41-
run: uv run mypy livekit-protocol livekit-api livekit-rtc
40+
run: |
41+
uv run mypy livekit-protocol livekit-api livekit-rtc
42+
uv run mypy --python-version 3.9 livekit-protocol/livekit livekit-api/livekit livekit-rtc/livekit

‎.github/workflows/ruff.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,17 @@ jobs:
77
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
88
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
99
with:
10-
python-version: "3.9"
10+
python-version: "3.12"
1111

1212
- name: Install uv
1313
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
1414
with:
15+
version: "0.12.24"
1516
enable-cache: true
1617
cache-dependency-glob: "uv.lock"
1718

1819
- name: Install the project
19-
run: uv sync --all-extras --dev
20+
run: uv sync --locked --all-extras --dev
2021

2122
# Use the ruff version pinned in uv.lock rather than uvx's latest release,
2223
# so lint results only change when the lockfile is intentionally updated.

‎README.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,14 @@ Software encoders (libvpx for VP8/VP9, libaom for AV1, OpenH264 for H264) are us
404404
405405
Please join us on [Slack](https://livekit.io/join-slack) to get help from our devs / community members. We welcome your contributions(PRs) and details can be discussed there.
406406
407+
### Development environment
408+
409+
The published SDKs support Python 3.9 and later. Development and release tooling
410+
requires Python 3.10 or later so that patched versions of its dependencies can be
411+
installed. For example, run `uv sync --locked --dev --python 3.12` from the
412+
repository root. A Python 3.9 runtime environment can use
413+
`uv sync --locked --no-dev --python 3.9`.
414+
407415
<!--BEGIN_REPO_NAV-->
408416
<br/><table>
409417
<thead><tr><th colspan="2">LiveKit Ecosystem</th></tr></thead>

‎pyproject.toml‎

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@ description = "LiveKit Python SDKs monorepo"
55
requires-python = ">=3.9"
66
dependencies = ["livekit", "livekit-api", "livekit-protocol"]
77

8+
[tool.uv]
9+
# Security floors for transitive development and release dependencies.
10+
constraint-dependencies = [
11+
"cryptography>=50.0.0",
12+
"filelock>=3.20.3",
13+
"pillow>=12.3.0",
14+
"pygments>=2.20.0",
15+
"urllib3>=2.8.0",
16+
]
17+
18+
[tool.uv.dependency-groups]
19+
# Patched tooling requires Python 3.10; published SDKs still support Python 3.9.
20+
dev = { requires-python = ">=3.10" }
21+
822
[tool.uv.workspace]
923
members = ["livekit-rtc", "livekit-api", "livekit-protocol"]
1024

@@ -21,10 +35,10 @@ dev = [
2135
"types-aiofiles>=24",
2236
"ipython>=8.0.0",
2337
# Testing
24-
"pytest>=8.3.4",
38+
"pytest>=9.0.3",
2539
"pytest-asyncio>=0.24.0",
2640
# Build and packaging
27-
"requests",
41+
"requests>=2.33.0",
2842
"wheel",
2943
"twine",
3044
"auditwheel; sys_platform == 'linux'",

0 commit comments

Comments
 (0)