fix: mark MAL- advisories as unverifiable when package resolves from a private registry#588
Merged
sonukapoor merged 12 commits intoJun 9, 2026
Conversation
…dd missing CVE test case
… fix nested ternary
…- output for private registry packages
…-scan test for mal-private-registry
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a project pulls packages from a private registry (Artifactory, GitHub Packages, a corporate npm proxy), CVE Lite CLI was surfacing MAL- advisories for packages that share a name with known-malicious public npm packages but are completely different artifacts. The resolved URL in the lockfile points to the private registry, not npm, but the tool had no way to distinguish them.
Reported with three specific advisory IDs from a real enterprise environment where all three packages were pinned to trusted internal sources and confirmed non-malicious.
What changed
PackageRefgainsresolvedUrl?: string- populated from theresolvedfield inpackage-lock.json(v3 lockfiles only; Yarn/pnpm follow-up in separate PRs)resolvedUrldoes not start withhttps://registry.npmjs.org/, the finding is markedmaliciousUnverifiable: trueUnverifiable (private source)instead of redMalicious, with a message explaining the advisory could not be confirmed for this artifactbadge-warningbadge with a tooltip explaining the uncertaintyWhat is NOT changed
maliciousUnverifiableflag is only ever set totrue- never tofalseTests
resolvedUrlpreserved frompackage-lock.jsonresolved fieldgetRecommendedActionreturns unverifiable message for private registry findingsCloses #586