-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (58 loc) · 1.64 KB
/
sast.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: SAST
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
scan-config:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner in IaC mode
uses: aquasecurity/[email protected]
with:
scan-type: 'config'
format: 'table'
hide-progress: true
output: 'trivy-config.txt'
- name: Publish Trivy Output to Summary
run: |
if [[ -s trivy-config.txt ]]; then
{
echo "### Configuration scan"
echo "<details><summary>Click to expand</summary>"
echo ""
echo '```terraform'
cat trivy-config.txt
echo '```'
echo "</details>"
} >> $GITHUB_STEP_SUMMARY
fi
scan-fs:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner in IaC mode
uses: aquasecurity/[email protected]
with:
scan-type: 'fs'
format: 'table'
ignore-unfixed: true
output: 'trivy-fs.txt'
severity: 'LOW'
- name: Publish Trivy Output to Summary
run: |
if [[ -s trivy-fs.txt ]]; then
{
echo "### FS scan"
echo "<details><summary>Click to expand</summary>"
echo ""
echo '```terraform'
cat trivy-fs.txt
echo '```'
echo "</details>"
} >> $GITHUB_STEP_SUMMARY
fi