forked from aws-amplify/amplify-js
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (32 loc) · 1.43 KB
/
snyk-security.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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