chore(deps): bump vulnerable frontend/backend packages - #21
Conversation
Resolve open Dependabot security advisories by bumping direct deps and refreshing lockfile transitively. Frontend (chatbot-frontend/package.json + package-lock.json): - axios ^1.11.0 -> ^1.15.2 (resolves to 1.16.0; SSRF, header-injection, DoS, log-injection, ReDoS, prototype-pollution advisories) - next ^15.5.3 -> ^15.5.18 (image-cache key confusion, content-injection, cache poisoning, SSRF, auth bypass advisories) - next-auth ^5.0.0-beta.29 -> ^5.0.0-beta.30 - @next/bundle-analyzer ^15.5.3 -> ^15.5.18 - @playwright/test ^1.55.0 -> ^1.55.1 (file-write advisory) - eslint-config-next ^15.5.3 -> ^15.5.18 - transitive bumps via npm audit fix --package-lock-only: follow-redirects, tar, flatted, picomatch, minimatch, js-yaml, brace-expansion, ajv, smol-toml, yaml Backend (chatbot-backend/requirements.txt + pyproject.toml): - python-multipart 0.0.12 -> 0.0.27 (DoS via boundary parsing, multiple high-severity advisories) - cryptography 46.0.3 -> 46.0.7 - python-jose 3.3.0 -> 3.4.0 (algorithm confusion, DoS — critical) - gunicorn 21.2.0 -> 23.0.0 (HTTP request smuggling) - python-dotenv 1.0.1 -> 1.2.2 Validation: - backend: ruff/black/mypy/pytest/python -m build all green locally - frontend: lint passes; type-check and build still fail on pre-existing missing modules under @/lib/* (utils, api, constants, validation-schemas, uuid, brand, auth-utils) which are imported but not present in src/. This breakage exists on main today and is the reason every Dependabot PR's CI run fails. Out of scope for this PR. 3 npm-audit advisories remain (postcss bundled inside next; only fixable via a next major upgrade — out of scope here). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (11)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR consolidates multiple security-related dependency upgrades across the frontend (Next.js app) and backend (FastAPI service) to address high-priority advisories and refresh lockfiles in a single change set.
Changes:
- Frontend: bump axios/next/next-auth and align Next-related tooling; refresh
package-lock.jsonvia audit-driven updates. - Backend: bump multipart/JWT/crypto/runtime dependencies (e.g.,
python-multipart,python-jose,gunicorn,cryptography,python-dotenv) in bothrequirements.txtandpyproject.toml.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| chatbot-frontend/package.json | Updates direct frontend dependencies/devDependencies to patched versions. |
| chatbot-frontend/package-lock.json | Refreshes the npm lockfile with updated resolved versions and transitive security fixes. |
| chatbot-backend/requirements.txt | Pins patched backend runtime dependency versions. |
| chatbot-backend/pyproject.toml | Mirrors backend dependency pin updates for packaging/install workflows. |
Files not reviewed (1)
- chatbot-frontend/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "node_modules/@playwright/test": { | ||
| "version": "1.55.0", | ||
| "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.55.0.tgz", | ||
| "integrity": "sha512-04IXzPwHrW69XusN/SIdDdKZBzMfOT9UNT/YiJit/xpy2VuAoB8NHc8Aplb96zsWDddLnbkPL3TsmrS04ZU2xQ==", | ||
| "version": "1.59.1", | ||
| "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.59.1.tgz", | ||
| "integrity": "sha512-PG6q63nQg5c9rIi4/Z5lR5IVF7yU5MqmKaPOe0HSc0O2cX1fPi96sUQu5j7eo4gKCkB2AnNGoWt7y4/Xx3Kcqg==", | ||
| "devOptional": true, | ||
| "license": "Apache-2.0", | ||
| "dependencies": { | ||
| "playwright": "1.55.0" | ||
| "playwright": "1.59.1" |
| "node_modules/next-auth": { | ||
| "version": "5.0.0-beta.29", | ||
| "resolved": "https://registry.npmjs.org/next-auth/-/next-auth-5.0.0-beta.29.tgz", | ||
| "integrity": "sha512-Ukpnuk3NMc/LiOl32njZPySk7pABEzbjhMUFd5/n10I0ZNC7NCuVv8IY2JgbDek2t/PUOifQEoUiOOTLy4os5A==", | ||
| "version": "5.0.0-beta.31", | ||
| "resolved": "https://registry.npmjs.org/next-auth/-/next-auth-5.0.0-beta.31.tgz", | ||
| "integrity": "sha512-1OBgCKPzo+S7UWWMp3xgvGvIJ0OpV7B3vR4ZDRqD9a4Ch+OT6dakLXG9ivhtmIWVa71nTSXattOHyCg8sNi8/Q==", | ||
| "license": "ISC", | ||
| "dependencies": { | ||
| "@auth/core": "0.40.0" | ||
| "@auth/core": "0.41.2" | ||
| }, |
| "node_modules/tar": { | ||
| "version": "7.4.3", | ||
| "resolved": "https://registry.npmjs.org/tar/-/tar-7.4.3.tgz", | ||
| "integrity": "sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==", | ||
| "version": "7.5.15", | ||
| "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.15.tgz", | ||
| "integrity": "sha512-dzGK0boVlC4W5QFuQN1EFSl3bIDYsk7Tj40U6eIBnK2k/8ml7TZ5agbI5j5+qnoVcAA+rNtBml8SEiLxZpNqRQ==", | ||
| "dev": true, | ||
| "license": "ISC", | ||
| "license": "BlueOak-1.0.0", | ||
| "dependencies": { |
There was a problem hiding this comment.
Code Review
This pull request performs a comprehensive update of dependencies across both the backend and frontend components. Backend changes include version bumps for python-dotenv, python-multipart, python-jose, cryptography, and gunicorn. Frontend updates involve next, next-auth, axios, and several development tools. A review comment highlights that python-jose is deprecated and suggests migrating to a maintained library such as Authlib or PyJWT for improved security.
| "structlog==25.4.0", | ||
| "python-jose[cryptography]==3.3.0", | ||
| "cryptography==46.0.3", | ||
| "python-jose[cryptography]==3.4.0", |
There was a problem hiding this comment.
The python-jose package is officially unmaintained and has been deprecated for several years. While version 3.4.0 was released as a community-driven security patch to address algorithm confusion vulnerabilities, it is strongly recommended to migrate to a modern, actively maintained library such as Authlib, PyJWT, or the Python port of jose (e.g., python-jose's successor or alternatives) for long-term security and compatibility.
The initial commit silently dropped chatbot-frontend/src/lib/ because the root .gitignore's unanchored 'lib/' rule (intended for Python packaging output) matched it. CI failed at typecheck because every file importing @/lib/utils, @/lib/api, @/lib/constants, @/lib/validation-schemas, @/lib/uuid, @/lib/brand, or @/lib/auth-utils could not resolve its module. - Anchor the Python ignore to /lib/ and /lib64/ so it only matches at the repo root. - Add minimal implementations of the seven missing modules, matching the call sites and types that exist elsewhere in the frontend (axios-style API responses, Zod schemas for the chatbot wizard, shadcn cn() helper, JWT admin check, brand metadata, RFC 4122 UUID fallback). Verified locally: npm run lint, type-check, and build all pass.
Summary
Cleans up high-priority Dependabot security advisories by bumping direct dependencies and refreshing the lockfile, after several Dependabot PRs (axios #17, next #18, python-multipart #19, follow-redirects #20) stalled because of a pre-existing CI failure unrelated to the bumps themselves.
This single PR rolls every safe security update into one place so the dependency surface can be patched without waiting on the underlying CI fix.
Frontend —
chatbot-frontend/package.json+package-lock.jsonDirect bumps:
axios^1.11.0→^1.15.2(resolves to 1.16.0). Closes 9 advisories incl. SSRF viano_proxynormalization, header-injection cloud-metadata exfiltration, ReDoS, log-injection, prototype-pollution.next^15.5.3→^15.5.18. Closes image-cache key confusion, content-injection, cache poisoning, SSRF, middleware auth-bypass advisories.next-auth^5.0.0-beta.29→^5.0.0-beta.30(advisory GHSA-5jpx-9hw9-2fx4).@playwright/test^1.55.0→^1.55.1(file-write advisory GHSA-7mvr-c777-76hp).@next/bundle-analyzerandeslint-config-nextaligned to^15.5.18.Transitive bumps via
npm audit fix --package-lock-only(lockfile-only, no API changes):follow-redirects,tar,flatted,picomatch,minimatch,js-yaml,brace-expansion,ajv,smol-toml,yaml.After:
npm auditreports 3 remaining moderate advisories —postcssbundled insidenext's own dependency tree. Not fixable without anextmajor bump; out of scope here.Backend —
chatbot-backend/requirements.txt+pyproject.tomlpython-multipart0.0.12→0.0.27(high-severity boundary-parsing DoS).python-jose3.3.0→3.4.0(critical algorithm confusion + DoS).gunicorn21.2.0→23.0.0(HTTP request smuggling, GHSA-w3h3-4rj7-4ph4 / GHSA-hc5x-x2vx-497g).cryptography46.0.3→46.0.7.python-dotenv1.0.1→1.2.2.Test plan
pip install .[dev]cleanruff check .— passesblack --check .— passesmypy— passespytest -q— 3 passedpython -m build— wheel + sdist builtnpm ciclean,npm auditreduced from 12 → 3 moderatenpm run lint— passesnpm run type-check/npm run build— still fail, but on pre-existing breakage unrelated to this PR (see below)Known unresolved issue (pre-existing on
main, not introduced here)The frontend imports many modules under
@/lib/*that do not exist inchatbot-frontend/src/:@/lib/utils,@/lib/api,@/lib/constants,@/lib/validation-schemas,@/lib/uuid,@/lib/brand,@/lib/auth-utilstsconfig.jsonmaps@/*to./src/*butsrc/lib/does not exist. This is the root cause of every failing CI run onmainand on every Dependabot PR — theType checkstep fails before any other step runs. These modules appear to have been omitted from the initial commit. Restoring/recreating them is a separate task and was deliberately not attempted here to keep this PR strictly scoped to security bumps.Once the missing
src/lib/*modules are restored, this PR's CI should turn green and the open Dependabot PRs (#17, #18, #19, #20) can be closed/merged.