-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (33 loc) · 1.06 KB
/
scan-configs.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
name: Scan IaC Configs for Vulnerabilities
on:
push:
branches: ["main"]
pull_request:
jobs:
configs:
permissions:
contents: read # To checkout and read repository
security-events: write # To upload to security tab
name: Scan Configs
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/[email protected]
- name: Run Trivy Vulnerability Scanner in IaC Mode
uses: aquasecurity/[email protected]
with:
scan-type: "config"
hide-progress: true
format: "sarif"
output: "trivy-results.sarif"
exit-code: "1"
severity: "CRITICAL,HIGH,MEDIUM"
# NOTE: By default SARIF format enforces output of
# all vulnerabilities regardless of configured severities.
limit-severities-for-sarif: true
- name: Upload Trivy Scan Results to GitHub Security Tab
if: always()
uses: github/codeql-action/[email protected]
with:
sarif_file: "trivy-results.sarif"
category: "IaC-Config"