Merge pull request #614 from fluxcd/fix-snyk
ci: Fix Snyk code scanning
This commit is contained in:
commit
5f465cf7d8
|
|
@ -30,15 +30,22 @@ jobs:
|
||||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
|
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Run Snyk to check for vulnerabilities
|
- name: Setup Go
|
||||||
uses: snyk/actions/golang@master
|
uses: actions/setup-gov3
|
||||||
|
with:
|
||||||
|
go-version: 1.19.x
|
||||||
|
- name: Download modules
|
||||||
|
run: |
|
||||||
|
make tidy
|
||||||
|
- uses: snyk/actions/setup@master
|
||||||
|
- name: Run Snyk to check for vulnerabilities
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
run: |
|
||||||
|
snyk test --sarif-file-output=snyk.sarif
|
||||||
env:
|
env:
|
||||||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
|
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
|
||||||
with:
|
|
||||||
args: --sarif-file-output=snyk.sarif
|
|
||||||
- name: Upload result to GitHub Code Scanning
|
- name: Upload result to GitHub Code Scanning
|
||||||
uses: github/codeql-action/upload-sarif@v1
|
uses: github/codeql-action/upload-sarif@v2
|
||||||
with:
|
with:
|
||||||
sarif_file: snyk.sarif
|
sarif_file: snyk.sarif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue