forked from sartography/spiff-arena
-
Notifications
You must be signed in to change notification settings - Fork 0
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
15887fd
commit 1a93e3f
Showing
1 changed file
with
49 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
name: Trivy Scan | ||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
push: | ||
branches: | ||
- main | ||
- deploy-to-cloud-gov | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
scan-third-party: | ||
permissions: | ||
contents: read | ||
security-events: write | ||
actions: read | ||
name: Trivy Scan Third Party Images | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
image: | ||
- name: ghcr.io/gsa-tts/spiffworkflow-backend:deploy-to-cloud-gov-latest | ||
- name: ghcr.io/gsa-tts/spiffworkflow-frontend:deploy-to-cloud-gov-latest | ||
- name: ghcr.io/gsa-tts/connector-proxy-demo:deploy-to-cloud-gov-latest | ||
steps: | ||
- name: Pull Third Party Docker Images | ||
run: docker pull ${{ matrix.image.name }} | ||
|
||
- name: Run Trivy vulnerability scanner on Third Party Images | ||
uses: aquasecurity/[email protected] | ||
with: | ||
image-ref: '${{ matrix.image.name }}' | ||
scan-type: 'image' | ||
hide-progress: false | ||
format: 'sarif' | ||
output: 'trivy-results.sarif' | ||
exit-code: 0 # Setting the exit-code to 1 will fail the action, without publishing to Github Security Tab (> aquasecurity/[email protected]) | ||
severity: 'CRITICAL,HIGH' | ||
timeout: 15m0s | ||
ignore-unfixed: true | ||
|
||
- name: Upload Trivy scan results to GitHub Security tab for Third Party Images | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: 'trivy-results.sarif' |