Skip to content

Fix: Vite and lodash related security vulnerability#245

Merged
b1ink0 merged 3 commits intomainfrom
fix/security-vuls-vite-lodash
Apr 20, 2026
Merged

Fix: Vite and lodash related security vulnerability#245
b1ink0 merged 3 commits intomainfrom
fix/security-vuls-vite-lodash

Conversation

@b1ink0
Copy link
Copy Markdown
Collaborator

@b1ink0 b1ink0 commented Apr 15, 2026

Description

This PR fixes Vite and lodash related security vulnerability.

Checklist

  • I have thoroughly tested this code to the best of my abilities.
  • I have reviewed the code myself before requesting a review.
  • This code is covered by unit tests to verify that it works as intended.
  • The QA of this PR is done by a member of the QA team (to be checked by QA).

Fixes:

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates dependency resolution to address reported security advisories related to Vite and lodash in the frappe-ui-react monorepo.

Changes:

  • Add pnpm overrides to force patched versions of lodash and vite.
  • Update the lockfile to resolve to vite@7.3.2 and lodash@4.18.1 (and propagate the new Vite resolution across dependent tooling like Storybook/Vitest).

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
package.json Adds pnpm overrides entries for lodash and Vite to mitigate reported vulnerabilities.
pnpm-lock.yaml Applies the overrides in the resolved dependency graph, updating Vite/lodash versions and their downstream resolutions.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

@b1ink0 b1ink0 marked this pull request as ready for review April 15, 2026 08:27
@b1ink0 b1ink0 requested review from ayushnirwal and mohdsayed April 15, 2026 08:27
@ayushnirwal
Copy link
Copy Markdown
Collaborator

Where is lodash used even?

@b1ink0
Copy link
Copy Markdown
Collaborator Author

b1ink0 commented Apr 15, 2026

Where is lodash used even?

@ayushnirwal Its a transitive dependancy:

Transitive dependency lodash 4.17.23 is introduced via
babel-plugin-styled-components 2.1.4 lodash 4.17.23

@ayushnirwal
Copy link
Copy Markdown
Collaborator

I don't remember seeing styled components any where in the project. Can you check

@b1ink0
Copy link
Copy Markdown
Collaborator Author

b1ink0 commented Apr 15, 2026

I don't remember seeing styled components any where in the project. Can you check

Removed the usage of styled-components completely and also removed unnecessary dependencies.

ayushnirwal
ayushnirwal previously approved these changes Apr 16, 2026
Copy link
Copy Markdown
Collaborator

@ayushnirwal ayushnirwal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Merge the changes to develop after this is merged.

@b1ink0
Copy link
Copy Markdown
Collaborator Author

b1ink0 commented Apr 20, 2026

Updated PR to fix new security vulnerability introduced due to dompurify: https://github.com/rtCamp/frappe-ui-react/security/dependabot/39

@b1ink0 b1ink0 merged commit 3dc76a1 into main Apr 20, 2026
4 checks passed
@b1ink0 b1ink0 deleted the fix/security-vuls-vite-lodash branch April 20, 2026 06:00
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.

3 participants