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
|
2023-09-04 00:16:35 +00:00
|
|
|
uses: aquasecurity/trivy-action@fbd16365eb88e12433951383f5e99bd901fc618f
|
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-08-29 10:53:18 +00:00
|
|
|
uses: github/codeql-action/upload-sarif@v2.21.5
|
2022-03-29 14:17:20 +00:00
|
|
|
with:
|
2022-12-14 15:12:23 +00:00
|
|
|
sarif_file: trivy-results.sarif
|