@@ -88,34 +88,39 @@ jobs:
88
88
labels : ${{ steps.meta.outputs.labels }}
89
89
file : ${{ matrix.dockerfile }}
90
90
91
- - uses : hands-lab/dockle-action@v1
91
+ - name : Dockle Container Scanner
92
+ uses : erzz/dockle-action@v1
93
+ if : ${{ contains(github.ref, 'refs/heads/main') || contains(github.ref, 'refs/heads/develop') }}
92
94
with :
93
95
image : ${{ fromJSON(steps.meta.outputs.json).tags[0] }}
96
+ report-format : sarif
97
+ report-name : dockle-report
98
+ failure-threshold : fatal
99
+
100
+ - name : Upload Dockle SARIF Report
101
+ uses : github/codeql-action/upload-sarif@v1.2.0
102
+ if : ${{ contains(github.ref, 'refs/heads/main') || contains(github.ref, 'refs/heads/develop') }}
103
+ with :
104
+ sarif_file : super-report.sarif
94
105
95
106
- name : Trivy Vulnerability Scanner
96
107
uses : aquasecurity/trivy-action@master
108
+ if : ${{ contains(github.ref, 'refs/heads/main') || contains(github.ref, 'refs/heads/develop') }}
97
109
with :
98
110
image-ref : ${{ fromJSON(steps.meta.outputs.json).tags[0] }}
99
111
format : ' sarif'
100
112
output : ' trivy-results.sarif'
101
113
102
- - name : Upload Trivy scan results to GitHub Security tab
114
+ - name : Upload Trivy SARIF Report
103
115
uses : github/codeql-action/upload-sarif@v2
116
+ if : ${{ contains(github.ref, 'refs/heads/main') || contains(github.ref, 'refs/heads/develop') }}
104
117
with :
105
118
sarif_file : ' trivy-results.sarif'
106
119
107
- - name : Scan Image with Azure Container Scan
108
- uses : Azure/container-scan@v0.1
109
- if : always()
110
- env :
111
- TRIVY_TIMEOUT_SEC : 360s
112
- with :
113
- image-name : ${{ fromJSON(steps.meta.outputs.json).tags[0] }}
114
-
115
120
- name : Anchore Container Scan
116
121
id : anchore-scan
117
122
uses : anchore/scan-action@v3.2.5
118
- if : always()
123
+ if : ${{ contains(github.ref, 'refs/heads/main') || contains(github.ref, 'refs/heads/develop') }}
119
124
with :
120
125
image : ${{ fromJSON(steps.meta.outputs.json).tags[0] }}
121
126
fail-build : true
@@ -124,7 +129,7 @@ jobs:
124
129
125
130
- name : Upload Anchore Scan SARIF Report
126
131
uses : github/codeql-action/upload-sarif@v2
127
- if : always()
132
+ if : ${{ contains(github.ref, 'refs/heads/main') || contains(github.ref, 'refs/heads/develop') }}
128
133
with :
129
134
sarif_file : ${{ steps.anchore-scan.outputs.sarif }}
130
135
token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments