Skip to content

Commit b78650a

Browse files
authored
Merge pull request #96 from sir-gon/feature/ga-snyk
[CONFIG] [Github-Actions] Snyk Open Source. Modified. Sarif output en…
2 parents 5ef7ec7 + 2cb5934 commit b78650a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

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

Lines changed: 10 additions & 10 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:
@@ -16,19 +16,19 @@ on: # yamllint disable-line rule:truthy
1616
jobs:
1717
security:
1818
runs-on: ubuntu-latest
19+
permissions:
20+
actions: read
21+
contents: read
22+
security-events: write
1923
steps:
2024
- uses: actions/checkout@master
2125
- 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
2826
- name: Run Snyk to check for vulnerabilities
2927
run: >
30-
snyk test
31-
algorithm-exercises-csharp/
32-
algorithm-exercises-csharp-test/
28+
snyk code test --sarif-file-output=snyk-code.sarif
3329
env:
3430
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
31+
- name: Upload result to GitHub Code Scanning
32+
uses: github/codeql-action/upload-sarif@v3
33+
with:
34+
sarif_file: 'snyk-code.sarif'

0 commit comments

Comments
 (0)