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

Add Snyk steps to workflow #112

Merged
merged 5 commits into from Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/main.yml
Expand Up @@ -7,6 +7,7 @@ on:

permissions:
contents: read
security-events: write

jobs:
test:
Expand All @@ -24,3 +25,18 @@ jobs:
uses: ./.github/actions/test
with:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/dotnet@master
# synk/actions uses Container action that is only supported on Linux.
if: runner.os == 'Linux'
continue-on-error: true # To make sure that SARIF upload gets called
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: test
args: --all-projects --sarif-file-output=snyk.sarif
- name: Upload result to GitHub Code Scanning
if: runner.os == 'Linux'
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: snyk.sarif
9 changes: 9 additions & 0 deletions .github/workflows/pr.yml
Expand Up @@ -23,3 +23,12 @@ jobs:
uses: ./.github/actions/test
with:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
- name: Run Snyk to check for vulnerabilities
# synk/actions uses Container action that is only supported on Linux.
if: runner.os == 'Linux'
uses: snyk/actions/dotnet@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: test
args: --all-projects
3 changes: 3 additions & 0 deletions src/pocof.Test/pocof.Test.fsproj
Expand Up @@ -31,6 +31,9 @@
</PackageReference>
<!-- NOTE: for creating mock PSObject -->
<PackageReference Include="Microsoft.PowerShell.SDK" Version="7.4.0" />
<!-- NOTE: NOTE: for suppressing vulnerability report the transient dependencies from xunit that depends .NET Standard 1.6. -->
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>

<ItemGroup>
Expand Down