Skip to content

Commit

Permalink
update report publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
farrell-m committed Jan 6, 2025
1 parent 282d92d commit 90130c0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/pr-merge-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,26 @@ jobs:
uses: snyk/actions/[email protected]
continue-on-error: true
with:
args: --org=${SNYK_ORG} --all-projects --exclude=$SNYK_TEST_EXCLUDE --sarif-file-output=snyk-report.sarif
args: --org=$SNYK_ORG --all-projects --exclude=$SNYK_TEST_EXCLUDE --sarif-file-output=snyk-report.sarif
- name: Fix undefined values
run: |
cat snyk-report.sarif | jq '
.runs[].tool[].rules[]
|= (
if .properties["security-severity"] == "undefined"
then .properties["security-severity"] =
( if .shortDescription.text | test("(?i)critical") then "9.0"
elif .shortDescription.text | test("(?i)high") then "7.0"
elif .shortDescription.text | test("(?i)medium") then "4.0"
elif .shortDescription.text | test("(?i)low") then "0.1"
else ""
end
)
else .
end
)
' > snyk-report-cleansed.sarif
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: snyk-report.sarif
sarif_file: snyk-report-cleansed.sarif
5 changes: 0 additions & 5 deletions .github/workflows/push-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
- uses: snyk/actions/[email protected]
- name: Install snyk-delta
run: |
Expand Down

0 comments on commit 90130c0

Please sign in to comment.