forked from alexeisnyk/AltoroJ
-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (27 loc) · 1001 Bytes
/
snyk.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
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: [self-hosted]
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
- run: snyk auth ${{ secrets.SNYK_TOKEN }}
- name: Snyk Code Scanning
run: snyk code test --org=${{ secrets.SNYK_ORG }} --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