Skip to content

Commit 90130c0

Browse files
committed
update report publishing
1 parent 282d92d commit 90130c0

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

.github/workflows/pr-merge-main.yml

+20-2
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,26 @@ jobs:
8383
uses: snyk/actions/gradle@0.4.0
8484
continue-on-error: true
8585
with:
86-
args: --org=${SNYK_ORG} --all-projects --exclude=$SNYK_TEST_EXCLUDE --sarif-file-output=snyk-report.sarif
86+
args: --org=$SNYK_ORG --all-projects --exclude=$SNYK_TEST_EXCLUDE --sarif-file-output=snyk-report.sarif
87+
- name: Fix undefined values
88+
run: |
89+
cat snyk-report.sarif | jq '
90+
.runs[].tool[].rules[]
91+
|= (
92+
if .properties["security-severity"] == "undefined"
93+
then .properties["security-severity"] =
94+
( if .shortDescription.text | test("(?i)critical") then "9.0"
95+
elif .shortDescription.text | test("(?i)high") then "7.0"
96+
elif .shortDescription.text | test("(?i)medium") then "4.0"
97+
elif .shortDescription.text | test("(?i)low") then "0.1"
98+
else ""
99+
end
100+
)
101+
else .
102+
end
103+
)
104+
' > snyk-report-cleansed.sarif
87105
- name: Upload result to GitHub Code Scanning
88106
uses: github/codeql-action/upload-sarif@v3
89107
with:
90-
sarif_file: snyk-report.sarif
108+
sarif_file: snyk-report-cleansed.sarif

.github/workflows/push-branch.yml

-5
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,6 @@ jobs:
6565

6666
steps:
6767
- uses: actions/checkout@v3
68-
- name: Set up JDK 21
69-
uses: actions/setup-java@v3
70-
with:
71-
java-version: '21'
72-
distribution: 'temurin'
7368
- uses: snyk/actions/setup@0.4.0
7469
- name: Install snyk-delta
7570
run: |

0 commit comments

Comments
 (0)