Skip to content

Commit

Permalink
Merge pull request #7 from panorama-ed/SECZ-892-enable-trivy-scanning
Browse files Browse the repository at this point in the history
SECZ-892: Enable Trivy Scanning
  • Loading branch information
ngnasr1123 authored Dec 15, 2023
2 parents 30d19c6 + 390542c commit dd5d0fe
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/trivy-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: build
on:
push:
branches:
- master
pull_request:
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
actions: read
security-events: write
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Run Trivy vulnerability scanner in IaC mode
uses: aquasecurity/trivy-action@master
with:
scan-type: 'config'
hide-progress: false
format: 'sarif'
output: 'trivy-results.sarif'
ignore-unfixed: true
severity: 'CRITICAL,HIGH'
limit-severities-for-sarif: true

- name: Modify SARIF file
run: |
sed -i 's#git::https:/##g' trivy-results.sarif
- name: Upload Trivy scan results to GitHub Security tab
if: always()
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-results.sarif'

0 comments on commit dd5d0fe

Please sign in to comment.