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:
|
2022-12-14 15:12:23 +00:00
|
|
|
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
|
2024-01-09 11:05:48 +00:00
|
|
|
uses: aquasecurity/trivy-action@d43c1f16c00cfd3978dde6c07f4bbcf9eb6993ca
|
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
|
2024-01-02 11:47:02 +00:00
|
|
|
uses: github/codeql-action/upload-sarif@v3
|
2022-03-29 14:17:20 +00:00
|
|
|
with:
|
2022-12-14 15:12:23 +00:00
|
|
|
sarif_file: trivy-results.sarif
|