-
Notifications
You must be signed in to change notification settings - Fork 147
61 lines (53 loc) · 1.59 KB
/
trivy.yaml
File metadata and controls
61 lines (53 loc) · 1.59 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: "[secops] Trivy"
# Controls when the workflow will run
on:
pull_request:
branches:
- master
paths:
- .github/**
- charts/mailu/**
push:
branches:
- master
paths:
- charts/mailu/**
- .github/workflows/trivy.yaml
- .trivy.yaml
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch: {}
permissions:
security-events: write
jobs:
trivy-scan:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
with:
fetch-depth: 0
- name: Install Helm
uses: azure/setup-helm@dda3372f752e03dde6b3237bc9431cdc2f7a02a2 # v5
with:
version: v3.10.0
- name: Install dependencies
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm dependency build charts/mailu
- name: Set up python
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6
with:
python-version: '3.14'
- name: Run Trivy vulnerability scanner in IaC mode
uses: aquasecurity/trivy-action@master
with:
scan-type: 'config'
scan-ref: '.'
trivy-config: '.trivy.yaml'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4
with:
sarif_file: 'trivy-results.sarif'