-
Notifications
You must be signed in to change notification settings - Fork 422
45 lines (42 loc) · 1.1 KB
/
vuln-scanner.yml
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
41
42
43
44
45
name: "Trivy Vulnerability Scanner"
on:
push:
branches:
- master
- release/*
pull_request:
branches:
- master
- release/*
schedule:
- cron: '0 0 * * *' # Runs every 24 hours at midnight UTC
permissions:
actions: read
contents: read
deployments: read
jobs:
trivy_vulnerability_scan:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
BUILD_TAG: latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build AGIC docker image
run: make build-image
- name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
with:
image-ref: 'appgwreg.azurecr.io/public/azure-application-gateway/kubernetes-ingress-staging:latest'
format: 'sarif'
output: 'trivy-results.sarif'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/[email protected]
if: always()
with:
sarif_file: 'trivy-results.sarif'