Skip to content

fix: pin next.js to 16.1.7 to mitigate CVE risk (closes #103)#104

Open
Ojas2095 wants to merge 2 commits into
tari-project:developmentfrom
Ojas2095:fix/pin-nextjs-cve-16-1-7
Open

fix: pin next.js to 16.1.7 to mitigate CVE risk (closes #103)#104
Ojas2095 wants to merge 2 commits into
tari-project:developmentfrom
Ojas2095:fix/pin-nextjs-cve-16-1-7

Conversation

@Ojas2095
Copy link
Copy Markdown

Closes #103

Pins next and eslint-config-next to exact version 16.1.7 (no caret) to mitigate known CVEs.

  • package.json: next ^16.1.1 -> 16.1.7
  • package.json: eslint-config-next ^16.1.1 -> 16.1.7

This prevents npm/yarn from resolving to any CVE-affected patch/minor releases.

…t#103)

- Changed
ext from ^16.1.1 to 16.1.7 (exact pin, no caret)
- Changed eslint-config-next from ^16.1.1 to 16.1.7 (exact match)
- Prevents npm/yarn from resolving to any CVE-affected patch/minor releases
- Regenerate lock file to reflect exact pinned resolution
@github-actions
Copy link
Copy Markdown

⚠️ This PR contains unsigned commits. To get your PR merged, please sign those commits (git rebase --exec 'git commit -S --amend --no-edit -n' @{upstream}) and force push them to this branch (git push --force-with-lease).

If you're new to commit signing, there are different ways to set it up:

Sign commits with gpg

Follow the steps below to set up commit signing with gpg:

  1. Generate a GPG key
  2. Add the GPG key to your GitHub account
  3. Configure git to use your GPG key for commit signing
Sign commits with ssh-agent

Follow the steps below to set up commit signing with ssh-agent:

  1. Generate an SSH key and add it to ssh-agent
  2. Add the SSH key to your GitHub account
  3. Configure git to use your SSH key for commit signing
Sign commits with 1Password

You can also sign commits using 1Password, which lets you sign commits with biometrics without the signing key leaving the local 1Password process.

Learn how to use 1Password to sign your commits.

Watch the demo

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the versions of next and eslint-config-next in package.json. However, the specified version 16.1.7 does not exist on the npm registry. Feedback was provided to use version 15.1.7 for both packages to ensure compatibility with React 19 and successful dependency resolution.

Comment thread package.json
"i18next-http-backend": "^3.0.2",
"motion": "^12.26.2",
"next": "^16.1.1",
"next": "16.1.7",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

security-high high

The version 16.1.7 for the next package does not exist on the public npm registry. The current latest stable version is 15.1.7. Although the previous version was listed as ^16.1.1, that version also does not exist. Using a non-existent version will cause installation and build failures. Given the project's use of React 19 (as seen in lines 26-27), Next.js 15 is the appropriate major version to use.

Suggested change
"next": "16.1.7",
"next": "15.1.7",

Comment thread package.json
"@walletconnect/ethereum-provider": "^2.23.2",
"eslint": "^9.39.2",
"eslint-config-next": "^16.1.1",
"eslint-config-next": "16.1.7",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

security-high high

The version 16.1.7 for eslint-config-next does not exist on the npm registry. This version should be updated to match the Next.js version (likely 15.1.7) to ensure compatibility and successful dependency resolution.

Suggested change
"eslint-config-next": "16.1.7",
"eslint-config-next": "15.1.7",

@0xskr33p
Copy link
Copy Markdown

Both suggestions above from gemini aren't valid.

  1. Please, rebase and sign your commit;
  2. Also you need to build TU on your own with update wxtm-bridge-frontend repo after your changes and attach screenshots or recording that everything fine;

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.

Mitigate risks due to "next" known CVEs version and current versions range

2 participants