forked from snyk-labs/nodejs-goof
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (39 loc) · 1.5 KB
/
OS_and_Code.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Prebuilt repo + Snyk Security Scanning (OS, Code, Docker, IaC)
# Runs 4 Snyk Products (Code, Open Source, Container, IaC)
# Snyk installation via npm
# Node.js version: 18.4
# Outputs the results to the pipeline and in SARIF-format to the security tab
# Prerequisites:
# - Set a SNYK_TOKEN and a SNYK_ORG in the pipelines secrets
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js for installing Snyk
uses: actions/setup-node@v2
with:
node-version: 18.4
# Install & prepare Snyk
- run: npm install --location=global snyk
# This OPTIONAL step will configure the Snyk CLI to connect to the EU instance of Snyk
#- run: snyk config set use-base64-encoding=true
#- run: snyk config set endpoint='https://app.eu.snyk.io/api'
- run: snyk auth ${{ secrets.SNYK_TOKEN }}
- name: Snyk Monitor
run: snyk monitor
- name: Snyk Open Source Scanning
run: snyk test --all-projects --sarif-file-output=snyk-oss.sarif
continue-on-error: true
#- name: Upload results to GitHub Open Source Scanning
# uses: github/codeql-action/upload-sarif@v2
# with:
# sarif_file: snyk-oss.sarif
- name: Snyk Code Scanning
run: snyk code test --sarif-file-output=snyk-code.sarif
continue-on-error: true
# - name: Upload results to GitHub Code Scanning
# uses: github/codeql-action/upload-sarif@v2
# with:
# sarif_file: snyk-code.sarif