Skip to content

[P0] Remediate backend dependency vulnerabilities with compatibility coverage #4

Description

@fxbin

Parent: #2

Problem

The security job on current main fails pip-audit. This blocks a trusted baseline and indicates the pinned dependency set is stale relative to known advisories.

Evidence

Actions run 31603354158 reported 69 vulnerability findings across 7 resolved packages. Observed affected packages include authlib, cryptography, pypdf, python-multipart, and starlette (the latter may be transitive through FastAPI).

Current direct pins include FastAPI 0.115.6, Authlib 1.3.2, cryptography 44.0.0, pypdf 5.1.0 and python-multipart 0.0.20.

WorkOrder

Worker: Backend / Security
Verifier: independent Backend/QA verifier

Scope

  1. Capture the complete pip-audit package/advisory/fixed-version matrix from a clean environment.
  2. Classify each finding: direct vs transitive, reachable vs non-reachable, upgrade path and compatibility risk.
  3. Upgrade in the smallest compatible groups; avoid a blind all-at-once dependency bump.
  4. Add/execute focused regression coverage for authentication/OAuth, multipart uploads, PDF ingestion, HTTP/TLS paths and FastAPI/Starlette request handling.
  5. Re-run full backend tests, migration checks and security job.
  6. Document any accepted exception with advisory ID, rationale, expiry/revisit trigger and owner; do not simply suppress globally.

Acceptance criteria

  • Clean pip-audit passes, or every residual finding has an explicit narrowly-scoped, time-bounded disposition reviewed by Verifier.
  • Authentication/OAuth smoke tests pass.
  • File upload/PDF ingestion smoke tests pass.
  • API request/response compatibility tests pass after FastAPI/Starlette changes.
  • Migration and backend regression suites pass.
  • PR documents dependency deltas and rollback strategy.

Risks

Major/minor dependency jumps can introduce behavioral changes in ASGI middleware, crypto/token handling and parsers. Split upgrades when compatibility evidence is weak.

Rollback

Keep each dependency group in a revertible commit/PR slice where practical; no schema migration should be bundled into this issue.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions