File tree 1 file changed +44
-0
lines changed 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Security Checks
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request :
8
+ branches :
9
+ - main
10
+
11
+ jobs :
12
+ security-checks :
13
+ runs-on : ubuntu-latest
14
+
15
+ steps :
16
+ - name : Checkout code
17
+ uses : actions/checkout@v3
18
+
19
+ - name : Scan repository for secrets with TruffleHog
20
+ run : |
21
+ pip install trufflehog
22
+ trufflehog git --entropy=False $GITHUB_WORKSPACE || true
23
+
24
+ - name : Scan configuration files with Checkov
25
+ uses : bridgecrewio/checkov-action@master
26
+ with :
27
+ directory : .
28
+ skip_checks : " "
29
+ quiet : false
30
+
31
+ - name : Scan Docker image with Trivy
32
+ run : |
33
+ curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin
34
+ trivy image --exit-code 0 --severity HIGH,CRITICAL defectdojo:$GITHUB_SHA || true
35
+
36
+ - name : Upload security reports
37
+ if : always()
38
+ uses : actions/upload-artifact@v4
39
+ with :
40
+ name : security-reports
41
+ path : |
42
+ trufflehog-report.txt
43
+ checkov-report.txt
44
+ trivy-report.json
You can’t perform that action at this time.
0 commit comments