forked from super-linter/super-linter
-
Notifications
You must be signed in to change notification settings - Fork 17
47 lines (43 loc) · 1.25 KB
/
trivy.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
46
47
# Disabling trivy scans while they get troubleshooting for failures
---
name: Trivy Container Scan
on:
push:
branches:
- main
pull_request:
merge_group:
permissions:
contents: read
jobs:
scan-container:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
name: Build
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
######################
# Checkout code base #
######################
- name: Checkout code
uses: actions/checkout@v3
#################################
# Run Trivy Scan of source code #
#################################
- name: Trivy Scan
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
format: 'template'
template: '@/contrib/sarif.tpl'
output: 'report.sarif'
severity: 'HIGH,CRITICAL'
#################################
# Upload report to security tab #
#################################
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'report.sarif'