Update security-scan.yml

This commit is contained in:
mcollao-hc 2022-12-05 17:13:52 -06:00 committed by GitHub
parent 571a61af01
commit cbc2ef31f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 10 deletions

View File

@ -73,16 +73,6 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git fetch
CHANGED_FILES_JSON="$(git diff origin/${{ github.base_ref }} --name-only | jq -R '[.]' | jq -nc '[inputs|.[]] | flatten')"
cat results.sarif | \
jq 'del(.runs[]?.results[]?
| select([.locations[]?.physicalLocation?.artifactLocation?.uri?]
| inside('$CHANGED_FILES_JSON')
| not))
' > file-filtered.sarif
cat file-filtered.sarif | jq 'del(.runs[]?.results[]? | select(has("suppressions")))' > suppression-filtered.sarif
cat suppression-filtered.sarif | jq '(.runs[]?.results? | select(. | length == 0)) = []' > results.sarif
cat results.sarif
- name: Upload SARIF file