-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement workflow to scan latest released docker image (#2177)
Signed-off-by: ImpSy <3097030+ImpSy@users.noreply.github.com>
- Loading branch information
Showing
2 changed files
with
35 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,32 @@ | ||
name: Trivy image scanning | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * 1' # Every Monday at 00:00 | ||
|
||
jobs: | ||
image-scanning: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Add image to environment | ||
run: make print-IMAGE >> $GITHUB_ENV | ||
|
||
- name: trivy scan for github security tab | ||
uses: aquasecurity/trivy-action@0.24.0 | ||
with: | ||
image-ref: '${{ env.IMAGE }}' | ||
format: 'sarif' | ||
ignore-unfixed: true | ||
vuln-type: 'os,library' | ||
severity: 'CRITICAL,HIGH' | ||
output: 'trivy-results.sarif' | ||
timeout: 30m0s | ||
|
||
- name: Upload Trivy scan results to GitHub Security tab | ||
uses: github/codeql-action/upload-sarif@v3 | ||
if: always() | ||
with: | ||
sarif_file: 'trivy-results.sarif' |
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