Skip to content

Commit

Permalink
update snyk action
Browse files Browse the repository at this point in the history
  • Loading branch information
alexss200010 committed Jul 26, 2023
1 parent 0d73b0b commit 35b5f37
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions .github/workflows/Snyk Scan to Monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
# needs: [other job]

steps:
- uses: actions/checkout@v2
Expand All @@ -29,34 +30,36 @@ jobs:
# 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'

# Login to Snyk Cloud
- run: snyk auth ${{ secrets.SNYK_TOKEN }}

- name: Snyk Open Source Scanning
- name: Snyk SCA testing
run: snyk test --all-projects --severity-threshold=high
continue-on-error: true

- name: Snyk SCA results monitor
run: snyk monitor --org=${{ secrets.SNYK_ORG }} --all-projects --severity-threshold=high
continue-on-error: true


- name: Snyk Code Scanning
- name: Snyk SAST Scanning
run: snyk code test --org=${{ secrets.SNYK_ORG }} --severity-threshold=high --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
#args: --severity-threshold=high

- name: Build the Docker Image
run: docker build . --file=Dockerfile --tag alexss200010/nodejs-goof:latest
#- name: Build the Docker Image
# run: docker build . --file=Dockerfile --tag alexss200010/nodejs-goof:latest

- name: Snyk Container Scanning
run: snyk container monitor --org=${{ secrets.SNYK_ORG }} --severity-threshold=high --file=Dockerfile alexss200010/nodejs-goof:latest
continue-on-error: true
#- name: Snyk Container Scanning
# run: snyk container monitor --org=${{ secrets.SNYK_ORG }} --severity-threshold=high --file=Dockerfile alexss200010/nodejs-goof:latest
# continue-on-error: true


- name: Snyk Infrastructure-as-Code Scanning
run: snyk iac test --org=${{ secrets.SNYK_ORG }} --severity-threshold=high --report
continue-on-error: true
#- name: Snyk Infrastructure-as-Code Scanning
# run: snyk iac test --org=${{ secrets.SNYK_ORG }} --severity-threshold=high --report
# continue-on-error: true

0 comments on commit 35b5f37

Please sign in to comment.