File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ on : push
2
+ name : Docker image security scan
3
+ jobs :
4
+ security-scan :
5
+ name : Docker build and scan
6
+ if : ' !github.event.deleted'
7
+ runs-on : ubuntu-latest
8
+ steps :
9
+
10
+ - name : Set up Docker Buildx
11
+ id : buildx
12
+ uses : docker/setup-buildx-action@master
13
+ - name : Build Docker image
14
+ uses : docker/build-push-action@v2
15
+ with :
16
+ builder : ${{ steps.buildx.outputs.name }}
17
+ tags : ${{ github.repository }}:test
18
+ push : false
19
+ load : true
20
+ - name : Scan Docker image
21
+ uses : anchore/scan-action@v2
22
+ id : scan
23
+ with :
24
+ image : ${{ github.repository }}:test
25
+ acs-report-enable : true
26
+ fail-build : true
27
+ - name : Upload Anchore scan SARIF report
28
+ uses : github/codeql-action/upload-sarif@v1
29
+ if : ${{ always() }}
30
+ with :
31
+ sarif_file : ${{ steps.scan.outputs.sarif }}
You can’t perform that action at this time.
0 commit comments