anchore / grype

A vulnerability scanner for container images and filesystems
Apache License 2.0
8.58k stars 559 forks source link

Add SARIF validation to test suite #1833

Closed kzantow closed 5 months ago

kzantow commented 5 months ago

What would you like to be added: SAIRF output validation tests.

Why is this needed: One of the output formats Grype supports is SARIF. Today, we are not validating that the SARIF files Grype creates are valid. One way to are able to validate them is using the NPM package @microsoft/jest-sarif. We would probably be able to make a container that can be passed a SARIF file and it validates in order to incorporate this functionality into the Grype test suite (other suggestions welcome!).

Additional context: We are validating SARIF in the scan-action using the aforementioned library (see here).