Skip to content

Commit

Permalink
Added trivy-scan
Browse files Browse the repository at this point in the history
Signed-off-by: Yash Singh <[email protected]>
  • Loading branch information
Yash Singh committed Mar 18, 2023
1 parent fb92605 commit 9e4513a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/trivy-scan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Trivy Security Scan
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
build:
name: build
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@1f0aa582c8c8f5f7639610d6d38baddfea4fdcee # master
with:
scan-type: 'fs'
severity: 'CRITICAL,HIGH'
format: 'sarif'
output: 'trivy-results.sarif'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@16964e90ba004cdf0cd845b866b5df21038b7723 # v2.2.6
with:
sarif_file: 'trivy-results.sarif'
category: 'code'

0 comments on commit 9e4513a

Please sign in to comment.