Skip to content

Add .trivyignore for npm-bundled CVEs pending upstream fix#73

Merged
codedmart merged 1 commit intomainfrom
sandeep/ignore-npm-cve
Mar 6, 2026
Merged

Add .trivyignore for npm-bundled CVEs pending upstream fix#73
codedmart merged 1 commit intomainfrom
sandeep/ignore-npm-cve

Conversation

@SandeepSamba
Copy link
Contributor

Summary

Trivy image scans are flagging three CVEs that exist inside npm's own bundled dependencies, not in our application code. Because they live within npm itself, we cannot resolve them by updating our package.json — a fix requires a new npm release that ships patched internal versions of minimatch and tar.

This PR adds a .trivyignore to suppress these findings until that upstream fix is available.

Suppressed CVEs

CVE Package Description
CVE-2026-27903 minimatch (bundled in npm) Denial of Service via unbounded recursive backtracking in crafted glob patterns
CVE-2026-27904 minimatch (bundled in npm) Denial of Service via catastrophic backtracking in glob expressions
CVE-2026-29786 tar (bundled in npm) Hardlink path traversal via drive-relative link path

Why we can't fix these now

These packages are shipped as internal dependencies of npm itself (under /usr/lib/node_modules/npm/node_modules/). Upgrading them requires npm to cut a new release with patched versions. There is no action we can take in this repository to resolve them sooner.

Follow-up

Once a fixed npm version is available and deployed in the base image, the ignore entries should be removed. See the TODO comment in .trivyignore.

🤖 Generated with Claude Code

CVE-2026-27903, CVE-2026-27904 (minimatch) and CVE-2026-29786 (tar) are
present in packages bundled inside npm itself, not in our application
dependencies. They cannot be resolved by updating package.json — a fix
requires a new npm release.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codedmart codedmart merged commit f3ea8ee into main Mar 6, 2026
3 checks passed
@codedmart codedmart deleted the sandeep/ignore-npm-cve branch March 6, 2026 13:28
@github-actions github-actions bot mentioned this pull request Mar 6, 2026
3 tasks
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.

2 participants