Skip to content

Commit

Permalink
Add trivy scan
Browse files Browse the repository at this point in the history
  • Loading branch information
ranikamadurawe committed Oct 13, 2023
1 parent b688990 commit 25c1f11
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Trivy Scan
on:
push:
branches-ignore: [master, main]
pull_request:
branches: [master, main]

jobs:
build:
name: Security Scan
runs-on: ubuntu-20.04

permissions:
contents: read
packages: read
statuses: write

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
scan-type: 'config'
hide-progress: false
format: 'sarif'
output: 'trivy-results.sarif'
exit-code: '1'
ignore-unfixed: true

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

0 comments on commit 25c1f11

Please sign in to comment.