Skip to content

Commit

Permalink
Update security_scan.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tmberthold authored Feb 21, 2024
1 parent e249de6 commit 4c7d802
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions .github/workflows/security_scan.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,43 @@
name: Trivy Security Scan

on:
pull_request:
branches: ["main"]
push:
workflow_dispatch:

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

- name: Run static analysis
uses: actions/checkout@v4
- name: Run static analysis (rootfs)
uses: aquasecurity/trivy-action@master
with:
scan-type: "fs"
scanners: "vuln,config"
scan-type: "rootfs"
scanners: "vuln,misconfig"
ignore-unfixed: true
format: "sarif"
output: "trivy-results.sarif"
output: "trivy-results-rootfs.sarif"
severity: "CRITICAL,HIGH"

- name: Upload Trivy scan results to GitHub Security tab
- name: Upload Trivy scan results to GitHub Security tab (rootfs)
uses: github/codeql-action/upload-sarif@v2
continue-on-error: true
with:
sarif_file: "trivy-results-rootfs.sarif"
category: "code"
- name: Run static analysis (repo)
uses: aquasecurity/trivy-action@master
with:
scan-type: "repo"
scanners: "vuln,misconfig"
ignore-unfixed: true
format: "sarif"
output: "trivy-results-repo.sarif"
severity: "CRITICAL,HIGH"
- name: Upload Trivy scan results to GitHub Security tab (repo)
uses: github/codeql-action/upload-sarif@v2
continue-on-error: true
with:
sarif_file: "trivy-results.sarif"
sarif_file: "trivy-results-repo.sarif"
category: "code"

0 comments on commit 4c7d802

Please sign in to comment.