Skip to content

Snyk Security

Snyk Security #505

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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Snyk CLI to check for security issues
uses: snyk/actions/setup@806182742461562b67788a64410098c9d9b96adb # v0.4.0 https://github.com/snyk/actions/commit/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@6c089f53dd51dc3fc7e599c3cb5356453a52ca9e # v2 https://github.com/github/codeql-action/commit/6c089f53dd51dc3fc7e599c3cb5356453a52ca9e
with:
sarif_file: snyk-code.sarif