BTW, for trivy, the sarif import cannot be imported because the region looks like this :
"region": {
"startLine": 17,
"startColumn": 1,
"endLine": 17,
"endColumn": 1
}
If the startColumn
and endColumn
keys are removed, the issue does not appear anymore (though the SQ issue will be targeted towards the whole line). To do this :
temporary_report=`mktemp`
report_path="trivy.sarif"
cat "${report_path}" > "${temporary_report}"
jq '.runs[].tool.driver.name="del(.runs[].results[].locations[].physicalLocation.region.startColumn,.runs[].results[].locations[].physicalLocation.region.endColumn)' "${temporary_report}" > "${report_path}"