Skip to content

Commit cdd80a0

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

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/snyk-code.yml

+9-9
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,25 @@ jobs:
2120
security-events: write
2221
steps:
2322
- uses: actions/checkout@master
24-
- uses: snyk/actions/setup@master
2523
- name: Setup .NET
2624
uses: actions/setup-dotnet@v4
2725
with:
2826
dotnet-version: 8.0.x
2927
- name: Restore dependencies
3028
run: dotnet restore algorithm_exercises_csharp.sln
3129
- name: Run Snyk to check for vulnerabilities
30+
uses: snyk/actions/dotnet@master
3231
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
3932
env:
4033
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
34+
with:
35+
command: test
36+
args: >
37+
algorithm_exercises_csharp/
38+
algorithm_exercises_csharp_base/
39+
algorithm_exercises_csharp_test/
40+
--sarif-file-output=snyk-code.sarif
4141
- name: Upload result to GitHub Code Scanning
4242
uses: github/codeql-action/upload-sarif@v3
4343
with:
44-
sarif_file: snyk-code.sarif
44+
sarif_file: "snyk-code.sarif"

0 commit comments

Comments
 (0)