Skip to content

Commit

Permalink
osv: Skip osv query if package version is unknown
Browse files Browse the repository at this point in the history
OSV API now requires the package version and would return an error
status in case the package version is missing.

Signed-off-by: Henri Rosten <[email protected]>
  • Loading branch information
henrirosten committed Dec 5, 2024
1 parent e1ccc85 commit bb75766
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/vulnxscan/osv.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ def query_vulns(self, sbom_path):
batchquery = {}
batchquery["queries"] = []
for drv in df_sbom.itertuples():
if not drv.version:
LOG.debug("skipping osv query (unknown version): %s", drv.name)
continue
query = {}
query["version"] = drv.version
query["package"] = {}
Expand Down

0 comments on commit bb75766

Please sign in to comment.