Skip to content

fix(security): refresh vulnerable dependencies and cover web image builds - #7

Merged
KeentGG merged 14 commits into
mainfrom
transition/trust-security
Nov 28, 2026
Merged

KeentGG merged 14 commits into
mainfrom
transition/trust-security

Conversation

@KeentGG

@KeentGG KeentGG commented Nov 28, 2026

Copy link
Copy Markdown
Owner

Why

Upstream PR ngoanpv#113 is the right security work, but its Next 16.3.8 target is stale. This rebuild uses current registry/advisory data and also closes the missing web-image CI build.

Changes

  • Upgrade Next to 16.4.6 and add sharp / source-map-js security floors.
  • Refresh agent dependencies: PyJWT, urllib3, LangGraph SDK, and newly reported transitive advisories.
  • Refresh the optional LightRAG stack, including pypdf >=6.21.4, and smoke-test imports with the rag extra.
  • Copy packages/ee/package.json in the web Docker deps stage.
  • Build the web image in CI's docker-build job.
  • Apply Prettier to three files from our earlier merged PRs so pnpm lint passes.

Verification

  • pnpm install --frozen-lockfile: passed
  • pnpm build --filter @deepinterview/web...: passed
  • Web typecheck: passed
  • Web tests: 16 passed
  • Agent tests: 212 passed, 1 skipped
  • LightRAG tests: 6 passed
  • Agent ruff and pnpm lint: passed
  • Compose configs, agent/lightrag/web Docker builds: passed
  • Trivy filesystem scan: 0 HIGH/CRITICAL vulnerabilities, 0 secrets
  • Accepted risk: DS-0002 — agent image runs as root; deferred follow-up

Full evidence and decisions: WORKLOG.md.

Review focus

  • Dependency and lockfile drift
  • Next 16.4.6 / React compatibility
  • LightRAG optional-stack compatibility
  • CI web-image step and Docker build args

- Next 16.4.6 clears the remaining 16.4.x advisories.
- Override sharp ^0.35.5 and source-map-js ^1.2.2 for their advisories.
- Next regenerated next-env.d.ts for its root-params types.
- pyjwt 2.15.1, urllib3 2.8.0, langgraph-sdk 0.4.14.
- Also refresh aiohttp, certifi, filelock, pillow, pyasn1 and soupsieve;
  Trivy found HIGH/CRITICAL advisories fixed in these releases.
- requires-python >=3.11.5 for soupsieve 3+; images/CI run 3.11.15+.
- Re-resolved starlette 1.10.0, fastapi 0.165.0, cryptography 50.0.2,
  pypdf 7.2.0, lightrag-hku 1.5.8, transformers 5.24.1,
  sentence-transformers 6.3.0, mineru 4.2.3 and gradio 6.32.0.
- pypdf 7.2.0 clears the framework stack's advisories; the rag extra
  remains opt-in and is not installed in the default image.
- Also refresh aiohttp, certifi, filelock, pillow, pyasn1 and soupsieve
  found by Trivy; requires-python >=3.11.5 for soupsieve 3+.
- The web deps stage needs packages/ee/package.json for the frozen
  workspace install; pnpm install failed without it.
- Add a web image build to the docker-build job with compose-default
  public build args and a gha cache scope.
- Capture resolved versions, plan deviations, focused check results,
  the Trivy command/result, and the accepted DS-0002 risk.
- Exact resolver-selected versions import and construct the gated backend.
- Note the skeleton ingest/query limitation and why no pin-back was needed.
- Format prep page, mastery graph, and theme toggle only.
- `pnpm lint` now passes; no behavior change.
- `pnpm lint` now passes after formatting the three web files in ae66eb5.
- setup-python 3.11 + UV_PYTHON=3.11 so uv cannot pick the runner's 3.14;
  refresh setup-uv to v10.4.0.
- Web image build loads a stable tag and smoke-tests /api/health and /.
- Add a pinned Trivy 0.76.2 HIGH/CRITICAL vuln+secret gate; the accepted
  DS-0002 misconfig stays out of the gate.
- Correct the pyproject comments that claimed CI already pinned 3.11.
- Add failed run URL, Python 3.14 root cause, code fixes, and local rechecks.
- Link run 46156714212; build, docker-build, gitleaks and security all passed.
- Run `uv lock --check` for apps/agent before sync and for
  services/lightrag before its pytest step, both under UV_PYTHON=3.11.
- Add f0b7f84 and the exact local `uv lock --check` rechecks.
@KeentGG
KeentGG marked this pull request as ready for review November 28, 2026 15:06
@KeentGG
KeentGG merged commit 89bdf76 into main Nov 28, 2026
4 checks passed
@KeentGG
KeentGG deleted the transition/trust-security branch November 28, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant