Skip to content

Commit 5033c7f

Browse files
authored
Merge pull request #53 from arnested/anchor-scan
Add Anchor Scan of Docker image
2 parents 16a080a + 1fd2a16 commit 5033c7f

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
- uses: actions/[email protected]
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 }}

0 commit comments

Comments
 (0)