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-12-11 00:45:47 +00:00
|
|
|
uses: aquasecurity/trivy-action@91713af97dc80187565512baba96e4364e983601
|
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-09-20 11:05:34 +00:00
|
|
|
uses: github/codeql-action/upload-sarif@v2
|
2022-03-29 14:17:20 +00:00
|
|
|
with:
|
2022-12-14 15:12:23 +00:00
|
|
|
sarif_file: trivy-results.sarif
|