[FIX] Patch frontend Dependabot alerts (axios + transitive deps); drop unused package-lock.json#2038
[FIX] Patch frontend Dependabot alerts (axios + transitive deps); drop unused package-lock.json#2038jaseemjaskp merged 2 commits intomainZipstack/unstract:mainfrom fix/dependabot-frontend-axiosZipstack/unstract:fix/dependabot-frontend-axiosCopy head branch name to clipboard
Conversation
…p package-lock.json - axios 1.13.5 -> 1.16.0 (proxy-auth leak, prototype pollution, ReDoS) - raise caret floors above vulnerable versions: handlebars 4.7.9, js-cookie 3.0.8, happy-dom 20.10.2, vite 7.3.5, vitest 3.2.6 - add overrides for transitive deps: lodash/lodash-es 4.18.0, immutable 4.3.8, socket.io-parser 4.2.6, vite ^7.3.5 (dedupe vite-node) - remove frontend/package-lock.json: the prod image builds with 'bun install --frozen-lockfile' from bun.lock; the npm lockfile was unused and only caused drift + false Dependabot signals - gitignore package-lock.json/yarn.lock to prevent re-adds - repoint docker compose watch trigger to bun.lock
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Summary by CodeRabbitChores
Configuration
WalkthroughThe PR standardizes the frontend to use Bun as the exclusive package manager. Docker compose watch configuration is updated to monitor ChangesBun package manager standardization and dependency updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
| Filename | Overview |
|---|---|
| frontend/package.json | Bumps direct security-relevant deps and adds well-formed overrides block; lodash/lodash-es correctly pinned at 4.18.1 (regression-free version). |
| docker/sample.compose.override.yaml | Corrects the docker compose watch rebuild trigger from the deleted package-lock.json to bun.lock, keeping dev hot-rebuild accurate. |
| frontend/.gitignore | Adds package-lock.json and yarn.lock to gitignore with an explanatory comment, preventing lockfile drift from re-occurring. |
| frontend/bun.lock | Regenerated lockfile reflecting all version bumps and overrides; verified clean with bun install --frozen-lockfile. |
| frontend/package-lock.json | Deleted entirely — this lockfile was unused (production builds via bun) and was the source of false Dependabot signals and lockfile drift. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[bun install --frozen-lockfile] --> B[bun.lock]
B --> C[Production Docker image]
D[package.json overrides] --> E[lodash/lodash-es 4.18.1]
D --> F[immutable 4.3.8]
D --> G[socket.io-parser 4.2.6]
D --> H[vite ^7.3.5]
I[Direct dep bumps] --> J[axios 1.16.0]
I --> K[handlebars ^4.7.9]
I --> L[js-cookie ^3.0.8]
I --> M[vite ^7.3.5 / vitest ^3.2.6]
I --> N[happy-dom ^20.10.2]
O[docker compose watch] -->|rebuild trigger| B
O -->|rebuild trigger| P[package.json]
Q[frontend/.gitignore] -->|ignores| R[package-lock.json / yarn.lock]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[bun install --frozen-lockfile] --> B[bun.lock]
B --> C[Production Docker image]
D[package.json overrides] --> E[lodash/lodash-es 4.18.1]
D --> F[immutable 4.3.8]
D --> G[socket.io-parser 4.2.6]
D --> H[vite ^7.3.5]
I[Direct dep bumps] --> J[axios 1.16.0]
I --> K[handlebars ^4.7.9]
I --> L[js-cookie ^3.0.8]
I --> M[vite ^7.3.5 / vitest ^3.2.6]
I --> N[happy-dom ^20.10.2]
O[docker compose watch] -->|rebuild trigger| B
O -->|rebuild trigger| P[package.json]
Q[frontend/.gitignore] -->|ignores| R[package-lock.json / yarn.lock]
Reviews (2): Last reviewed commit: "[FIX] Bump lodash override 4.18.0 -> 4.1..." | Re-trigger Greptile
jaseemjaskp
left a comment
There was a problem hiding this comment.
Automated review (PR Review Toolkit). Scope is a focused frontend dependency patch (5 files). Verified: bun install --frozen-lockfile is the only install path (frontend.Dockerfile + CI all use bun), there are zero remaining references to package-lock.json or npm ci in the repo, and bun.lock carries a matching overrides block — so deleting the lockfile and adding it to .gitignore is safe. One forward-looking note below; the lodash@4.18.0 regression is already covered by greptile's thread, so not reposting it.
…roken release)
lodash@4.18.0 / lodash-es@4.18.0 are deprecated on npm ("Bad release")
and ship a regression (lodash#6167: template.js throws
"ReferenceError: assignWith is not defined"; fromPairs breaks in modular
builds), which @react-awesome-query-builder/core imports. 4.18.1 is the
fixed, non-deprecated latest.
Pinning the exact override (vs removing it) is required because bun does
not re-resolve already-satisfied lock entries: dropping the override
alone would leave 4.18.0 frozen in bun.lock. The explicit 4.18.1 pin
guarantees the broken release can't survive a future lock regen.
Verified: bun install --frozen-lockfile --ignore-scripts reports no changes.
Frontend Lint Report (Biome)✅ All checks passed! No linting or formatting issues found. |
|
What
Patches the frontend critical/high Dependabot alerts and removes the unused
frontend/package-lock.json.axios1.13.5 → 1.16.0 (proxy-auth credential leak, prototype-pollution gadgets, ReDoS)handlebars4.7.9,js-cookie3.0.8,happy-dom20.10.2,vite7.3.5,vitest3.2.6overridesfor transitive deps that didn't dedupe:lodash/lodash-es4.18.0,immutable4.3.8,socket.io-parser4.2.6, andvite ^7.3.5(forcesvite-node's nested copy off the vulnerable 7.3.1)frontend/package-lock.json— the production image builds withbun install --frozen-lockfilefrombun.lock; the npm lockfile was installed by nothing and only caused lockfile drift + false Dependabot signalspackage-lock.json/yarn.lockto prevent accidental re-addsdocker compose watchrebuild trigger frompackage-lock.json→bun.lockWhy
The frontend had the bulk of the open critical/high npm Dependabot alerts (axios ×11, handlebars critical, vitest critical, vite, etc.). Two committed lockfiles (
bun.lock+package-lock.json) were drifting and onlybun.lockis actually used to build, so the npm one was both useless and misleading.How
bun add/updatefor the direct bumps,overridesinpackage.jsonfor transitive ones, then regeneratedbun.lock.bun install --frozen-lockfile --ignore-scripts(the prod Dockerfile's exact command) passes, andbun run buildsucceeds.Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)
No expected breakage.
package-lock.jsonremoval is safe: no Dockerfile or CI installs from it — the frontend image usesoven/bun+bun install --frozen-lockfileagainstbun.lock, and frontend CI only runs Biome (no install step).Database Migrations
None.
Env Config
None.
Relevant Docs
N/A
Related Issues or PRs
GitHub Dependabot alerts (frontend / npm). Follow-up PRs will cover the Python (
uv.lock) ecosystems.Dependencies Versions
axios 1.16.0 · handlebars 4.7.9 · js-cookie 3.0.8 · happy-dom 20.10.2 · vite 7.3.5 · vitest 3.2.6 · lodash/lodash-es 4.18.0 · immutable 4.3.8 · socket.io-parser 4.2.6
Known remaining (deferred, tracked separately)
picomatch@2.3.1(viahttp-proxy-middleware > micromatch) — bun has no scoped overrides; low risk (dev proxy tooling).tar@6.2.1(viajsdom > canvas > node-pre-gyp) — needs a major 6→7 bump behind an already-invalidcanvaspeer; handled separately.Notes on Testing
bun install --frozen-lockfile --ignore-scripts✓ (no lock drift)bun run build✓biome ci src/— pre-existing warnings only, no new issuesScreenshots
N/A — dependency/build-config only.
Checklist
I have read and understood the Contribution Guidelines.