Skip to content

diarizer: sync 10 dep pins from backend (no langchain stack) - #7178

Merged
mdmohsin7 merged 9 commits into
mainfrom
charles/diarizer-vuln-sync
May 5, 2026
Merged

mdmohsin7 merged 9 commits into
mainfrom
charles/diarizer-vuln-sync

Conversation

@mdmohsin7

Copy link
Copy Markdown
Member

Third of four service-sync PRs propagating backend's #7126 + #7127 + #7146 + #7149 bumps to the sub-services that don't auto-inherit backend/requirements.txt. Follows #7173 (agent-proxy) and #7177 (pusher).

What this PR does

8 atomic commits, 10 pins lifted to match backend. Diarizer doesn't use langchain so no major-cascade work — much smaller than pusher.

# Commit Package(s) Was → Now
1 aiohttp aiohttp 3.13.2 → 3.13.4
2 python-multipart python-multipart 0.0.21 → 0.0.26
3 requests requests 2.32.5 → ~=2.33.0
4 filelock filelock 3.20.1 → 3.20.3
5 mako mako 1.3.10 → 1.3.11
6 pillow pillow 12.0.0 → 12.2.0
7 fastapi+starlette fastapi / starlette 0.112.0 / 0.37.2 → 0.121.0 / 0.49.1
8 pydantic+pydantic-core pydantic / pydantic-core 2.8.2 / 2.20.1 → 2.11.10 / 2.33.2

Diarizer was already mostly aligned with backend after #7157 (the recent base-image bump). The other 47 shared packages either match exactly or are AHEAD of backend (e.g. aiohappyeyeballs 2.6.1 > 2.5.0, anyio 4.12.0 > 4.4.0, numpy 2.4.0 > 1.26.4, protobuf 6.33.2 > 5.29.6) — those were left untouched. Never downgrade.

CVEs closed (~14)

Test plan

