Skip to content

2.11.5b: Add github action to run snyk #7

2.11.5b: Add github action to run snyk

2.11.5b: Add github action to run snyk #7

Workflow file for this run

name: Scan PHP code with Snyk Code
on:
push:
branches:
- main
- development
pull_request:
jobs:
security:
runs-on: ubuntu-latest
name: run-snyk
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install Snyk & Authenticate
run: |
sudo npm install -g snyk
snyk auth ${SNYK_TOKEN}
- name: Run Snyk Code
run: |
snyk code test -d --sarif > snyk-results.sarif
continue-on-error: true
- name: Upload results from Snyk to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: snyk-results.sarif