fix(deps): upgrade PyJWT, starlette, fastapi + 4 more for HIGH CVEs - #833
Merged
Conversation
Trivy began failing every Docker build on 7 newly published HIGH vulnerabilities in locked Python dependencies: - PyJWT 2.12.1 -> 2.13.0 CVE-2026-48526 (auth bypass via forged token) - joserfc 1.6.5 -> 1.7.3 CVE-2026-49852 (+1; empty HMAC key accepted) - lxml-html-clean 0.4.4 -> 0.4.5 CVE-2026-49825 (javascript: URLs not stripped) - python-multipart 0.0.27 -> 0.0.32 CVE-2026-53539 (DoS) - starlette 0.52.1 -> 1.3.1 CVE-2026-48818 (SSRF/NTLM), CVE-2026-54283 (form() limits ignored) Unblocking starlette required two co-upgrades: fastapi 0.136.0 -> 0.139.2 and prometheus-fastapi-instrumentator 7.1.0 -> 8.0.2 (7.x capped starlette <1.0). lxml 6.1.0 -> 6.1.1 (lxml-html-clean 0.4.5 requires it). Lockfile-only change; no pyproject constraints needed. Full verify suite passes: 2134 tests, lint, typecheck, doc-sync. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A second Trivy run flagged cryptography 46.0.7 (HIGH, fixed in 48.0.1) — the advisory landed in the vulnerability DB between scans. Full verify suite passes: 2134 tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 19, 2026
manavgup
added a commit
that referenced
this pull request
Jul 19, 2026
CVE-2026-52869 (HIGH, fixed in 1.27.2) was published after #833 went green, failing the Trivy scan on main's post-merge Docker build — which skipped the deploy — and on PR #832's rebased checks. Lockfile-only bump; full verify passes (2134 tests). Co-authored-by: manavgup <manavgup@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
github-actions Bot
pushed a commit
that referenced
this pull request
Jul 19, 2026
Three times in four days a freshly published advisory failed the Trivy scan on code that was green at review time (#833's two rounds, then CVE-2026-52869 against mcp blocking the post-#833 deploy and #832). A hard fail-on-publish gate freezes every in-flight merge on findings unrelated to the change being merged. Add an OPA ignore policy: HIGH vulnerabilities published within the last 7 days are ignored, leaving a window to bump the dependency in an orderly PR. After 7 days the scan fails as before, so nothing can be ignored indefinitely. CRITICAL findings are never ignored, and findings without a parseable PublishedDate fail closed. Verified locally with trivy 0.70: the 7-day window still reports old HIGH CVEs on python:3.11-slim, and a test 10-year window suppresses them — confirming the rule keys on Severity + PublishedDate. Also add .trivyignore and .github/trivy/** to the workflow's path filters so editing scan-ignore rules re-triggers the scan. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
manavgup
added a commit
that referenced
this pull request
Jul 19, 2026
Three times in four days a freshly published advisory failed the Trivy scan on code that was green at review time (#833's two rounds, then CVE-2026-52869 against mcp blocking the post-#833 deploy and #832). A hard fail-on-publish gate freezes every in-flight merge on findings unrelated to the change being merged. Add an OPA ignore policy: HIGH vulnerabilities published within the last 7 days are ignored, leaving a window to bump the dependency in an orderly PR. After 7 days the scan fails as before, so nothing can be ignored indefinitely. CRITICAL findings are never ignored, and findings without a parseable PublishedDate fail closed. Verified locally with trivy 0.70: the 7-day window still reports old HIGH CVEs on python:3.11-slim, and a test 10-year window suppresses them — confirming the rule keys on Severity + PublishedDate. Also add .trivyignore and .github/trivy/** to the workflow's path filters so editing scan-ignore rules re-triggers the scan. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
manavgup
added a commit
that referenced
this pull request
Jul 19, 2026
Three times in four days a freshly published advisory failed the Trivy scan on code that was green at review time (#833's two rounds, then CVE-2026-52869 against mcp blocking the post-#833 deploy and #832). A hard fail-on-publish gate freezes every in-flight merge on findings unrelated to the change being merged. Add an OPA ignore policy: HIGH vulnerabilities published within the last 7 days are ignored, leaving a window to bump the dependency in an orderly PR. After 7 days the scan fails as before, so nothing can be ignored indefinitely. CRITICAL findings are never ignored, and findings without a parseable PublishedDate fail closed. Verified locally with trivy 0.70: the 7-day window still reports old HIGH CVEs on python:3.11-slim, and a test 10-year window suppresses them — confirming the rule keys on Severity + PublishedDate. Also add .trivyignore and .github/trivy/** to the workflow's path filters so editing scan-ignore rules re-triggers the scan. Co-authored-by: manavgup <manavgup@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
Problem
The Docker CVE scan (Trivy) started failing on every branch — including #832, which doesn't touch the image at all. Seven HIGH vulnerabilities were newly published against packages in
uv.lock. The most serious is real for this app: PyJWT 2.12.1 authentication bypass via forged tokens (CVE-2026-48526) — WikiMind's entire auth layer verifies PyJWT-signed tokens.Solution
Lockfile-only upgrade of the affected packages (all are
>=pins in pyproject, so no constraint changes needed):javascript:URLs not strippedTwo co-upgrades were required to unblock starlette 1.x: fastapi 0.136.0 → 0.139.2 and prometheus-fastapi-instrumentator 7.1.0 → 8.0.2 (the 7.x line caps
starlette<1.0.0). And lxml 6.1.0 → 6.1.1 because lxml-html-clean 0.4.5 requires it.Verification
make verifypasses locally on the upgraded stack: 2134 passed, 4 skipped — lint, format, typecheck, doc-sync all green. The starlette major bump (0.52 → 1.3) is the risk item; the full suite exercising 138 endpoints passes.Notes
🤖 Generated with Claude Code