Skip to content

Commit 714e06a

Browse files
author
Gonzalo Diaz
committed
[CONFIG] [Github-Actions] Snyk Open Source. Modified. Sarif output enabled.
1 parent a2ec641 commit 714e06a

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

.github/workflows/dotnet-snyk.yml renamed to .github/workflows/snyk-code.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
---
77

8-
name: .NET Snyk Code analysis
8+
name: Snyk Code analysis (.NET)
99

1010
on: # yamllint disable-line rule:truthy
1111
push:
@@ -18,17 +18,14 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@master
21-
- uses: snyk/actions/setup@master
22-
- name: Setup .NET
23-
uses: actions/setup-dotnet@v4
24-
with:
25-
dotnet-version: 8.0.x
26-
- name: Restore dependencies
27-
run: dotnet restore algorithm-exercises-csharp.sln
2821
- name: Run Snyk to check for vulnerabilities
29-
run: >
30-
snyk test
31-
algorithm-exercises-csharp/
32-
algorithm-exercises-csharp-test/
22+
uses: snyk/actions/dotnet@master
23+
continue-on-error: true # To make sure that SARIF upload gets called
3324
env:
3425
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
26+
with:
27+
args: --sarif-file-output=snyk-code.sarif
28+
- name: Upload result to GitHub Code Scanning
29+
uses: github/codeql-action/upload-sarif@v3
30+
with:
31+
sarif_file: 'snyk-code.sarif'

0 commit comments

Comments
 (0)