chore: fix npm dependency vulnerabilities (undici, fast-xml-builder)#1564
chore: fix npm dependency vulnerabilities (undici, fast-xml-builder)#1564yuzurihaaa wants to merge 5 commits into
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
|
Sample run to validate |
| "@actions/core": "^2.0.3", | ||
| "@actions/exec": "^2.0.0", | ||
| "@actions/github": "^6.0.1", | ||
| "@actions/github": "^8.0.1", |
There was a problem hiding this comment.
suggestion: Would it make sense to directly upgrade to 9.1.1?
The Breaking Change doesn't seem to apply to this repo: https://github.com/actions/toolkit/blob/main/packages/github/RELEASES.md#900
There was a problem hiding this comment.
I do want to bump to 9.x but the build will fail. You can refer to this PR #1532 too dependabot bumping to 9.x but failed on CI
Error: Module not found: Error: Package path . is not exported from package /Users/runner/work/setup-node/setup-node/node_modules/@actions/github (see exports field in /Users/runner/work/setup-node/setup-node/node_modules/@actions/github/package.json)
Did you mean './@actions/github'?
Requests that should resolve in the current directory need to start with './'.
Requests that start with a name are treated as module requests and resolve within module directories (node_modules).
If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too.
at /Users/runner/work/setup-node/setup-node/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:23:2001849
at /Users/runner/work/setup-node/setup-node/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:23:389111
at _done (eval at create (/Users/runner/work/setup-node/setup-node/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:21:81694), <anonymous>:9:1)
at eval (eval at create (/Users/runner/work/setup-node/setup-node/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:21:81694), <anonymous>:34:22)
Initially I filed an issue on this, but my goal is to resolve the vulnerabilities reported in my org so this this is the minimum viable change. I do have a branch that upgrade to 9.x but I had to change the build script to use esbuild.
|
on an almost related note. I necro-ed a PR (through my PR) to resolve another vulnerability if someone can review the PR. I can help to do the follow up PR. |
Description
This PR addresses security vulnerabilities identified by Snyk in transitive dependencies.
Upgraded
@actions/githubfrom6.0.1to8.0.1— eliminates 5 vulnerabilities inundici@5.29.0:Updated
fast-xml-builderinpackage-lock.jsonto a patched version — resolves 2 vulnerabilities introduced transitively via@actions/cache > @azure/storage-blob > @azure/core-xml > fast-xml-parser > fast-xml-builder@1.1.4:1.1.51.1.7Before / After:
The only remaining issue is
@actions/glob@0.5.1ReDoS (Medium) — no upstream fix is currently available.Related issue
There are also another PR on
fast-xml-builder. This combines the PR and@actions/githubpackage bump.Check list
Others
npm run testnpm run build