Skip to content

Commit c11ec9d

Browse files
committed
ci: scan vulnerability
Signed-off-by: Kentaro Hayashi <[email protected]>
1 parent addb2b8 commit c11ec9d

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/scan-images.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Scan image vulnerability
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
schedule:
8+
# Sunday, 18:00 JST
9+
- cron: '0 9 * * 0'
10+
11+
concurrency:
12+
group: ${{ github.head_ref || github.sha }}-${{ github.workflow }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
setup:
17+
name: Scan image with grype security vulnerability scanner
18+
strategy:
19+
fail-fast: false
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Pull latest grype container image
23+
run: |
24+
docker pull anchore/grype:latest
25+
debian:
26+
needs: setup
27+
name: Scan debian image with grype
28+
strategy:
29+
fail-fast: false
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Pull and scan upstream trixie image
33+
run: |
34+
docker pull debian:trixie
35+
docker run --rm anchore/grype:latest debian:trixie >> $GITHUB_STEP_SUMMARY
36+
ruby:
37+
needs: setup
38+
name: Scan image with grype
39+
strategy:
40+
fail-fast: false
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Pull and scan upstream Ruby image
44+
run: |
45+
docker pull ruby:3.4-slim
46+
docker run --rm anchore/grype:latest ruby:3.4-slim >> $GITHUB_STEP_SUMMARY
47+
fluentd:
48+
needs: setup
49+
name: Scan Fluentd image with grype
50+
strategy:
51+
fail-fast: false
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@v6
55+
- name: Pull and scan Fluentd image
56+
run: |
57+
# v1.19.1-debian-amd64
58+
IMAGE=$(make echo-all-images | cut -d' ' -f1|cut -d',' -f3)
59+
docker run --rm anchore/grype:latest fluent/fluentd:$IMAGE >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)