File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333rm " $SARIF_FILE "
3434mv " sarif-results-recategorized/$( basename " $SARIF_FILE " ) " " $SARIF_FILE "
3535
36- # Ensure jq is available
37- if ! command -v jq > /dev/null 2>&1 ; then
38- echo " Error: jq is required but not installed. Please install jq and rerun this script." >&2
39- exit 1
40- fi
36+ # # Ensure jq is available
37+ # if ! command -v jq >/dev/null 2>&1; then
38+ # echo "Error: jq is required but not installed. Please install jq and rerun this script." >&2
39+ # exit 1
40+ # fi
4141
42- # Filter SARIF to only include results from repos/* (relative or absolute)
43- echo " Filtering SARIF results to only include entries with paths matching (^|/)repos/ ..."
44- jq ' (.runs) |= map(.results |= map(select((.locations // [] | length > 0) and ((.locations[0].physicalLocation.artifactLocation.uri // "") | test("(^|/)repos/")))) )' " $SARIF_FILE " > " ${SARIF_FILE} .filtered"
45- if [ $? -eq 0 ]; then
46- mv " ${SARIF_FILE} .filtered" " $SARIF_FILE "
47- else
48- echo " jq filtering failed. SARIF file was not modified." >&2
49- rm -f " ${SARIF_FILE} .filtered"
50- exit 1
51- fi
42+ # # Filter SARIF to only include results from repos/* (relative or absolute)
43+ # echo "Filtering SARIF results to only include entries with paths matching (^|/)repos/ ..."
44+ # jq '(.runs) |= map(.results |= map(select((.locations // [] | length > 0) and ((.locations[0].physicalLocation.artifactLocation.uri // "") | test("(^|/)repos/")))) )' "$SARIF_FILE" > "${SARIF_FILE}.filtered"
45+ # if [ $? -eq 0 ]; then
46+ # mv "${SARIF_FILE}.filtered" "$SARIF_FILE"
47+ # else
48+ # echo "jq filtering failed. SARIF file was not modified." >&2
49+ # rm -f "${SARIF_FILE}.filtered"
50+ # exit 1
51+ # fi
You can’t perform that action at this time.
0 commit comments