mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 08:14:18 -04:00
34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
name: Trivy Nightly Scan
|
|
on:
|
|
schedule:
|
|
- cron: '0 2 * * 5' # Run at 2AM UTC on every Friday
|
|
|
|
permissions: read-all
|
|
jobs:
|
|
nightly-scan:
|
|
name: Trivy Scan nightly
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# It will test for only the latest version as older version is not maintained
|
|
versions: [latest]
|
|
permissions:
|
|
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
|
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
- name: Run Trivy vulnerability scanner
|
|
uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8 # master
|
|
with:
|
|
image-ref: 'docker.io/coredns/coredns:${{ matrix.versions }}'
|
|
severity: 'CRITICAL,HIGH'
|
|
format: 'sarif'
|
|
output: 'trivy-results.sarif'
|
|
|
|
- name: Upload Trivy scan results to GitHub Security tab
|
|
uses: github/codeql-action/upload-sarif@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
|
|
with:
|
|
sarif_file: 'trivy-results.sarif'
|