Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude test projects from snyk scan #118

Merged
merged 12 commits into from
Apr 23, 2024
2 changes: 2 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- '!.github/workflows/fossa-scan.yml'
- '!.github/workflows/qodana.yml'
- '!.github/workflows/semgrep.yml'
- '!.github/workflows/snyk.yml'
types: [opened, synchronize, reopened]
push:
branches:
Expand All @@ -26,6 +27,7 @@ on:
- '!.github/workflows/fossa-scan.yml'
- '!.github/workflows/qodana.yml'
- '!.github/workflows/semgrep.yml'
- '!.github/workflows/snyk.yml'
workflow_dispatch:
inputs:
buildAutoFakeItEasy:
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/snyk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,30 @@ jobs:
fetch-depth: 0
- name: 🏗️ restore dependencies
run: dotnet restore ./src/Objectivity.AutoFixture.XUnit2.AutoMock.sln
- name: 🔬 snyk scan
- name: 🔬 snyk opensource scan
uses: snyk/actions/dotnet@master
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --sarif-file-output=snyk.sarif --file=src/Objectivity.AutoFixture.XUnit2.AutoMock.sln
args: --sarif-file-output=snyk/opensource.sarif --all-projects --exclude=Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests,Objectivity.AutoFixture.XUnit2.AutoMoq.Tests,Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests,Objectivity.AutoFixture.XUnit2.Core.Tests
- name: 🔬 snyk code scan
uses: snyk/actions/dotnet@master
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --sarif-file-output=snyk/code.sarif
command: code test
- name: 📈 snyk monitor
uses: snyk/actions/dotnet@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --file=src/Objectivity.AutoFixture.XUnit2.AutoMock.sln
args: --all-projects --exclude=Objectivity.AutoFixture.XUnit2.AutoFakeItEasy.Tests,Objectivity.AutoFixture.XUnit2.AutoMoq.Tests,Objectivity.AutoFixture.XUnit2.AutoNSubstitute.Tests,Objectivity.AutoFixture.XUnit2.Core.Tests
command: monitor
- name: 📊 upload sarif file for GitHub Advanced Security Dashboard
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: snyk.sarif
sarif_file: snyk
if: ${{ always() }}
Loading