-
Notifications
You must be signed in to change notification settings - Fork 17
36 lines (29 loc) · 1019 Bytes
/
Copy pathsnyk-code.yml
File metadata and controls
36 lines (29 loc) · 1019 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Snyk Code Scan
on:
workflow_dispatch:
jobs:
snyk-code:
name: SAST Scan
runs-on: codebuild-semoss-github-runner-${{ github.run_id }}-${{ github.run_attempt }}
container:
image: quay.io/semoss/test-quay:ubuntu-dind
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@v4
- name: Set up Snyk
uses: snyk/actions/setup@master
- name: Run Snyk Code scan
run: snyk code test --org=semoss --sarif-file-output=snyk-code.sarif
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
continue-on-error: true
- name: Check SARIF output exists
id: sarif-check
run: test -f snyk-code.sarif && echo "exists=true" >> $GITHUB_OUTPUT || echo "exists=false" >> $GITHUB_OUTPUT
- name: Upload SARIF to GitHub Security tab
if: steps.sarif-check.outputs.exists == 'true'
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: snyk-code.sarif