-
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.
Signed-off-by: Xun Jiang <blackpiglet@gmail.com>
- Loading branch information
Xun Jiang
committed
Jan 5, 2023
1 parent
069c9a0
commit b10503b
Showing
2 changed files
with
37 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,36 @@ | ||
name: Trivy Nightly Scan | ||
on: | ||
schedule: | ||
- cron: '0 2 * * *' # run at 2 AM UTC | ||
|
||
jobs: | ||
nightly-scan: | ||
name: Trivy nightly scan | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# maintain the versions of Velero those need security scan | ||
versions: [main] | ||
# list of images that need scan | ||
images: [velero, velero-restore-helper] | ||
permissions: | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/trivy-action@master | ||
with: | ||
image-ref: 'docker.io/velero/${{ matrix.images }}:${{ matrix.versions }}' | ||
severity: 'CRITICAL,HIGH,MEDIUM' | ||
format: 'template' | ||
template: '@/contrib/sarif.tpl' | ||
output: 'trivy-results.sarif' | ||
|
||
- name: Upload Trivy scan results to GitHub Security tab | ||
uses: github/codeql-action/upload-sarif@v2 | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add Trivy nightly scan. |