-
Notifications
You must be signed in to change notification settings - Fork 17
40 lines (35 loc) · 1.13 KB
/
trivy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Trivy
on:
push:
branches:
- "main"
schedule:
- cron: '0 20 * * *'
permissions:
contents: read
jobs:
image-scan:
permissions:
contents: read # Required for actions/checkout to fetch code
name: Scan ${{ matrix.target.command_name }} Image
runs-on: ubuntu-22.04
strategy:
matrix:
target:
- command_name: "controller"
- command_name: "extproc"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build ${{ matrix.target.command_name }} Docker image
run: |
make docker-build.${{ matrix.target.command_name }} TAG=${{ github.sha }}
- name: Run Trivy vulnerability scanner for ${{ matrix.target.command_name }}
uses: aquasecurity/trivy-action@master
with:
image-ref: ghcr.io/envoyproxy/ai-gateway/${{ matrix.target.command_name }}:${{ github.sha }}
format: 'table'
severity: 'CRITICAL,HIGH,MEDIUM,LOW'
vuln-type: 'os,library'
exit-code: '1' # Fail workflow on detected vulnerabilities
ignore-unfixed: true # Ignore unfixed vulnerabilities