2022-03-29 14:17:20 +00:00
|
|
|
name: Trivy
|
2022-12-14 15:12:23 +00:00
|
|
|
|
2022-03-29 14:17:20 +00:00
|
|
|
on:
|
|
|
|
schedule:
|
2022-12-14 15:12:23 +00:00
|
|
|
- cron: 0 6 * * *
|
|
|
|
workflow_dispatch:
|
2022-03-29 14:17:20 +00:00
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
2022-03-29 14:17:20 +00:00
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
jobs:
|
2022-03-29 14:17:20 +00:00
|
|
|
|
2022-12-14 15:12:23 +00:00
|
|
|
analysis:
|
|
|
|
name: Vulnerability scanner for nightly containers
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.repository == 'keycloak/keycloak'
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
container: [keycloak, keycloak-operator]
|
|
|
|
fail-fast: false
|
2022-03-29 14:17:20 +00:00
|
|
|
steps:
|
|
|
|
- name: Run Trivy vulnerability scanner
|
2023-04-22 15:56:50 +00:00
|
|
|
uses: aquasecurity/trivy-action@e5f43133f6e8736992c9f3c1b3296e24b37e17f2
|
2022-03-29 14:17:20 +00:00
|
|
|
with:
|
2022-12-14 15:12:23 +00:00
|
|
|
image-ref: quay.io/keycloak/${{ matrix.container}}:nightly
|
|
|
|
format: template
|
2022-03-29 14:17:20 +00:00
|
|
|
template: '@/contrib/sarif.tpl'
|
2022-12-14 15:12:23 +00:00
|
|
|
output: trivy-results.sarif
|
|
|
|
severity: MEDIUM,CRITICAL,HIGH
|
2022-03-29 14:17:20 +00:00
|
|
|
ignore-unfixed: true
|
2023-02-09 15:30:49 +00:00
|
|
|
security-checks: vuln
|
|
|
|
timeout: 15m
|
2022-03-29 14:17:20 +00:00
|
|
|
|
|
|
|
- name: Upload Trivy scan results to GitHub Security tab
|
2023-05-05 16:03:55 +00:00
|
|
|
uses: github/codeql-action/upload-sarif@v2.3.3
|
2022-03-29 14:17:20 +00:00
|
|
|
with:
|
2022-12-14 15:12:23 +00:00
|
|
|
sarif_file: trivy-results.sarif
|