Repository navigation
fix(deps): bump fastapi and starlette for upload DoS advisories - #646
Merged
Merged
Conversation
Starlette 0.36.3 is affected by several advisories, including GHSA-f96h-pmfr-66vw (High, multipart/form-data DoS), which applies directly to /api/upload-project, and GHSA-82w8-qh3p-5jfq (High, request.form() limits ignored). Starlette 1.7.0 fixes every advisory currently listed for the package. FastAPI 0.141.1 is the last release before the OpenTelemetry work and the burst of releases that started on 2026-10-18; it allows starlette>=0.46.0. Also add a post-deploy health check to the Fly workflow so a deploy that boots a broken app fails the job instead of passing silently. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What / why
starlette==0.36.3is affected by several published advisories. Two are High, and both are reachable through/api/upload-project:request.form()limits silently ignoredThis PR bumps:
fastapi0.109.2 → 0.141.1starlette0.36.3 → 1.7.0Starlette 1.7.0 fixes every advisory currently listed for the package: GHSA-f96h-pmfr-66vw, GHSA-82w8-qh3p-5jfq, GHSA-2c2j-9gv5-cj73, GHSA-7f5h-v6xp-fcq8, GHSA-86qp-5c8j-p5mr, GHSA-wqp7-x3pw-xc5r, GHSA-x746-7m8f-x49c and GHSA-jp82-jpqv-5vv3.
Why these exact versions:
opentelemetry-apidependency. It also predates the burst of 30+ releases that began on 2026-10-18. It allowsstarlette>=0.46.0.The PR also adds a post-deploy health check to
.github/workflows/fly.yml. Afterflyctl deploy, it curlshttps://vibegraph-api.fly.dev/api/healthwith up to 6 retries, 10 s apart and 15 s per attempt, which allows for a cold start and gives about 165 s worst case. The job fails if the public URL doesn't answer 200.No application code changes.
How verified
Local Python 3.12 venv with the new pins, the same Python as CI and
Dockerfile.fly:python -m pytest tests/: 650 passed.uvicorn app:appsmoke test:/api/healthreturns 200, a small/api/upload-projectreturns 200 with a graph, and the security headers andX-Request-IDare present.An independent side-by-side review compared the old and new stacks (same app, same other deps). These are identical:
uv pip compilealso resolves cleanly for linux x86_64 / Python 3.12.Behaviour changes to know about
Content-Type: application/json(FastAPI 0.132). All in-repo clients already send it. External scripts or curl calls without the header now get 422./api/chat/streamis no longer gzip-compressed (Starlette 0.46).teacher.stream_chatcurrently yields the whole answer as a single event, so users won't notice a difference.Deploy
Merging deploys to production:
requirements.txtandfly.ymlare both in the Fly workflow'spathsfilter. After the deploy, check:To roll back, revert this commit.
Out of scope / follow-ups
max_files(FastAPI callsrequest.form()with no arguments). This contradictsMAX_UPLOAD_FILES = 10000inapp/routers/upload.py. The cap is the same before and after this bump. fix(upload): skip .git, node_modules and secret files before folder upload #644 reduces how often it is hit by not sending.git/node_modules.setup-flyctl@masteris unpinned.🤖 Generated with Claude Code