SQL Query for vulnerability

I need a SQL query to create a report for a specific CVE that includes at least the following:

-Affected asset names, along with their OS
-Vulnerability proof
-Tag associated with the asset

2 Likes

This example query could be a good starting point here:

https://docs.rapid7.com/insightvm/sql-example-report-on-a-single-vulnerability

It’s intended for reporting on a specific vulnerability, and you can update the value in the WHERE clause to be whichever CVE you’re looking for.

The query as it is includes asset and solution data, and you could join with a couple other tables to get things like OS, proof, and tags.

  • dim_operating_system
  • dim_asset_operating_system
  • fact_asset_vulnerability_instance
  • dim_tag
  • dim_tag_asset
2 Likes