scan #1394
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
name: scan | |
on: | |
schedule: | |
- cron: "0 8 * * *" | |
# Declare default permissions as read only. | |
permissions: read-all | |
jobs: | |
scan: | |
name: Scan | |
runs-on: ubuntu-22.04 | |
permissions: | |
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | |
steps: | |
- name: Run Trivy vulnerability scanner | |
uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 # 0.24.0 | |
with: | |
image-ref: "ghcr.io/chgl/kube-powertools:latest" | |
format: "template" | |
template: "@/contrib/sarif.tpl" | |
output: "trivy-results.sarif" | |
severity: "CRITICAL,HIGH" | |
- name: Upload Trivy scan results to GitHub Security tab | |
uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15 | |
with: | |
sarif_file: "trivy-results.sarif" |