fix: resolve 8 Snyk security findings in backend deps#6
Conversation
- cryptography>=46.0.5 (CVSS 8.2, Insufficient Verification) - scikit-learn>=1.5.0 (CVSS 5.3, Sensitive Data Storage) - h11>=0.16.0 (CVSS 9.3, HTTP Request Smuggling) - anyio>=4.4.0 (CVSS 8.3, Race Condition) - zipp>=3.19.1 (CVSS 6.9, Infinite Loop) - numpy>=1.22.2 (3x Low findings)
Greptile SummaryThis PR addresses 8 Snyk security findings in the backend Python dependencies by raising minimum version floors on two direct deps ( Key points:
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
subgraph Direct["Direct Dependencies (requirements.txt)"]
fastapi["fastapi >=0.109.0"]
uvicorn["uvicorn[standard] >=0.27.0"]
httpx["httpx (unpinned)"]
crypto["cryptography >=46.0.5 ✅"]
sklearn["scikit-learn >=1.5.0 ✅"]
end
subgraph Transitive["Pinned Transitive Deps (newly added floors)"]
h11["h11 >=0.16.0 ✅\nCVSS 9.3 - HTTP Request Smuggling"]
anyio["anyio >=4.4.0 ✅\nCVSS 8.3 - Race Condition"]
zipp["zipp >=3.19.1 ✅\nCVSS 6.9 - Infinite Loop"]
numpy["numpy >=1.22.2 ✅\nCVSS ~5 - Buffer Overflow / DoS"]
end
fastapi -->|via starlette| anyio
uvicorn -->|transport| h11
httpx -->|transport| h11
sklearn -->|numeric| numpy
fastapi -->|used by| httpx
uvicorn -->|async runtime| anyio
zipp -.->|importlib-metadata| fastapi
Last reviewed commit: "fix: bump dependenci..." |
backend/requirements.txt
Outdated
| cryptography>=42.0.0 | ||
| cryptography>=46.0.5 | ||
| apscheduler>=3.10.0 | ||
| httpx |
There was a problem hiding this comment.
httpx lacks a minimum version constraint
httpx is an active direct dependency (used in main.py via httpx.Client) but has no minimum version pinned. This is inconsistent with the rest of this PR's intent to enforce safe floors on all relevant packages.
While pip's global resolver will enforce h11>=0.16.0 regardless of what httpx requests internally, httpx itself has had security-relevant fixes across its release history. Adding a minimum version ensures reproducibility and avoids accidentally resolving to a very old release in constrained environments.
Consider adding a minimum version, e.g.:
| httpx | |
| httpx>=0.27.0 |
Summary
Bumps backend Python dependencies to resolve all 8 Snyk findings.
Critical/High
Medium
Low
Transitive deps (h11, anyio, zipp, numpy) are pinned explicitly to guarantee minimum safe versions.