mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 00:04:15 -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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- name: Run Trivy vulnerability scanner
|
|
uses: aquasecurity/trivy-action@dc5a429b52fcf669ce959baa2c2dd26090d2a6c4 # 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@d6bbdef45e766d081b84a2def353b0055f728d3e # v3.29.3
|
|
with:
|
|
sarif_file: 'trivy-results.sarif'
|