Skip to content

Commit 022bfdf

Browse files
committed
ci: scan images with docker scout
Signed-off-by: CrazyMax <[email protected]>
1 parent 8403a7c commit 022bfdf

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

.github/workflows/buildkit.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ env:
2424
GO_VERSION: "1.22"
2525
SETUP_BUILDX_VERSION: "latest"
2626
SETUP_BUILDKIT_IMAGE: "moby/buildkit:latest"
27+
SCOUT_VERSION: "1.11.0"
2728
IMAGE_NAME: "moby/buildkit"
2829
PLATFORMS: "linux/amd64,linux/arm/v7,linux/arm64,linux/s390x,linux/ppc64le,linux/riscv64"
2930
DESTDIR: "./bin"
@@ -189,6 +190,38 @@ jobs:
189190
CACHE_TO: type=gha,scope=image${{ matrix.target-stage }}
190191
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
191192

193+
scout:
194+
runs-on: ubuntu-24.04
195+
if: ${{ github.ref == 'refs/heads/master' && github.repository == 'moby/buildkit' }}
196+
permissions:
197+
# required to write sarif report
198+
security-events: write
199+
needs:
200+
- image
201+
steps:
202+
-
203+
name: Checkout
204+
uses: actions/checkout@v4
205+
-
206+
name: Login to DockerHub
207+
uses: docker/login-action@v3
208+
with:
209+
username: ${{ secrets.DOCKERHUB_USERNAME }}
210+
password: ${{ secrets.DOCKERHUB_TOKEN }}
211+
-
212+
name: Scout
213+
id: scout
214+
uses: crazy-max/.github/.github/actions/docker-scout@ccae1c98f1237b5c19e4ef77ace44fa68b3bc7e4
215+
with:
216+
version: ${{ env.SCOUT_VERSION }}
217+
format: sarif
218+
image: registry://${{ env.IMAGE_NAME }}:master
219+
-
220+
name: Upload SARIF report
221+
uses: github/codeql-action/upload-sarif@v3
222+
with:
223+
sarif_file: ${{ steps.scout.outputs.result-file }}
224+
192225
release:
193226
runs-on: ubuntu-24.04
194227
needs:

.github/workflows/frontend.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ env:
2222
GO_VERSION: "1.22"
2323
SETUP_BUILDX_VERSION: "latest"
2424
SETUP_BUILDKIT_TAG: "moby/buildkit:latest"
25+
SCOUT_VERSION: "1.11.0"
2526
IMAGE_NAME: "docker/dockerfile-upstream"
2627
PLATFORMS: "linux/386,linux/amd64,linux/arm/v7,linux/arm64,linux/mips,linux/mipsle,linux/mips64,linux/mips64le,linux/s390x,linux/ppc64le,linux/riscv64"
2728

@@ -125,6 +126,38 @@ jobs:
125126
CACHE_TO: type=gha,scope=${{ env.CACHE_SCOPE }}
126127
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
127128

129+
scout:
130+
runs-on: ubuntu-24.04
131+
if: ${{ github.ref == 'refs/heads/master' && github.repository == 'moby/buildkit' }}
132+
permissions:
133+
# required to write sarif report
134+
security-events: write
135+
needs:
136+
- image
137+
steps:
138+
-
139+
name: Checkout
140+
uses: actions/checkout@v4
141+
-
142+
name: Login to DockerHub
143+
uses: docker/login-action@v3
144+
with:
145+
username: ${{ secrets.DOCKERHUB_USERNAME }}
146+
password: ${{ secrets.DOCKERHUB_TOKEN }}
147+
-
148+
name: Scout
149+
id: scout
150+
uses: crazy-max/.github/.github/actions/docker-scout@ccae1c98f1237b5c19e4ef77ace44fa68b3bc7e4
151+
with:
152+
version: ${{ env.SCOUT_VERSION }}
153+
format: sarif
154+
image: registry://${{ env.IMAGE_NAME }}:master
155+
-
156+
name: Upload SARIF report
157+
uses: github/codeql-action/upload-sarif@v3
158+
with:
159+
sarif_file: ${{ steps.scout.outputs.result-file }}
160+
128161
release:
129162
runs-on: ubuntu-24.04
130163
if: startsWith(github.ref, 'refs/tags/dockerfile')

0 commit comments

Comments
 (0)