Skip to content

Commit

Permalink
FMWK-248 Add Snyk scan workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
reugn committed Sep 19, 2023
1 parent c6e7cae commit 99841b8
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/snyk-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Snyk scan
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
snyk-security:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/maven@master
continue-on-error: true # To make sure that SARIF upload gets called
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --all-projects --sarif-file-output=snyk.sarif

- name: Check output file
id: out-file
run: |
if test -f "snyk.sarif"; then
echo "::set-output name=exists::true"; else
echo "::set-output name=exists::false"
fi
- name: Upload result to GitHub Code Scanning
if: steps.out-file.outputs.exists == 'true'
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: snyk.sarif

0 comments on commit 99841b8

Please sign in to comment.