Rapid7 Nexpose Tag Report Setup Guide
Summary: How to set up a tag report in Rapid7 Nexpose.
Rapid7 Nexpose Overview
Rapid7 Nexpose provides vulnerability management software to discover and prioritize vulnerabilities found in your environment. RiskSense supports the Nexpose CSV-formatted tag export report. This report allows the user to import their defined tags from Nexpose to RiskSense.
Rapid7 Nexpose CSV-Formatted Tag Export Report Setup
Log into the Nexpose web application.
Navigate to the Reports dashboard and click the blue New button.
Enter a report title (e.g., CSV Tag Report-RiskSense) and select the SQL Query Export template from the Export tab.
Click the Query box. Copy the query from this document’s appendix and paste it into the Define a SQL Query dialog that appears.
After pasting the CSV tag query from the appendix, click the Validate button to confirm the query is valid and then click Done.
The following screen appears after validating the query and clicking the Done button.
Next, schedule the CSV tag export’s run frequency.
Once the cadence has been established, click either Save & Run the Report or Save the Report.
Appendix: Query
WITH custom_tags AS
(SELECT asset_id, CSV(tag_name ORDER BY tag_name) AS custom_tags
FROM dim_tag
JOIN dim_tag_asset USING (tag_id)
WHERE tag_type = 'CUSTOM'
GROUP BY asset_id),
location_tags AS
(SELECT asset_id, CSV(tag_name ORDER BY tag_name) AS location_tags
FROM dim_tag
JOIN dim_tag_asset USING (tag_id)
WHERE tag_type = 'LOCATION'
GROUP BY asset_id),
owner_tags AS
(SELECT asset_id, CSV(tag_name ORDER BY tag_name) AS owner_tags
FROM dim_tag
JOIN dim_tag_asset USING (tag_id)
WHERE tag_type = 'OWNER'
GROUP BY asset_id),
criticality_tags AS
(SELECT asset_id, CSV(tag_name ORDER BY tag_name) AS criticality_tags
FROM dim_tag
JOIN dim_tag_asset USING (tag_id)
WHERE tag_type = 'CRITICALITY'
GROUP BY asset_id)
SELECT asset_id,
ct.custom_tags,
lt.location_tags,
ot.owner_tags,
crt.criticality_tags
FROM dim_asset
LEFT OUTER JOIN custom_tags ct USING (asset_id)
LEFT OUTER JOIN location_tags lt USING (asset_id)
LEFT OUTER JOIN owner_tags ot USING (asset_id)
LEFT OUTER JOIN criticality_tags crt USING (asset_id)