Skip to content

Commit

Permalink
Add filter for ecosystem count (#875)
Browse files Browse the repository at this point in the history
This removes the UVI and GSD ecosystem entries on the vulnerabilities
list. They still show up in the ecosystem list because there are entries
that are marked as invalid.

We would require adding an additional index to have the
`osv_get_ecosystems` function return only ecosystems with non invalid
bugs.
  • Loading branch information
another-rex authored Dec 1, 2022
1 parent 1507e9a commit ee5e51e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gcp/appengine/frontend_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ def osv_get_ecosystem_counts():
osv.Bug.public == True, # pylint: disable=singleton-comparison
osv.Bug.status == osv.BugStatus.PROCESSED).count()

return counts
filtered_counts = {key: elem for key, elem in counts.items() if elem > 0}
return filtered_counts


def osv_query(search_string, page, affected_only, ecosystem):
Expand Down

0 comments on commit ee5e51e

Please sign in to comment.