Skip to content

Commit 3091085

Browse files
committed
github actions: use descendant order
It is useful to check the result of fluentd first. Before: debian -> ruby -> fluentd After: fluentd -> ruby -> debian Signed-off-by: Kentaro Hayashi <[email protected]>
1 parent 60bfba3 commit 3091085

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

.github/workflows/scan-images.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,23 @@ concurrency:
1111
cancel-in-progress: true
1212

1313
jobs:
14-
debian:
15-
name: Scan debian image with grype
14+
fluentd:
15+
name: Scan Fluentd image with grype
1616
strategy:
1717
fail-fast: false
1818
runs-on: ubuntu-latest
1919
steps:
20-
- name: Pull and scan upstream trixie image
20+
- uses: actions/checkout@v6
21+
- name: Pull and scan Fluentd image
2122
run: |
22-
docker pull debian:trixie
23-
echo "# Scan debian image with grype (filter)" >> $GITHUB_STEP_SUMMARY
24-
docker run --rm anchore/grype:latest debian:trixie --ignore-states wont-fix | grep -v Negligible >> $GITHUB_STEP_SUMMARY
25-
echo "# Scan debian image with grype (details)" >> $GITHUB_STEP_SUMMARY
23+
# v1.19.1-debian-amd64
24+
IMAGE=$(make echo-all-images | cut -d' ' -f1|cut -d',' -f3)
25+
echo "# Scan Fluentd image with grype (filter)" >> $GITHUB_STEP_SUMMARY
26+
docker run --rm anchore/grype:latest fluent/fluentd:$IMAGE --ignore-states wont-fix | grep -v Negligible >> $GITHUB_STEP_SUMMARY
27+
echo "# Scan Fluentd image with grype (details)" >> $GITHUB_STEP_SUMMARY
2628
echo "|NAME | INSTALLED | FIXED | IN | TYPE | VULNERABILITY | SEVERITY | EPSS | RISK | |" >> $GITHUB_STEP_SUMMARY
2729
echo "|---| ---|---|---|----|---|---|---|---|---|" >> $GITHUB_STEP_SUMMARY
28-
docker run --rm anchore/grype:latest debian:trixie | sed -e "s/won't fix/won'tfix/g" | grep -v "^NAME" | sed 's/^/|/; s/ */ | /g; s/$/ |/' >> $GITHUB_STEP_SUMMARY
30+
docker run --rm anchore/grype:latest fluent/fluentd:$IMAGE | sed -e "s/won't fix/won'tfix/g" | grep -v "^NAME" | sed 's/^/|/; s/ */ | /g; s/$/ |/' >> $GITHUB_STEP_SUMMARY
2931
ruby:
3032
name: Scan Ruby image with grype
3133
strategy:
@@ -41,20 +43,18 @@ jobs:
4143
echo "|NAME | INSTALLED | FIXED | IN | TYPE | VULNERABILITY | SEVERITY | EPSS | RISK | |" >> $GITHUB_STEP_SUMMARY
4244
echo "|---| ---|---|---|----|---|---|---|---|---|" >> $GITHUB_STEP_SUMMARY
4345
docker run --rm anchore/grype:latest ruby:3.4-slim | sed -e "s/won't fix/won'tfix/g" | grep -v "^NAME" | sed 's/^/|/; s/ */ | /g; s/$/ |/' >> $GITHUB_STEP_SUMMARY
44-
fluentd:
45-
name: Scan Fluentd image with grype
46+
debian:
47+
name: Scan debian image with grype
4648
strategy:
4749
fail-fast: false
4850
runs-on: ubuntu-latest
4951
steps:
50-
- uses: actions/checkout@v6
51-
- name: Pull and scan Fluentd image
52+
- name: Pull and scan upstream trixie image
5253
run: |
53-
# v1.19.1-debian-amd64
54-
IMAGE=$(make echo-all-images | cut -d' ' -f1|cut -d',' -f3)
55-
echo "# Scan Fluentd image with grype (filter)" >> $GITHUB_STEP_SUMMARY
56-
docker run --rm anchore/grype:latest fluent/fluentd:$IMAGE --ignore-states wont-fix | grep -v Negligible >> $GITHUB_STEP_SUMMARY
57-
echo "# Scan Fluentd image with grype (details)" >> $GITHUB_STEP_SUMMARY
54+
docker pull debian:trixie
55+
echo "# Scan debian image with grype (filter)" >> $GITHUB_STEP_SUMMARY
56+
docker run --rm anchore/grype:latest debian:trixie --ignore-states wont-fix | grep -v Negligible >> $GITHUB_STEP_SUMMARY
57+
echo "# Scan debian image with grype (details)" >> $GITHUB_STEP_SUMMARY
5858
echo "|NAME | INSTALLED | FIXED | IN | TYPE | VULNERABILITY | SEVERITY | EPSS | RISK | |" >> $GITHUB_STEP_SUMMARY
5959
echo "|---| ---|---|---|----|---|---|---|---|---|" >> $GITHUB_STEP_SUMMARY
60-
docker run --rm anchore/grype:latest fluent/fluentd:$IMAGE | sed -e "s/won't fix/won'tfix/g" | grep -v "^NAME" | sed 's/^/|/; s/ */ | /g; s/$/ |/' >> $GITHUB_STEP_SUMMARY
60+
docker run --rm anchore/grype:latest debian:trixie | sed -e "s/won't fix/won'tfix/g" | grep -v "^NAME" | sed 's/^/|/; s/ */ | /g; s/$/ |/' >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)