fix(backend): remediate Dependabot vulns — 8 dependency bumps#10129
Conversation
8ee2307 to
5146dae
Compare
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks for taking on the backend security dependency cleanup — the version bumps are pointed at real risky surfaces and the backend CI is green.
I do need to request changes before this is merge-ready: the Starlette/FastAPI templating migration appears incomplete. This PR updates three TemplateResponse call sites to the new TemplateResponse(request, name, context) shape, but there are still old-shape calls that will be exercised under the new Starlette/FastAPI stack:
backend/routers/task_integrations.py:87still callstemplates.TemplateResponse('oauth_callback.html', context)backend/routers/oauth.py:110still callstemplates.TemplateResponse("oauth_authenticate.html", {...})backend/routers/mcp_sse.py:1568still callstemplates.TemplateResponse("mcp_oauth_authorize.html", {...})
Please update those remaining template responses (and add/extend a focused test or smoke coverage for these OAuth/MCP/template routes if practical) so the dependency bump does not leave less-traveled auth/integration flows broken.
I did not see signs of a malicious supply-chain change in the patch, and the lockfile entries include pinned hashes from PyPI. Because this is a backend security/dependency PR with a major Starlette boundary, it still needs dependency/security-aware maintainer review after the missed migration call sites are fixed.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
|
Migrated the three remaining |
kodjima33
left a comment
There was a problem hiding this comment.
Chore: dependabot vuln remediation (backend, 8 dep bumps) — approve only per policy (backend deps, Nik owns deploy)
|
Backend coverage is genuinely green: unit suite, hermetic E2E, both gauntlets, and all image smokes passed, which matters given the starlette 0.x to 1.x jump and the TemplateResponse migration. The Desktop Swift Test Suites failure is stale-branch drift, not this PR: AgentSyncService.startForTesting exists on current main but not on this branch's merge base. The branch also has conflicts with main, so it needs a rebase anyway, which should clear the Swift job too. |
f3d5720 to
c479e01
Compare
e4ab870 to
b8a70df
Compare
Bump packages in backend/requirements.txt to resolve open security alerts: | Package | Was | Now | Severity | |---------|-----|-----|----------| | starlette | 0.49.1 | 1.3.1 | HIGH — SSRF, form DoS, Host header bypass | | fastapi | 0.121.0 | 0.134.0 | cascade for starlette 1.x | | fastapi-cli | 0.0.5 | 0.0.8 | cascade for fastapi 0.134 | | typer | 0.12.3 | 0.15.4 | cascade for fastapi-cli 0.0.8 | | PyJWT | 2.12.0 | 2.13.0 | HIGH — HMAC key confusion, algorithm bypass | | tornado | 6.5.5 | 6.5.7 | HIGH — auth header leak, gzip bomb | | python-multipart | 0.0.27 | 0.0.31 | HIGH — quadratic-time DoS | | cryptography | 46.0.7 | 48.0.1 | HIGH — bundled OpenSSL vuln | | aiohttp | 3.13.4 | 3.14.1 | MED — CRLF injection, cookie leak | Lockfiles regenerated via backend/scripts/update-python-lock.sh for all 5 platform targets (linux x86_64, macOS arm64, macOS x86_64, Windows). Failure-Class: none Closes: #7327 (partial) Related: #7145
Starlette 1.x changed TemplateResponse signature from:
TemplateResponse(name, {'request': request, ...})
to:
TemplateResponse(request, name, {...})
Pass 'request' as first positional arg and remove it from context dict.
3 call sites fixed:
- backend/routers/auth.py (2 sites)
- backend/routers/integrations.py (1 site)
Failure-Class: none
Failure-Class: none
Failure-Class: none
Omit expires_at from the processed patch so memory_apply keeps the capture-time short-term expiry instead of rebasing it from process time. Failure-Class: none
Scope step uses set -euo pipefail and references GH_TOKEN and GITHUB_REPOSITORY for supersession API proofs. Unit tests run this script in a local git repo without GitHub tokens, causing unbound variable failures. Wrap the API section in a GH_TOKEN/GITHUB_REPOSITORY existence guard so hermetic tests skip to the parent-diff path. Failure-Class: none
Scope step uses set -euo pipefail and references GH_TOKEN and GITHUB_REPOSITORY for supersession API proofs. Unit tests run this script in a local git repo without GitHub tokens, causing unbound variable failures. Wrap the API section in a GH_TOKEN/GITHUB_REPOSITORY existence guard so hermetic tests skip to the parent-diff path. Failure-Class: none
Failure-Class: none
b8a70df to
846e548
Compare
|
Thanks for the follow-up fixes. I rechecked the current head (
I also found no remaining old-shape I’m still not formally approving because this remains a backend security/dependency PR across FastAPI/Starlette/PyJWT/cryptography/etc. Please keep the dependency/security review labels until a human maintainer is comfortable with the dependency boundary and release risk. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
Part of #7327, #7145
Result
Bumps 8 packages in
backend/requirements.txtto resolve open Dependabot alerts. All 5 platform lockfiles regenerated.Starlette 0.x → 1.x migration
The biggest change is starlette 0.49→1.3. Direct imports are stable across this boundary:
starlette.websockets.WebSocketStatestarlette.datastructures.MutableHeaders,UploadFilestarlette.types.Message,Receive,Scope,Sendstarlette.responses.Responsestarlette.formparsers.MultiPartParserstarlette.requests.RequestOne breaking change found and fixed:
TemplateResponse(request, name, context)— starlette 1.x movesrequestfrom the context dict to the first positional arg. Fixed in:backend/routers/auth.py(2 call sites)backend/routers/integrations.py(1 call site)The custom
max_part_sizedecorator inutils/multipart.pyusesstarlette.formparserswhich is unchanged.Validation
backend/scripts/update-python-lock.sh(all 5 platforms)Remaining Dependabot alerts
~400+ alerts remain from plugin
requirements.txtfiles (community sample plugins, not deployed) and stale npm manifests. Those are lower priority and should be addressed separately or dismissed as not-applicable.Failure-Class: none
Closes: #7327 (partial — backend)
Related: #7145
Product invariants affected