Skip to content

Commit bc94a98

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

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/snyk-code.yml

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

66
---
77

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

1010
on: # yamllint disable-line rule:truthy
1111
push:
@@ -23,12 +23,23 @@ jobs:
2323
steps:
2424
- uses: actions/checkout@master
2525
- uses: snyk/actions/setup@master
26+
- name: Setup .NET
27+
uses: actions/setup-dotnet@v4
28+
with:
29+
dotnet-version: 8.0.x
30+
- name: Restore dependencies
31+
run: dotnet restore algorithm-exercises-csharp.sln
2632
- name: Run Snyk to check for vulnerabilities
33+
continue-on-error: true # To make sure that SARIF upload gets called
2734
run: >
28-
snyk code test --sarif-file-output=snyk-code.sarif
35+
snyk test
36+
algorithm-exercises-csharp/
37+
algorithm-exercises-csharp-base/
38+
algorithm-exercises-csharp-test/
39+
--sarif-file-output=snyk-code.sarif
2940
env:
3041
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
3142
- name: Upload result to GitHub Code Scanning
3243
uses: github/codeql-action/upload-sarif@v3
3344
with:
34-
sarif_file: 'snyk-code.sarif'
45+
sarif_file: snyk-code.sarif

0 commit comments

Comments
 (0)