(Optional) Parsing CSV exports
Last updated
Last updated
DefectDojo allows to sort, filter and further export vulnerabilities in different formats. Reports contain complete information about vulnerabilities which may look overwhelming. In certain cases, such as Dependency Checks, only few fields values will be sufficient to present or address the vulnerabilities.
Dependency check is an important step of each static analysis cycle and usually brings an extensive output, containing publicly known vulnerabilities for the external libraries or modules being invoked in the code.
We will use this as an example of the findings bulk export from the DefectDojo with further parsing and saving in the addressable form.
First click on the Trivy scan results, which was used to analyze the vulnerabilities of this project dependencies:
Here we have 96 revealed vulnerabilities, let’s export them in the CSV format:
We now have the findings.csv file containing all details for the 96 dependency vulnerabilities.
This is nice, but not well readable so we will extract only a few fields usually sufficient to address these issues to the developers. The next python script will help:
Save this script in the same folder with findings.csv and execute it:
python trivy-dep-parse-csv.py
Check the results:
Now we have an XLSX which contains the data one can directly send to the product developers or embed in the report:
The same approach could be taken with other reports but beware every scan type produces a different set of information and therefore the CSV contents and fields positions will vary.