Getting a vuln's source URL #3045
-
Hi, I am querying the osv.dev API and had a question about the I wanted to know if I could depend on this behavior. An alternative I thought of was that described here https://ossf.github.io/osv-schema/#id-modified-fields is a way to assemble the source URL. This is likely workable and I can do that. However, it would require me to maintain a list of the prefixes and databases and URL formats. I am using osv-scanner to query the API. I thought: maybe osv-scanner would have a tool to do that in-built, so that the maintainers could keep such a prefix, DB, and URL list up-to-date. But I don't see that facility in the code, unless I am missing it. Can anyone advise me on how to proceed? I think if I might just copy whatever way the OSV website calculates the "Import Source" field (I think this is found in
So I don't want to do the wrong thing and have my code break later. Does anyone have any suggestions? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Created issue #3046 from this as well. |
Beta Was this translation helpful? Give feedback.
Hi @nchelluri
You've already gotten an answer on #3046, but I'll add something here as well...
Firstly, you've talked about what you're trying to achieve, but not the why (see also my favourite https://xyproblem.info/). Could you elaborate on why you need the source record? This FAQ entry discusses what OSV.dev does to records it imports, they're usually superior to the record imported from the home database it originated from.