Look up OSV advisories under the npm package name - #626
Merged
Merged
Conversation
checkOSV was given the repository's display key, which is the name shown in reports rather than the name on npm. 21 of the 26 components that declare an npmname differ, so the deps.dev request 404s, loadJson turns that into undefined and checkOSV returns an empty list with nothing logged. The reporter already resolves this the same way, with npmname falling back to component. Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
eoftedal
approved these changes
Sep 21, 2026
Member
|
Thanks for this, @arpitjain099 |
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.
With
--includeOsv,scanner.tshandscheckOSVthe repository's display key. That is the name used in reports, not the name on npm, and for 21 of the 26 components that declare annpmnamethe two differ:underscore.jsagainstunderscore,moment.jsagainstmoment,DOMPurifyagainstdompurify,angularjsagainstangular. The deps.dev URL then 404s,loadJsonturns that intoundefined, andcheckOSVreturns an empty list without logging anything, so the run looks clean.Calling the same exported function with each spelling:
reporters/utils.tsalready resolves this ascomponent.npmname || component.component, and the core setsnpmnameon every result, so the value is on the object the scanner is holding.No test added: checking this needs a live deps.dev call, and there is no spec for that module.
npm run check, build and the 62 specs are green.