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 package-lock.json to fix security vulnerability #95

Merged
merged 2 commits into from
Jan 31, 2022

Conversation

giordano
Copy link
Collaborator

@giordano giordano commented Jan 31, 2022

Before:

% npm audit 
# npm audit report

nanoid  <3.1.31
Severity: moderate
Exposure of Sensitive Information to an Unauthorized Actor in nanoid - https://github.com/advisories/GHSA-qrpm-p2h7-hrv2
fix available via `npm audit fix`
node_modules/nanoid
  mocha  8.2.0 - 9.1.4
  Depends on vulnerable versions of nanoid
  node_modules/mocha

node-fetch  <2.6.7
Severity: high
node-fetch is vulnerable to Exposure of Sensitive Information to an Unauthorized Actor - https://github.com/advisories/GHSA-r683-j2x4-v87g
fix available via `npm audit fix`
node_modules/node-fetch

3 vulnerabilities (2 moderate, 1 high)

To address all issues, run:
  npm audit fix

After:

% npm audit     
found 0 vulnerabilities

Close #92.

@giordano giordano requested a review from ageorgou January 31, 2022 12:32
@giordano giordano added the technical Related to VSCode, packaging etc rather than usage label Jan 31, 2022
@ageorgou
Copy link
Contributor

Should we also update the version of node-fetch in package.json? (and maybe of mocha?)
I wonder why the tests in the automated PR #92 failed, unless it was simply a random timeout.

@giordano
Copy link
Collaborator Author

Should we also update the version of node-fetch in package.json? (and maybe of mocha?)

Yes, good catch.

I wonder why the tests in the automated PR #92 failed, unless it was simply a random timeout.

That changed the version of node-fetch from 2.6.5 to 3.1.1, maybe we have to change something else as well. Test were failing in node-fetch, log:

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /home/vsts/work/1/s/node_modules/node-fetch/src/index.js
require() of ES modules is not supported.
require() of /home/vsts/work/1/s/node_modules/node-fetch/src/index.js from /home/vsts/work/1/s/out/client/SOAP_client.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /home/vsts/work/1/s/node_modules/node-fetch/package.json.

@giordano giordano merged commit ce27231 into main Jan 31, 2022
@giordano giordano deleted the fix/update-nanoid branch January 31, 2022 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical Related to VSCode, packaging etc rather than usage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants