# How to report on a past scan?

**URL:** <https://discuss.rapid7.com/t/how-to-report-on-a-past-scan/27305>\
**Category:** InsightVM\
**Created:** [September 11, 2023, 3:26pm UTC](https://discuss.rapid7.com/t/how-to-report-on-a-past-scan/27305 "2023-09-11T15:26:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lee](https://discuss.rapid7.com/user_avatar/discuss.rapid7.com/lee/32/2108_2.png) [@Lee](https://discuss.rapid7.com/u/Lee)\
**Post date:** [September 11, 2023, 3:26pm UTC](https://discuss.rapid7.com/t/how-to-report-on-a-past-scan/27305/1 "2023-09-11T15:26:24Z")

</div>

I need to generate a PDF or CSV report for vuln. findings from a specific past scan that occurred a month ago? I see the scan history calendar shows the scan, but I cannot seem to find the scan under the site or the ability to run a report based on a specific past scan. In reports, the scope option for ‘scan’, only shows the most recent scan.

---

<div class="post-metadata">

**Author:** ![mmur\_gt4e](https://discuss.rapid7.com/user_avatar/discuss.rapid7.com/mmur_gt4e/32/1985_2.png) [@mmur\_gt4e](https://discuss.rapid7.com/u/mmur_gt4e)\
**Post date:** [September 12, 2023, 6:46am UTC](https://discuss.rapid7.com/t/how-to-report-on-a-past-scan/27305/2 "2023-09-12T06:46:25Z")

</div>

Same here, maybe you should open a case in order to check if it is possible or not.

---

<div class="post-metadata">

**Author:** ![ttsmgc](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/t/f07891/32.png) [@ttsmgc](https://discuss.rapid7.com/u/ttsmgc)\
**Post date:** [September 18, 2023, 10:04pm UTC](https://discuss.rapid7.com/t/how-to-report-on-a-past-scan/27305/3 "2023-09-18T22:04:53Z")

</div>

Check your Admin \> Maintenance \> DATA RETENTION settings.

---

<div class="post-metadata">

**Author:** ![talford](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/t/58956e/32.png) [@talford](https://discuss.rapid7.com/u/talford)\
**Post date:** [September 19, 2023, 10:36am UTC](https://discuss.rapid7.com/t/how-to-report-on-a-past-scan/27305/4 "2023-09-19T10:36:27Z")

</div>

Hi Lee,

This query will report risk, vuln count etc at points in time (based on the INTERVAL set) - does this help? It doesn’t give specific vulnerability info though, which might be what you actually want. When set as below it will give you the data per week per asset for the last year. If running on a lot of assets this could end up a long report, but you can limit it by adding specific dates in (replace current\_date with ‘yyyy-mm-dd’) or change the INTERVAL to ‘1 month’ or pick specific assets.

SELECT  
da.host\_name,  
dos.description,  
fad.asset\_id,  
fad.day,  
fad.riskscore,  
fad.critical\_vulnerabilities,  
fad.severe\_vulnerabilities,  
fad.moderate\_vulnerabilities,  
fad.malware\_kits,  
fad.exploits,  
fad.vulnerabilities\_with\_malware\_kit,  
fad.vulnerabilities\_with\_exploit  
FROM fact\_asset\_date (current\_date - 365, current\_date, INTERVAL ‘1 week’) fad  
JOIN dim\_asset da ON da.asset\_id = fad.asset\_id  
JOIN dim\_operating\_system dos ON dos.operating\_system\_id = da.operating\_system\_id

UPDATE: it looks like this details the fact\_asset\_vulnerability\_finding table you’ll need which will link an asset id, scan id and vuln id to get you more specific data. [Understanding the reporting data model: Facts | InsightVM Documentation](https://docs.rapid7.com/insightvm/understanding-the-reporting-data-model-facts#fact_asset_vulnerability_finding)

---

<div class="post-metadata">

**Author:** ![Lee](https://discuss.rapid7.com/user_avatar/discuss.rapid7.com/lee/32/2108_2.png) [@Lee](https://discuss.rapid7.com/u/Lee)\
**Post date:** [September 22, 2023, 7:31pm UTC](https://discuss.rapid7.com/t/how-to-report-on-a-past-scan/27305/5 "2023-09-22T19:31:43Z")

</div>

I need to simply report on all mitigated (remediated) vulnerabilities by asset for a given site. Why is this type of PDF and CSV report not readily available?

This is a very basic and common report I regularly used with Tenable.sc in the past and prior to moving to Rapid7.
