Skip to content

Commit

Permalink
Added search by cve and stats method
Browse files Browse the repository at this point in the history
Signed-off-by: Prabhu Subramanian <[email protected]>
  • Loading branch information
prabhu committed Mar 18, 2024
1 parent 1e897d6 commit 451f7dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,7 @@ vdb --search "cpe:2.3:a:npm:gitblame:*:*:*:*:*:*:*:*"

# Search by colon separated values
vdb --search "npm:gitblame:0.0.1"

# Search by CVE id
vdb --search CVE-2024-25169
```
4 changes: 2 additions & 2 deletions vdb/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def main():
LOG.info("Refreshing %s", s.__class__.__name__)
s.refresh()
cve_data_count, cve_index_count = db_lib.stats()
print("cve_data_count", cve_data_count, "cve_index_count", cve_index_count)
console.print("cve_data_count", cve_data_count, "cve_index_count", cve_index_count)
db_lib.optimize_and_close_all()
if args.search:
if args.search.startswith("pkg:"):
Expand All @@ -134,7 +134,7 @@ def main():
if results:
print_results(results)
else:
print("No results found!")
console.print("No results found!")


if __name__ == "__main__":
Expand Down

0 comments on commit 451f7dd

Please sign in to comment.