Skip to content

Commit a3999ae

Browse files
authored
Merge pull request moby#5184 from crazy-max/scout-scan
ci: scan images with docker scout
2 parents de65ae6 + 022bfdf commit a3999ae

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"
@@ -221,6 +222,38 @@ jobs:
221222
CACHE_TO: type=gha,scope=image${{ matrix.target-stage }}
222223
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
223224

225+
scout:
226+
runs-on: ubuntu-24.04
227+
if: ${{ github.ref == 'refs/heads/master' && github.repository == 'moby/buildkit' }}
228+
permissions:
229+
# required to write sarif report
230+
security-events: write
231+
needs:
232+
- image
233+
steps:
234+
-
235+
name: Checkout
236+
uses: actions/checkout@v4
237+
-
238+
name: Login to DockerHub
239+
uses: docker/login-action@v3
240+
with:
241+
username: ${{ secrets.DOCKERHUB_USERNAME }}
242+
password: ${{ secrets.DOCKERHUB_TOKEN }}
243+
-
244+
name: Scout
245+
id: scout
246+
uses: crazy-max/.github/.github/actions/docker-scout@ccae1c98f1237b5c19e4ef77ace44fa68b3bc7e4
247+
with:
248+
version: ${{ env.SCOUT_VERSION }}
249+
format: sarif
250+
image: registry://${{ env.IMAGE_NAME }}:master
251+
-
252+
name: Upload SARIF report
253+
uses: github/codeql-action/upload-sarif@v3
254+
with:
255+
sarif_file: ${{ steps.scout.outputs.result-file }}
256+
224257
release:
225258
runs-on: ubuntu-24.04
226259
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)