Replies: 4 comments
-
Hi, If you need to query the version range, you can omit the {
"package": {
"name": "@apollo/client",
"ecosystem": "npm"
}
} May I ask what your use-case is that you need to do this? |
Beta Was this translation helpful? Give feedback.
-
@giftcup circling back on the request for more detail on your particular use case |
Beta Was this translation helpful? Give feedback.
-
I was trying to build a tool that would detect vulnerable packages in a package.json file without creating the package-lock.json. I thought I could query the package with the version ranges like those listed on a package.json file. Sorry for the late reply. |
Beta Was this translation helpful? Give feedback.
-
Disclaimer: I'm fairly ignorant about NPM, and I'm basing this on the most convenient osv.dev/gcp/appengine/frontend3/package.json Lines 1 to 39 in 2c31244 Can you not simply call the OSV API with the package and versions present here? e.g.
@giftcup You've mentioned "ranges" (plural) here, but I'm not seeing how you'd have more than a single version to be querying for? Do you have a |
Beta Was this translation helpful? Give feedback.
-
How would you query for vulnerabilities that are related to a range of versions for of an npm package?
For example, if you have a package listed as follows; "@apollo/client": "^3.0.0" in the package.json file, how would you query for all vulnerabilities that are related to the package's versions using the OSV api?
Beta Was this translation helpful? Give feedback.
All reactions