File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 5151 with :
5252 environment : ${{ github.event.inputs.environment }}
5353 postgresql_version : ${{ matrix.version }}
54+ secrets :
55+ SNYK_TOKEN : ${{ secrets.SNYK_TOKEN }}
5456
5557 Catalogs :
5658 name : Update Catalogs
Original file line number Diff line number Diff line change 2929 `source` directory.
3030 required : false
3131 type : string
32+ secrets :
33+ SNYK_TOKEN :
34+ required : false
3235
3336permissions : {}
3437
@@ -158,16 +161,26 @@ jobs:
158161
159162 - name : Snyk
160163 uses : snyk/actions/docker@master
164+ id : snyk
165+ if : ${{ env.SNYK_TOKEN != '' }}
166+ # Snyk can be used to break the build when it detects vulnerabilities.
167+ # In this case we want to upload the issues to GitHub Code Scanning.
161168 continue-on-error : true
162169 env :
163170 SNYK_TOKEN : ${{ secrets.SNYK_TOKEN }}
164171 with :
165172 image : " ${{ matrix.image }}"
166173 args : --severity-threshold=high --file=Dockerfile
167174
175+ - name : Replace sarif security-severity invalid values
176+ if : ${{ steps.snyk.conclusion == 'success' }}
177+ run : |
178+ sed -i 's/"security-severity": "null"/"security-severity": "0"/g' snyk.sarif
179+ sed -i 's/"security-severity": "undefined"/"security-severity": "0"/g' snyk.sarif
180+
168181 - name : Upload result to GitHub Code Scanning
169182 uses : github/codeql-action/upload-sarif@192325c86100d080feab897ff886c34abd4c83a3 # v3
170- continue-on-error : true
183+ if : ${{ steps.snyk.conclusion == 'success' }}
171184 with :
172185 sarif_file : snyk.sarif
173186
You can’t perform that action at this time.
0 commit comments