Skip to content

Commit

Permalink
Upload trivy results to Github
Browse files Browse the repository at this point in the history
  • Loading branch information
illegalnumbers committed May 15, 2024
1 parent 30e6ead commit ebd2500
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ jobs:
with:
image-ref: 'pulsar-functions-go-runner:latest'
format: 'table'
template: '@/contrib/sarif.tpl'
output: 'trivy-results-go.sarif'
severity: 'LOW,MEDIUM,HIGH,CRITICAL'
exit-code: '0'

- name: Run Trivy vulnerability scanner for java with pulsarctl
Expand All @@ -103,6 +106,9 @@ jobs:
with:
image-ref: 'pulsar-functions-pulsarctl-java-runner:latest'
format: 'table'
template: '@/contrib/sarif.tpl'
output: 'trivy-results.sarif'
severity: 'LOW,MEDIUM,HIGH,CRITICAL'
exit-code: '0'

- name: Run Trivy vulnerability scanner for python with pulsarctl
Expand All @@ -111,6 +117,9 @@ jobs:
with:
image-ref: 'pulsar-functions-pulsarctl-python-runner:latest'
format: 'table'
template: '@/contrib/sarif.tpl'
output: 'trivy-results-python.sarif'
severity: 'LOW,MEDIUM,HIGH,CRITICAL'
exit-code: '0'

- name: Run Trivy vulnerability scanner for go with pulsarctl
Expand All @@ -120,3 +129,26 @@ jobs:
image-ref: 'pulsar-functions-pulsarctl-go-runner:latest'
format: 'table'
exit-code: '0'
template: '@/contrib/sarif.tpl'
output: 'trivy-results-pulsarctl.sarif'
severity: 'LOW,MEDIUM,HIGH,CRITICAL'

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

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

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

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

0 comments on commit ebd2500

Please sign in to comment.