Skip to content

Snyk Security

Snyk Security #49

Workflow file for this run

name: 'Snyk Security'
on:
push:
branches: ["release"]
schedule:
- cron: '0 0 * * *' # run daily at midnight GMT
permissions:
contents: read
jobs:
snyk:
if: github.repository == 'aws-amplify/amplify-js'
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Snyk CLI to check for security issues
uses: snyk/actions/setup@806182742461562b67788a64410098c9d9b96adb
- name: Build
run: yarn install || true
# Using `|| true` to not fail the pipeline
- name: Snyk test
env:
SNYK_TOKEN: ${{secrets.SNYK_TOKEN}}
run: snyk test --sarif | tee snyk-code.sarif # || true
# Push the Snyk Code results into GitHub Code Scanning tab
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: snyk-code.sarif