Filter Intermediate Reports

Let’s consider a case where a user has multiple intermediate reports stored at a single path. But the user wants to merge only selected reports. We can do this by filtering intermediate reports based on the tag.

How to filter Intermediate reports?

Suppose you have multiple intermediate reports stored at a single path.

path
├── intermediate.cve-bin-tool.2021-06-02.01-17-48.json[weekly]
├── intermediate.cve-bin-tool.2021-06-09.02-39-43.json[weekly]
├── intermediate.cve-bin-tool.2021-06-16.23-44-35.json[weekly]
├── intermediate.cve-bin-tool.2021-06-23.23-44-49.json[weekly]
├── intermediate.cve-bin-tool.2021-06-24.23-45-08.json[daily]
├── intermediate.cve-bin-tool.2021-06-25.23-45-08.json[daily]
└── intermediate.cve-bin-tool.2021-06-26.23-45-08.json[daily]

0 directories, 7 files

Note: You can specify tags while generating intermediate reports using -t --tag. For this example, we have assumed that the intermediate reports contain tag {weekly or daily}

We want to merge the weekly generated report to plot the week-wise timeline trace as an HTML report. We can have some other use cases as well.
To filter out the intermediate reports, use:

python -m cve_bin_tool.cli -F weekly -m /path -f html

This will generate a merged report from these files -

path
├── intermediate.cve-bin-tool.2021-06-02.01-17-48.json[weekly]
├── intermediate.cve-bin-tool.2021-06-09.02-39-43.json[weekly]
├── intermediate.cve-bin-tool.2021-06-16.23-44-35.json[weekly]
└── intermediate.cve-bin-tool.2021-06-23.23-44-49.json[weekly]

Alternatively, users can filter out intermediate reports which are generated by multiple teams if they have specified distinguishable tags. If we have intermediate reports {backend and frontend}. We can simply use:

python -m cve_bin_tool.cli -F backend -m /path 

This will generate a vulnerability report for all the backend related binaries.