Skip to content

Commit 5fdb567

Browse files
author
Gonzalo Diaz
committed
[CONFIG] [Gihub Actions] Snyk Open Source analysis added. Sarif output enabled.
1 parent f066591 commit 5fdb567

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

.github/workflows/snyk-code.yml

+5-15
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# yamllint enable rule:line-length
55

66
---
7-
87
name: .NET Snyk Code analysis
98

109
on: # yamllint disable-line rule:truthy
@@ -21,24 +20,15 @@ jobs:
2120
security-events: write
2221
steps:
2322
- uses: actions/checkout@master
24-
- uses: snyk/actions/setup@master
25-
- name: Setup .NET
26-
uses: actions/setup-dotnet@v4
27-
with:
28-
dotnet-version: 8.0.x
29-
- name: Restore dependencies
30-
run: dotnet restore algorithm_exercises_csharp.sln
3123
- name: Run Snyk to check for vulnerabilities
24+
uses: snyk/actions/dotnet@master
3225
continue-on-error: true # To make sure that SARIF upload gets called
33-
run: >
34-
snyk test
35-
algorithm_exercises_csharp/
36-
algorithm_exercises_csharp_base/
37-
algorithm_exercises_csharp_test/
38-
--sarif-file-output=snyk-code.sarif
3926
env:
4027
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
28+
with:
29+
command: code test
30+
args: --sarif-file-output=snyk-code.sarif
4131
- name: Upload result to GitHub Code Scanning
4232
uses: github/codeql-action/upload-sarif@v3
4333
with:
44-
sarif_file: snyk-code.sarif
34+
sarif_file: "snyk-code.sarif"

0 commit comments

Comments
 (0)