fix: package.json & package-lock.json to reduce vulnerabilities #83
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Example workflow for Golang using Snyk | |
on: push | |
jobs: | |
security: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Run Snyk to check for vulnerabilities | |
uses: snyk/actions/golang@master | |
continue-on-error: true # To make sure that SARIF upload gets called | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
with: | |
args: --sarif-file-output=snyk.sarif | |
- name: Upload result to GitHub Code Scanning | |
uses: github/codeql-action/upload-sarif@v1 | |
with: | |
sarif_file: snyk.sarif | |
- name: install snyk-to-html | |
run: | | |
npm install snyk-to-html -g | |
snyk code test --json | snyk-to-html -o result.html | |
mkdir downloads | |
ls -lrt | |
pwd | |
cp -v /home/runner/work/java-goof/java-goof/*.html /home/runner/work/java-goof/java-goof/downloads | |
- name: Use the Upload Artifact GitHub Action | |
uses: actions/upload-artifact@v2 | |
with: | |
name: snyk code results | |
path: downloads |