Skip to content

scan

scan #1470

name: scan
on:
schedule:
- cron: "0 8 * * *"
# Declare default permissions as read only.
permissions: read-all
jobs:
scan:
name: Scan
runs-on: ubuntu-24.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@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 # 0.28.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@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
with:
sarif_file: "trivy-results.sarif"