Skip to content

Commit

Permalink
Update snyk-security.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kariemoorman authored Apr 16, 2024
1 parent 42bbfbf commit 01cc4e0
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/snyk-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,18 @@ jobs:
env:
# This is where you will need to introduce the Snyk API token created with your Snyk account
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

- name: Snyk Auth
run: snyk auth ${{ secrets.SNYK_TOKEN }}

# Runs Snyk Code (SAST) analysis and uploads result into GitHub.
# Use || true to not fail the pipeline
- name: Snyk Code test
run: snyk code test --sarif > snyk-code.sarif || true

# Runs Snyk Open Source (SCA) analysis and uploads result to Snyk.
# - name: Snyk Open Source monitor
# run: snyk auth ${{ secrets.SNYK_TOKEN }} && snyk monitor --all-projects
- name: Snyk Open Source monitor
run: snyk monitor --all-projects

# Runs Snyk Infrastructure as Code (IaC) analysis and uploads result to Snyk.
# Use || true to not fail the pipeline.
Expand All @@ -67,16 +70,14 @@ jobs:

# Build the docker image for testing
# - name: Build a Docker image
# run: DEBUG=*snyk* docker build -t tt-analyzer .
# run: DEBUG=*snyk* docker build -t tt-analyzer/latest .
# Runs Snyk Container (Container and SCA) analysis and uploads result to Snyk.
# - name: Snyk Container monitor
# run: snyk auth ${{ secrets.SNYK_TOKEN }} && snyk container monitor tt-analyzer --file=Dockerfile -d
# run: snyk container monitor tt-analyzer/latest --file=Dockerfile -d

# Push the Snyk Code results into GitHub Code Scanning tab
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: snyk-code.sarif

- name: Snyk Code test
run: snyk code test --sarif > snyk-code.sarif

0 comments on commit 01cc4e0

Please sign in to comment.