End-to-end smoke test in a Python 3.12 venv (local platform: ARM64; diarizer's runtime target is amd64+CUDA):

  • pip install of all bumped packages clean; pip check reports no broken deps
  • All 12 bumped packages resolve to expected pins; typing_extensions==4.15.0 auto-resolved
  • Full uvicorn main:app boot with diarization and embedding modules stubbed (pyannote-audio's transitive torchcodec==0.7.0 is amd64-only — pre-existing platform pin, not affected by these bumps):
    • Started server process + Application startup complete — zero errors, zero warnings
    • GET /health → 200 {"status":"healthy"}
    • POST /v1/diarization with multipart file upload → 200 (exercises starlette 0.49.1 + python-multipart 0.0.26 upload hot path under fastapi 0.121)
    • POST /v2/embedding with multipart upload → 200
    • GET /openapi.json → 200, schema is OpenAPI 3.1.0 (fastapi 0.121's output)
    • All four endpoints registered with proper signatures
    • Clean shutdown
  • pydantic 2.11.10 + fastapi 0.121.0 + starlette 0.49.1 interop verified (built diarizer-shape app, instantiated BaseModel, validation round-trip)
  • Confirm post-deploy Artifact Registry rescan shows the targeted CVEs cleared on the diarizer GKE image

On pydantic 2.11 + torch / lightning / pyannote-audio interop

Can't fully exercise locally because pyannote-audio 4.0.3 requires torchcodec==0.7.0 which is amd64-only (only 0.0.0.dev0 / 0.11.x are available on Python 3.12 + aarch64). This is a pre-existing platform constraint, not affected by my bumps.

The combination is implicitly proven by backend's #7149 (pydantic==2.11.10 running in prod since this morning) and backend/modal (which combines torch + lightning + pyannote-audio + pydantic 2.11 — already inherits backend's requirements.txt via -r ../requirements.txt and is running in prod on modal today).

Follow-ups in this series

  • plugins (plugins/) — 110 shared packages, biggest fan-out

vad (backend/modal/) and notifications-job already auto-inherit backend/requirements.txt via -r ../requirements.txt.

mdmohsin7 added 8 commits May 5, 2026 12:22
Closes 4 MEDIUM CVEs in the diarizer service, matching backend's
#7146 pin:
- MEDIUM CVE-2026-22815
- MEDIUM CVE-2026-34515
- MEDIUM CVE-2026-34516
- MEDIUM CVE-2026-34525
- LOW (CVSS 9.1) CVE-2026-34520
- 5× LOW (the 3.13.4 release rollup also closes these)

Patch-level bump within the 3.13.x line.
Closes 1 MEDIUM CVE in diarizer, matching backend's #7146 pin:
- MEDIUM 5.3 CVE-2026-40347
Closes 1 MEDIUM CVE in diarizer, matching backend's #7146 pin
syntax (compatible-release within 2.33.x):
- MEDIUM 5.5 CVE-2026-25645
Closes 2 MEDIUM CVEs in diarizer, matching backend's #7146 pin:
- MEDIUM CVE-2025-68146
- MEDIUM CVE-2026-22701

Patch-level bump within the 3.20.x line.
Closes 1 MEDIUM CVE in diarizer, matching backend's #7146 pin:
- MEDIUM 7.5 CVE-2026-41205

Patch-level bump within the 1.3.x line.
Closes 2 HIGH CVEs in diarizer, matching backend's #7127 pin:
- HIGH 7.5 CVE-2026-25990
- HIGH 7.5 CVE-2026-40192

Patch-level bump within the 12.x line.
Closes 3 CVEs in diarizer, matching backend's pin progression in
#7127 (fastapi 0.112 → 0.118 / starlette 0.37 → 0.40) and #7146
(fastapi 0.118 → 0.121 / starlette 0.40 → 0.49.1):
- HIGH 7.5 CVE-2024-47874 (starlette content-length DoS)
- HIGH 7.5 CVE-2025-62727 (starlette FileResponse path traversal)
- MEDIUM 5.3 CVE-2025-54121

fastapi and starlette must move together — fastapi caps starlette
to a specific minor (fastapi 0.121 → starlette ^0.49).
Matches backend's pins from #7149. No direct CVE closure here, but
the pair must move together (pydantic 2.x version cap on
pydantic-core is exact). Pinning both to the same versions backend
resolved on keeps the ABI consistent across services.
@mdmohsin7 mdmohsin7 added backend Backend Task (python) p2 Priority: Important (score 14-21) Security labels May 5, 2026
@mdmohsin7

Copy link
Copy Markdown
Member Author

@morpheus review — Approved ✅

Single-file diff (backend/diarizer/requirements.txt), 10 package bumps across 8 atomic commits. All pins verified to match backend:

  • aiohttp 3.13.4, fastapi 0.121.0 + starlette 0.49.1, python-multipart 0.0.26, pydantic 2.11.10 + pydantic-core 2.33.2, filelock 3.20.3, mako 1.3.11, pillow 12.2.0, requests ~=2.33.0, cryptography... wait, no crypto here. All match. ✅

"Never downgrade" policy for ahead-of-backend packages: Correct. Diarizer's numpy 2.4.0, protobuf 6.33.2, etc. are ahead because torch/pyannote pull newer transitives. Forcing backend's older pins would break the dependency tree. Leave them alone. ✅

pydantic-core (dash) vs pydantic_core (underscore): Same pip-normalized package name. Dash matches existing file style. ✅

Full uvicorn boot, multipart upload endpoints exercised under starlette 0.49.1. Solid.

@greptile-apps

greptile-apps Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR syncs 10 dependency version pins in backend/diarizer/requirements.txt to match the backend service, closing ~14 CVEs across aiohttp, fastapi/starlette, pydantic, pillow, and several medium-severity packages. All bumps have been smoke-tested end-to-end with uvicorn boot, health checks, and multipart upload paths.

  • CVE remediation: aiohttp 3.13.4, fastapi 0.121.0/starlette 0.49.1, pillow 12.2.0, and python-multipart 0.0.26 address HIGH and MEDIUM CVEs from recent advisories.
  • Large version jumps: pydantic 2.8.2→2.11.10 (+pydantic-core 2.20.1→2.33.2) and starlette 0.37.2→0.49.1 are significant; the PR notes full amd64+CUDA interop is implicitly validated by the backend already running pydantic 2.11.10 in production.
  • One specifier inconsistency: requests~=2.33.0 uses a compatible-release specifier while all other 116 entries are exact pins — see inline comment.

Confidence Score: 5/5

Safe to merge — pure dependency version bumps with no logic changes, all targeted at CVE remediation and backend alignment.

The change is a single-file requirements bump with no logic modifications. All 10 packages were validated through a full uvicorn boot cycle including the starlette/python-multipart multipart upload hot path. The pydantic 2.11 + torch/lightning interop concern is addressed by the backend already running this combination in production. The only observation is a specifier style inconsistency on requests.

No files require special attention beyond the requests~=2.33.0 specifier noted inline.

Important Files Changed

Filename Overview
backend/diarizer/requirements.txt 10 dependency version bumps syncing diarizer with backend/requirements.txt; all CVE-motivated, smoke-tested end-to-end; only notable quirk is requests~=2.33.0 using a compatible-release specifier while every other entry is exact-pinned

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[backend/requirements.txt\nSource of truth] -->|sync via PR series| B[diarizer/requirements.txt\nThis PR]
    A -->|previous PRs| C[agent-proxy #7173]
    A -->|previous PRs| D[pusher #7177]

    subgraph "10 bumps in this PR"
        E[aiohttp 3.13.2 to 3.13.4]
        F[fastapi 0.112.0 to 0.121.0]
        G[starlette 0.37.2 to 0.49.1]
        H[pydantic 2.8.2 to 2.11.10]
        I[pydantic-core 2.20.1 to 2.33.2]
        J[python-multipart 0.0.21 to 0.0.26]
        K[pillow 12.0.0 to 12.2.0]
        L[requests 2.32.5 to 2.33.0]
        M[filelock 3.20.1 to 3.20.3]
        N[mako 1.3.10 to 1.3.11]
    end

    B --- E & F & G & H & I & J & K & L & M & N
Loading

Reviews (1): Last reviewed commit: "Bump diarizer pydantic 2.8.2 → 2.11.10 +..." | Re-trigger Greptile

Comment thread backend/diarizer/requirements.txt Outdated
pytz==2025.2
pyyaml==6.0.3
requests==2.32.5
requests~=2.33.0

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.

P2 requests~=2.33.0 is the only compatible-release specifier (~=) in a file where every other package (116 entries) uses an exact pin (==). The ~=2.33.0 constraint means any 2.33.x release could be installed, which breaks the lockfile-style reproducibility that the rest of the file provides. This is intentionally inherited from backend/requirements.txt, but given that this file is managed as a fully-pinned lockfile, pinning to the concrete resolved version would be more consistent.

Suggested change
requests~=2.33.0
requests==2.33.0

Follow-up to the requests bump in 4bb445f. Greptile flagged the
`~=2.33.0` compatible-release specifier as the only non-`==` pin
in a file of 116 exact-pinned entries.

The smoke-test venv resolved to 2.33.1 from `~=2.33.0`, so pinning
to the same concrete version here. CVE coverage unchanged
(CVE-2026-25645 is fixed at 2.33.0; 2.33.1 is in scope).

Backend keeps `~=2.33.0` because that file already mixes pin styles.
@mdmohsin7
mdmohsin7 merged commit 874d796 into main May 5, 2026
2 checks passed
@mdmohsin7
mdmohsin7 deleted the charles/diarizer-vuln-sync branch May 5, 2026 14:33
mdmohsin7 added a commit that referenced this pull request May 6, 2026
… deps (#7179)

Last of four service-sync PRs propagating backend's #7126 + #7127 +
#7146 + #7149 bumps to the sub-services that don't auto-inherit
`backend/requirements.txt`. Follows #7173 (agent-proxy), #7177 (pusher)
and #7178 (diarizer).

Plugins is the biggest fan-out in the series — 110 shared packages with
backend, 47 differing pins, plus a real langchain code migration
(langchain-core 1.x removed the `pydantic_v1` shim).

## What this PR does

23 atomic commits, organized to mirror backend's PR series.

### 1. Code migration (1 commit)

Forward-compatible: `plugins/_multion/router.py` and
`plugins/advanced/realtime.py` migrate from `langchain_core.pydantic_v1`
(removed in langchain-core 1.0) to `pydantic` v2 directly. Field
signatures: `min_items=0` → `min_length=0` (the v2 equivalent for List
constraints).

`_multion/router.py` is imported by `main.py` and registered as a router
→ would crash uvicorn at import time on langchain-core 1.x without this
fix. `advanced/realtime.py` is the deprecated REALTIME plugins module
that `main.py` explicitly disables, but fixed for cleanliness.

### 2. Security pin bumps (mirrors backend, 18 commits)

Same pattern as #7177 (pusher), reorganized into per-package-family
commits:

- orjson, python-multipart, python-dotenv, requests, jinja2,
marshmallow, tornado, urllib3
- cryptography (+ cffi cascade)
- aiohttp ecosystem (aiohttp + aiosignal + yarl)
- h11 + httpcore (must move together)
- h2 + hpack + hyperframe (must move together)
- protobuf + grpcio + grpcio-tools (cascade)
- fastapi + starlette + fastapi-cli (cascade)
- pydantic + pydantic-core + pydantic-settings (must move together)
- openai
- langchain stack 0.2 → 1.x (langchain, langchain-community,
langchain-core, langchain-openai, langchain-text-splitters, langsmith,
langchain-groq) — note plugins is one major behind pusher's 0.3 → 1.x
- 12 infrastructure pins (attrs, packaging, posthog, prometheus_client,
qdrant-client, redis, SQLAlchemy, tqdm, typing_extensions, uvicorn,
uvloop, httpx) batched as a single non-CVE-closure commit

### 3. Resolver-pressure fixes (4 commits)

Dead deps blocking the security bumps:

| Pkg | Dropped | Why |
|---|---|---|
| **asknews** | 0.7.36 | Hard-caps `cryptography<42.0.7` / latest
0.13.45 still caps `<46.0.7` → blocks CVE-2026-39892 fix |
| **multion** | 1.3.5 | Hard-pins `agentops<0.3.0` → blocks resolver
chain |
| **agentops** | 0.4.21 (after a brief bump from 0.2.6) | 0.2.6
hard-pinned `requests==2.31.0` → blocks requests bump |

All three were unused — verified via repo-wide `grep import multion /
from multion / import agentops / from agentops / from asknews / import
asknews` (zero hits). They've sat in `plugins/requirements.txt` since
the initial move from `plugins/example/` (Feb 2026) and were probably
installed for the deprecated REALTIME plugins. Backend doesn't have them
either, so removing also brings plugins closer to backend.

| Pkg | Bumped | Why |
|---|---|---|
| **groq** | 0.11.0 → 0.37.1 | langchain-groq 1.1.2 raised floor to
`>=0.30.0`. Plugins-specific (backend doesn't pin langchain-groq). |

## CVEs closed (~25)

- **CRITICAL 9.1** CVE-2025-43859 (h11+httpcore — HTTP request
smuggling)
- **CRITICAL 8.2** CVE-2025-68664 (langchain-core)
- **HIGH × 14**: tornado (4× CVEs), urllib3 (3), aiohttp
(CVE-2025-69223), cryptography (CVE-2026-26007), fastapi/starlette
(CVE-2024-47874, CVE-2025-62727 + GHSA-mwv6-3258-q52c — wait that's
next), python-multipart (CVE-2024-53981, CVE-2026-24486), orjson
(CVE-2025-67221), langchain-core (CVE-2026-34070), protobuf
(CVE-2026-0994)
- **MEDIUM × 12+**: jinja2 (3 sandbox-escape CVEs), aiohttp (4),
python-multipart (CVE-2026-40347), requests (CVE-2026-25645),
python-dotenv (CVE-2026-28684), marshmallow (CVE-2025-68480), h2
(CVE-2025-57804), langchain-core (CVE-2026-40087), langsmith (2
MEDIUMs), starlette (CVE-2025-54121), cryptography (CVSS 9.8
CVE-2026-39892)

## Test plan

End-to-end smoke test in a Python 3.12 venv with prod secrets pulled
from GSM (sourced + shredded — no values left on disk):

- [x] `pip install -r requirements.txt` resolves cleanly after the
dead-dep removals; `pip check` reports no broken dependencies
- [x] All 28 spot-checked target packages resolve to expected pins
(`typing_extensions==4.15.0` auto-resolved, `langchain-groq==1.1.2`
matches the new floor, etc.)
- [x] **Full `uvicorn main:app` boot** with prod env (REDIS,
OPENAI_API_KEY_PLUGINS, GROQ, NOTION OAuth, MEM0, HEY_OMI, ZAPIER,
MULTION OAuth):
- `Started server process` + `Application startup complete` — zero
errors, zero warnings
- `iq_rating.main:Database initialized` (SQLAlchemy 2.0.32 + sqlite
layer works)
  - `GET /` → 200 with the API root listing
  - `GET /docs` → 200
- `GET /openapi.json` → 200, schema is OpenAPI 3.1.0 (fastapi 0.121's
output)
- **38 routes registered** across all integrations: chatgpt, multion
(OAuth flow, not the SDK), mentor, iq-rating, notion auth, hey_omi,
zapier, subscription, conversation-feedback
  - Clean shutdown
- [x] **pydantic_v1 → v2 migration verified**: `/multion/...` paths
registered correctly (would have crashed at `_multion/router.py` import
time without the migration, since `langchain_core.pydantic_v1` doesn't
exist in 1.x)
- [x] `pydantic 2.11` + `langchain 1.x` + `ChatGroq` + `ChatOpenAI` +
`langchain-core` + `langgraph` interop verified at module-load
- [ ] Confirm post-deploy Artifact Registry rescan shows the targeted
CVEs cleared on the plugins Cloud Run image

## Series wrap

This is the last service-sync. After merge, the four sub-services that
don't auto-inherit `backend/requirements.txt` (agent-proxy, pusher,
diarizer, plugins) will all be aligned with backend's
#7126/#7127/#7146/#7149 security state. `vad` (`backend/modal/`) and
`notifications-job` (also under modal) auto-inherit and need no separate
work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Backend Task (python) p2 Priority: Important (score 14-21) Security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant