Skip to content
This repository was archived by the owner on Jul 26, 2022. It is now read-only.

Commit 490bada

Browse files
authored
chore: scan image built in pipeline (#678)
Signed-off-by: Markus Maga <[email protected]>
1 parent 8ff9490 commit 490bada

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

.github/workflows/build-container.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,21 @@ jobs:
6767
tags: ${{ steps.docker_meta.outputs.tags }}
6868
labels: ${{ steps.docker_meta.outputs.labels }}
6969

70+
# cant load multi arch, so we build the same arch again (everything should cache hit)
71+
- name: Load for scan
72+
uses: docker/build-push-action@v2
73+
id: docker_load
74+
with:
75+
context: .
76+
platforms: linux/amd64
77+
load: true
78+
tags: kes-scan:scan
79+
labels: ${{ steps.docker_meta.outputs.labels }}
80+
81+
- name: Trivy Scan - High and Critical Severity
82+
uses: aquasecurity/[email protected]
83+
with:
84+
image-ref: kes-scan:scan
85+
exit-code: 1
86+
ignore-unfixed: true
87+
severity: HIGH,CRITICAL

.github/workflows/workflow.yml

-19
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,6 @@ on:
77
pull_request:
88

99
jobs:
10-
11-
scan-container:
12-
runs-on: ubuntu-18.04
13-
14-
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v2
17-
18-
- name: Build Artifacts
19-
run: docker build -t test:test .
20-
21-
- name: Trivy Scan - High and Critical Severity
22-
uses: aquasecurity/[email protected]
23-
with:
24-
image-ref: test:test
25-
exit-code: 1
26-
ignore-unfixed: true
27-
severity: HIGH,CRITICAL
28-
2910
test:
3011
runs-on: ubuntu-latest
3112
name: Node 12

0 commit comments

Comments
 (0)