Skip to content

Update snyk_test_HTML.yml #11

Update snyk_test_HTML.yml

Update snyk_test_HTML.yml #11

name: "Snyk Test HTML"
on:
push:
branches:
- master
jobs:
Pipeline-Job:
# Configure Environment
name: 'Snyk Test'
runs-on: ubuntu-latest
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
steps:
# Checkout Code
- name: Checkout Code
uses: actions/checkout@v1
# Install and Authenticate to Snyk
- name: Install Snyk & Authenticate
run: |
sudo npm install -g snyk
sudo npm install -g snyk-to-html
snyk auth ${SNYK_TOKEN}
# Run Snyk Open Source Test
- name: Run Snyk Open Source
run: |
# snyk test --severity-threshold=high
snyk test
continue-on-error: true
#Run Snyk Open Source to HTML
- name: Snyk Open Source to HTML
run: |
snyk test --json | snyk-to-html -o SCAVulns.html
snyk test --severity-threshold=high --sarif > results.sarif
#Run Synk Code test
- name: Snyk Code test
run: |
snyk code test
continue-on-error: true
#Run Synk Code to html
- name: Snyk Code
run: |
snyk code test --json | snyk-to-html -o CodeVulns.html
# Store Artifact
- name: Upload HTML file
uses: actions/upload-artifact@v4
with:
# Path to HTML file relative to the root of the repository
name: Vulnerabilities
path: |
SCAVulns.html
CodeVulns.html
# Upload Results
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v1
with:
# Path to SARIF file relative to the root of the repository
sarif_file: results.sarif