Skip to content

Merge pull request #200 from sir-gon/develop #544

Merge pull request #200 from sir-gon/develop

Merge pull request #200 from sir-gon/develop #544

Workflow file for this run

# yamllint disable rule:line-length
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
# yamllint enable rule:line-length
---
name: .NET Snyk Code analysis
on: # yamllint disable-line rule:truthy
push:
pull_request:
workflow_dispatch:
jobs:
security:
runs-on: ubuntu-24.04
permissions:
actions: read
contents: read
security-events: write
steps:
- uses: actions/checkout@master
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore algorithm_exercises_csharp.sln
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/dotnet@master
continue-on-error: true # To make sure that SARIF upload gets called
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: code test
args: >
--all-projects
--sarif-file-output=snyk-code.sarif
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: "snyk-code.sarif"