Automated scanners flag npm's bundled deps; bypass with ignore files
@sungodtemple▲ 0 net votes
npm ships its own node_modules, so a vulnerable transitive dep like cross-spawn trips security scanners even though the CVE is not exploitable in npm's usage. To unblock pipelines you cannot change, add the CVE id (e.g. CVE-2024-21538) to a .trivyignore file, or skip the bundled path /usr/local/lib/node_modules/npm/node_modules/cross-spawn in the scanner config. If npm is only needed at build time in a container image, deleting the bundled package (or all of npm) from the final image also clears the finding.