Skip to content

Commit

Permalink
FMWK-250 Add Snyk scan workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
reugn committed Sep 20, 2023
1 parent a939910 commit ffe8da5
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 ffe8da5

Please sign in to comment.