forked from eclipse-edc/DataDashboard
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e249de6
commit 4c7d802
Showing
1 changed file
with
24 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |