Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ws package version to fix DOS vulnerability #1635

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

bgrgicak
Copy link
Collaborator

@bgrgicak bgrgicak commented Jul 22, 2024

Motivation for the change, related issues

Updates the ws dependency to remove high-severity DOS vulnerability from the @php-wasm/node package.

Fixes #1578.

Implementation details

This PR adds the latest version of ws to overrides which fixes the NPM vulnerability.

Alternatively, we could have updated the packages that use ws but that requires an update to Docusaurus packages. In my testing updating Docusaurus broke our docs build and I couldn't find a quick fix.

Testing Instructions (or ideally a Blueprint)

  • CI

@bgrgicak
Copy link
Collaborator Author

To test the docs build:

cd packages/docs/site
npx docusaurus build --out-dir ../../../dist/docs/build

@bgrgicak bgrgicak changed the base branch from trunk to remove/puzzle-app-package July 23, 2024 07:03
Base automatically changed from remove/puzzle-app-package to trunk July 23, 2024 08:05
An error occurred while trying to automatically change base from remove/puzzle-app-package to trunk July 23, 2024 08:05
@bgrgicak
Copy link
Collaborator Author

bgrgicak commented Jul 23, 2024

I took some time but couldn't make any progress on this.

When I run npx docusaurus build --out-dir ../../../dist/docs/build it returns an error:

Error: MDX compilation failed for file "/Users/ME/wordpress-playground/packages/docs/site/docs/11-architecture/16-wordpress-database.md"
Cause: Unexpected character `-` (U+002D) before name, expected a character that can start a name, such as a letter, `$`, or `_`
Details:
{
  "column": 36,
  "message": "Unexpected character `-` (U+002D) before name, expected a character that can start a name, such as a letter, `$`, or `_`",
  "line": 5,
  "name": "5:36",
  "place": {
    "line": 5,
    "column": 36,
    "offset": 69,
    "_index": 0,
    "_bufferIndex": 32
  },
  "reason": "Unexpected character `-` (U+002D) before name, expected a character that can start a name, such as a letter, `$`, or `_`",
  "ruleId": "unexpected-character",
  "source": "micromark-extension-mdx-jsx",
  "url": "https://github.com/micromark/micromark-extension-mdx-jsx#unexpected-character-at-expected-expect"
}

Website builds also started failing with type errors related to @wordpress/components.

@bgrgicak bgrgicak force-pushed the fix/1580-fix-npm-vulnerabilities branch from fb44331 to 44d2cff Compare July 23, 2024 19:17
@adamziel
Copy link
Collaborator

This is related to issue #1578. @bgrgicak let's keep the links in the description, otherwise it's difficult to reason about the context.

@bgrgicak
Copy link
Collaborator Author

This is related to issue #1578. @bgrgicak let's keep the links in the description, otherwise it's difficult to reason about the context.

Sure, I just opened a draft and planned to finish it soon, but got stuck.

@bgrgicak bgrgicak force-pushed the fix/1580-fix-npm-vulnerabilities branch from 95552a0 to 4644ba0 Compare July 31, 2024 05:37
@bgrgicak bgrgicak changed the title Fix NPM vulnerabilities Fix ws NPM vulnerability in @php-wasm/node Jul 31, 2024
@bgrgicak bgrgicak marked this pull request as ready for review July 31, 2024 05:56
@bgrgicak bgrgicak requested a review from a team as a code owner July 31, 2024 05:56
@adamziel adamziel changed the title Fix ws NPM vulnerability in @php-wasm/node Update ws package version to fix DOS vulnerability Jul 31, 2024
@adamziel adamziel merged commit a0eec0d into trunk Jul 31, 2024
5 checks passed
@adamziel adamziel deleted the fix/1580-fix-npm-vulnerabilities branch July 31, 2024 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

php-wasm/node : 2 high severity vulnerabilities
2 participants