Skip to content

Commit

Permalink
fix some github ingestion rules
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamVe committed Dec 19, 2023
1 parent f84a069 commit 91e09b8
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/spotbugs-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@ jobs:
"yubiotp";
do
SARIF="./build/spotbugs/spotbugs-$module.sarif"
cat $SARIF |
jq '.runs |= map( if .taxonomies == [null] then .taxonomies = [] else . end)' |
jq ".runs[].results[].locations[].physicalLocation.artifactLocation.uri |= \"$module/src/main/java/\" + ." |
jq '.runs[].tool.driver.rules |= map( . += { fullDescription: { text: .shortDescription.text } } )' |
jq '.runs[].tool.driver.rules |= map( . += { help: { text: .helpUri } } )' |
jq -c '.' > $SARIF.json
jq '.runs |= map( if .taxonomies == [null] then .taxonomies = [] else . end)' < $SARIF |
jq ".runs[].results[].locations[].physicalLocation.artifactLocation.uri |= \"$module/src/main/java/\" + ." |
jq ".runs[].results[].locations[].physicalLocation.artifactLocation.uriBaseId |= \"%SRC_ROOT%\" " |
jq '.runs[].tool.driver.rules |= map( . += { fullDescription: { text: .shortDescription.text } } )' |
jq '.runs[].tool.driver.rules |= map( . += { name: ("SpotBugs_" + .id | ascii_downcase | sub("(^|_)(?<x>[a-z])";"\(.x|ascii_upcase)";"g")) } )' |
jq '.runs[].tool.driver.rules |= map( . += { help: { text: .helpUri } } )' |
jq 'del(.runs[].originalUriBaseIds)' |
jq -c '.' > $SARIF.json
mv $SARIF.json $SARIF
done
Expand Down

0 comments on commit 91e09b8

Please sign in to comment.