Skip to content

chore(plugins): remediate Dependabot vulns in requirements.txt (#7327) - #7385

Merged
mdmohsin7 merged 2 commits into
mainfrom
rex/plugins-req-deps
May 19, 2026
Merged

mdmohsin7 merged 2 commits into
mainfrom
rex/plugins-req-deps

Conversation

@mdmohsin7

@mdmohsin7 mdmohsin7 commented May 19, 2026 •

Copy link
Copy Markdown
Member

Part of #7327. Branched from fresh main. (2 commits: initial fix + greptile-review rework.)

What it does

Clears the plugins/requirements.txt Dependabot alerts (59 → minimal). Only the CVE packages + their required jupyter/langchain closure are floated; unrelated heavy deps are pinned to their original versions to avoid needless major churn.

Patched: langchain-core 1.3.2→1.4.0 (CVE-2026-44843), langsmith→0.8.5, jupyterlab 4.2.4→4.5.7, notebook 7.2.1→7.5.6, nbconvert, mistune→3.2.1, urllib3→2.7.0, python-multipart→0.0.29, Pygments→2.20.0.

Pinned to original (unchanged — addressed greptile P2): redis 5.0.8, websockets 12.0, starlette 0.49.1, protobuf 5.29.6, psutil 5.9.8, posthog 3.5.2, fastapi 0.121.0, uvicorn 0.30.5.

Residual (1 — documented, intentional)

langchain-openai kept at 1.1.9 (CVE-2026-41488, LOW): fix 1.1.14 requires openai>=2.26 → breaking openai 1.x→2.x major. openai pinned at 1.109.1. Tracked separately, consistent with the backend PRs.

Validation

pip-audit of the full re-resolved tree → only the langchain-openai residual. Zero version regressions vs original. Supply-chain-verified the early-version transitives (annotated-doc→FastAPI org, langchain-protocol/langchain-classic→LangChain org — legit; pulled by the langchain-core CVE fix).

🤖 Generated with Claude Code

Flat hand-pinned file (incl. transitives) re-resolved with per-package
floors (every pkg >= its original; vulnerable >= patched) so the
re-resolve introduces NO regressions (verified). 59 Dependabot alerts
-> 16 unique vuln pkgs; ~5 were already-satisfied stale (main moved
past them).

Cleared: langchain-core 1.3.2->1.4.0 (CVE-2026-44843), langsmith
0.7.31->0.8.5, jupyterlab 4.2.4->4.5.7, notebook 7.2.1->7.5.6,
nbconvert 7.16.4->7.17.1, mistune 3.0.2->3.2.1, urllib3 2.6.3->2.7.0,
python-multipart 0.0.26->0.0.29, Pygments 2.18.0->2.20.0, + transitive.

RESIDUAL (1, documented — consistent with backend): langchain-openai
kept at 1.1.9 (CVE-2026-41488); its fix 1.1.14 requires openai>=2.26
i.e. a breaking openai 1.x->2.x major. openai pinned at 1.109.1 to
keep the resolver from pulling the major. Flagged for a separate
deliberate migration.

Validation: pip-audit of the full 199-pkg re-resolved tree -> only
the langchain-openai residual; zero version regressions vs original.
@mdmohsin7
mdmohsin7 marked this pull request as ready for review May 19, 2026 10:49
@greptile-apps

greptile-apps Bot commented May 19, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR remediates Dependabot CVE alerts in plugins/requirements.txt by flooring nine vulnerable packages to their patched versions while explicitly re-pinning unrelated heavy dependencies to their original values to avoid unnecessary churn. The residual langchain-openai CVE is intentionally deferred and documented because its fix requires the breaking openai 1.x→2.x major upgrade.

  • CVE fixes applied: langchain-core 1.3.2→1.4.0, langsmith→0.8.5, jupyterlab→4.5.7, notebook→7.5.6, nbconvert→7.17.1, mistune→3.2.1, urllib3→2.7.0, python-multipart→0.0.29, Pygments→2.20.0.
  • Heavy deps pinned to originals: redis==5.0.8, websockets==12.0, starlette==0.49.1, protobuf==5.29.6, psutil==5.9.8, posthog==3.5.2, fastapi==0.121.0, uvicorn==0.30.5.
  • Residual: langchain-openai==1.1.9 (LOW CVE-2026-41488) kept at original; fix deferred until the openai 1.x→2.x major is ready, tracked separately.

Confidence Score: 5/5

Safe to merge — all CVE-targeted packages are patched, heavy deps are pinned to originals, and the one residual CVE is documented and tracked separately.

The change is a carefully scoped dependency pin file. The previous round's concerns have both been addressed. The only new observation is a minor version skew between grpcio and grpcio-tools, which does not affect runtime behavior because no plugin code invokes grpc_tools directly.

No files require special attention beyond the documented grpcio/grpcio-tools minor version skew in plugins/requirements.txt.

Important Files Changed

Filename Overview
plugins/requirements.txt Security remediation: CVE packages floored to patched versions; heavy deps pinned back to originals; residual langchain-openai CVE documented as intentional. Minor style concern: grpcio (1.80.0) and grpcio-tools (1.71.2) are 9 minor versions apart.

Reviews (2): Last reviewed commit: "address greptile review: minimize churn ..." | Re-trigger Greptile

Comment thread plugins/requirements.txt
aiosignal==1.4.0
aiostream==0.5.2
aiostream==0.7.1
annotated-doc==0.0.4

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 security Unrecognized early-stage transitive packages warrant supply-chain verification

Three packages that weren't in the original requirements.txt are at pre-release or very early version numbers: annotated-doc==0.0.4 (line 10), langchain-protocol==0.0.15 (line 92), and langchain-classic==1.0.7 (line 87). None of these are part of the well-known LangChain monorepo packages documented at python.langchain.com, and their very low version numbers suggest they were recently published. Because this is a security-remediation PR, any newly introduced package with an unverified publisher should be confirmed as a legitimate transitive dependency (e.g. via pip show <pkg> to check its Home-page/Source and cross-checking the PyPI author against the LangChain org) before merge, to rule out typosquatting.

Comment thread plugins/requirements.txt Outdated
Comment on lines +150 to +170
redis==7.4.0
referencing==0.37.0
regex==2026.5.9
requests==2.34.2
requests-toolbelt==1.0.0
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rich==13.7.1
rpds-py==0.20.0
Send2Trash==1.8.3
rfc3987-syntax==1.1.0
rich==15.0.0
rich-toolkit==0.19.9
rpds-py==0.30.0
send2trash==2.1.0
setuptools==82.0.1
shellingham==1.5.4
sigtools==4.0.1
six==1.16.0
six==1.17.0
sniffio==1.3.1
soupsieve==2.6
SQLAlchemy==2.0.32
soupsieve==2.8.3
sqlalchemy==2.0.49
stack-data==0.6.3
starlette==0.49.1
synchronicity==0.6.7
tenacity==8.5.0
termcolor==2.4.0
starlette==1.0.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 Re-resolution upgraded packages far beyond the minimum security fix

Using uv pip compile with >= floors resolved every package to its latest compatible version, not just the vulnerable ones. This introduced several multi-major-version jumps that weren't required by any CVE: redis 5.0.8 → 7.4.0, websockets 12.0 → 16.0, starlette 0.49.1 → 1.0.0, protobuf 5.29.6 → 6.33.6, psutil 5.x → 7.x, and posthog 3.x → 7.x, along with 28 net-new transitive packages. The active plugin code (db.py, main.py) uses only basic redis get/set and standard FastAPI patterns, so no immediate breakage was found — but this level of churn in a single security PR makes future regressions hard to attribute. Consider re-running with exact pins (==) for non-vulnerable packages and only applying >= floors to the packages with confirmed CVEs.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

P2 (re-resolution churn): reworked the resolve so only the CVE pkgs +
their required jupyter/langchain closure float; the unrelated major
jumps greptile flagged are pinned back to ORIGINAL (==):
redis 5.0.8, websockets 12.0, starlette 0.49.1, protobuf 5.29.6,
psutil 5.9.8, posthog 3.5.2 (+ fastapi/uvicorn for framework
stability). Net: jupyterlab 4.2.4->4.5.7, notebook 7.2.1->7.5.6,
langchain-core 1.3.2->1.4.0, langsmith->0.8.5, urllib3->2.7.0,
nbconvert/mistune/python-multipart/Pygments patched; ZERO regressions.

P2 (supply chain): verified the early-version transitives are
legitimate, not typosquats:
- annotated-doc -> tiangolo (FastAPI org), github.com/fastapi/annotated-doc
- langchain-protocol -> github.com/langchain-ai/agent-protocol
- langchain-classic -> docs.langchain.com (LangChain v1 split)
They appear only because the langchain-core CVE fix pulls langchain 1.3.x.

pip-audit of the re-resolved tree: only the documented
langchain-openai residual (CVE-2026-41488, openai-major-gated).
@mdmohsin7

Copy link
Copy Markdown
Member Author

Both P2s addressed (commit c7190ecb6, follow-up — history preserved, no force-push):

P2 — re-resolution churn (valid, fixed). You're right that the >=-floor-everything strategy swept unrelated packages to latest. Reworked: only the CVE packages and the dependency closure they require (the jupyter doc/serve stack — nbconvert→bleach→tinycss2 etc. — and the langchain-core CVE tree) float; the specific unrelated majors you flagged are pinned back to original: redis 5.0.8, websockets 12.0, starlette 0.49.1, protobuf 5.29.6, psutil 5.9.8, posthog 3.5.2 (+ fastapi/uvicorn for framework stability). The remaining churn is the unavoidable jupyter/langchain CVE-fix closure (those packages can't be patched without their tightly co-pinned ecosystem moving — a name-scoped minimal subset isn't cleanly separable for that stack). Zero version regressions; pip-audit → only the documented langchain-openai residual.

P2 — supply chain (verified safe). Checked PyPI publisher/source for the three early-version transitives:

  • annotated-doc → Sebastián Ramírez (tiangolo, FastAPI org), github.com/fastapi/annotated-doc
  • langchain-protocol → github.com/langchain-ai/agent-protocol
  • langchain-classic → docs.langchain.com (the LangChain v1 split package)

All legitimate org packages, not typosquats. They only appear because the langchain-core CVE fix pulls langchain 1.3.x (which restructured into langchain-classic/-protocol). With the minimal rework they're still present (inherent to the langchain-core fix) but now provenance-confirmed.

@mdmohsin7

Copy link
Copy Markdown
Member Author

@greptile-apps re-review

@mdmohsin7
mdmohsin7 merged commit 765325b into main May 19, 2026
3 checks passed
@mdmohsin7
mdmohsin7 deleted the rex/plugins-req-deps branch May 19, 2026 12:51
mdmohsin7 added a commit that referenced this pull request May 19, 2026
#7394)

Part of #7327. Per-plugin `requirements.txt` remediation — group 2 of
the plugin batch.

These three plugin services have **byte-identical** dependency files
(md5 `e505cef78ad7`), remediated together (one commit per file).

## Minimal bumps (only the Dependabot-flagged pins)
| package | from | to | why |
|---|---|---|---|
| python-dotenv | 1.0.1 | 1.2.2 | flagged |
| requests | 2.31.0 | 2.34.2 | CVE-2024-35195 / CVE-2024-47081 |
| Jinja2 | 3.1.4 | 3.1.6 | CVE-2024-56326 / CVE-2025-27516 |
| python-multipart | 0.0.9 | 0.0.29 | CVE-2024-53981 (DoS) |

Versions match those merged & review-passed in #7385, for consistency.

**Unflagged pins kept at exact original** (`fastapi==0.111.1`,
`uvicorn==0.30.3`, `pydantic==2.8.2`, `redis==5.0.1`).

## Validation
- Resolves cleanly (`pip install --dry-run`); `pip-audit` of bumped pins
→ clean.

## Documented residual (pre-existing, transitive, NOT introduced here)
`starlette 0.37.2` (CVE-2024-47874, CVE-2025-54121) is pulled
transitively by the **unchanged** `fastapi==0.111.1`; not a Dependabot
alert on these manifests (starlette isn't pinned), not regressed by this
PR. Optional follow-up: `fastapi>=0.115` pulls patched starlette.

## Alerts cleared
~33 (11 shipbob + 11 notion + 11 google-calendar).
mdmohsin7 added a commit that referenced this pull request May 19, 2026
#7393)

Part of #7327. Per-plugin `requirements.txt` remediation — group 1 of
the plugin batch.

These two plugin services have **byte-identical** dependency sets, so
they're remediated together (one commit per file).

## Minimal bumps (only the Dependabot-flagged pins)
| package | from | to | why |
|---|---|---|---|
| python-dotenv | 1.0.1 | 1.2.2 | flagged |
| requests | 2.31.0 | 2.34.2 | CVE-2024-35195 / CVE-2024-47081 (netrc
leak) |
| Jinja2 | 3.1.4 | 3.1.6 | CVE-2024-56326 / CVE-2025-27516 |
| python-multipart | 0.0.9 | 0.0.29 | CVE-2024-53981 (DoS) |
| aiohttp | 3.9.5 | 3.13.5 | 20 alerts (multiple CVEs) |

Patched versions match those already merged & review-passed in #7385
(`plugins/requirements.txt`), for consistency.

**Unflagged pins kept at exact original** (`fastapi==0.111.1`,
`uvicorn==0.30.3`, `pydantic==2.8.2`, `redis==5.0.1`) — minimal-bump
policy, no unrelated sweep.

## Validation
- Dependency set resolves cleanly (`pip install --dry-run`).
- `pip-audit` of the bumped pins → **clean**.

## Documented residual (pre-existing, transitive, NOT introduced by this
PR)
`pip-audit` reports `starlette 0.37.2` (CVE-2024-47874, CVE-2025-54121),
pulled transitively by the **unchanged** `fastapi==0.111.1`. It is **not
a Dependabot alert on these manifests** (requirements.txt doesn't pin
starlette) and is not regressed by this change. Clearing it requires
bumping `fastapi` (out of the flagged set). Optional follow-up if the
manager wants it in scope: `fastapi==0.111.1 → >=0.115` pulls patched
starlette ≥0.41.

## Alerts cleared
~62 (31 omi-linear-app + 31 omi-hive-app).
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.

1 participant