Skip to content

Commit 7fd4a37

Browse files
authored
add vulnerability scanning for docker images (#766)
<!-- The PR description should answer 2 (maybe 3) important questions: --> ### What This PR adds vulnerability scanning for the Docker images of the ndc-postgres using Gokakashi. <!-- Consider: do we need to add a changelog entry? --> ### How <!-- How is it trying to accomplish it (what are the implementation steps)? -->
1 parent f14a8e1 commit 7fd4a37

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.github/workflows/ship.yaml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,27 @@ jobs:
3333
- name: Build a Docker image with Nix
3434
run: nix build --print-build-logs '.#docker-${{ matrix.target }}'
3535

36+
- name: Load and get Docker image
37+
id: load-image
38+
run: |
39+
# Load the image and capture its name
40+
LOADED_IMAGE=$(docker load < result | awk -F': ' '{print $2}')
41+
echo "image=$LOADED_IMAGE" >> $GITHUB_OUTPUT
42+
echo "Loaded image: $LOADED_IMAGE"
43+
- name: Scan Docker Image with gokakashi
44+
uses: shinobistack/[email protected]
45+
with:
46+
image: ${{ steps.load-image.outputs.image }}
47+
labels: agentKey=${{ github.run_id }}-${{ matrix.target }}
48+
policy: ci-platform
49+
server: https://gokakashi-server.hasura-app.io
50+
token: ${{ secrets.GOKAKASHI_API_TOKEN }}
51+
cf_client_id: ${{ secrets.CF_ACCESS_CLIENT_ID }}
52+
cf_client_secret: ${{ secrets.CF_ACCESS_CLIENT_SECRET }}
53+
interval: 10
54+
retries: 8
55+
timeout: 30m
56+
3657
# scream into Slack if something goes wrong
3758
- name: Report Status
3859
if: always() && github.ref == 'refs/heads/main'
@@ -120,9 +141,9 @@ jobs:
120141
strategy:
121142
matrix:
122143
include:
123-
- runner: ubuntu-20.04
144+
- runner: ubuntu-latest
124145
target: x86_64-unknown-linux-gnu
125-
- runner: ubuntu-20.04
146+
- runner: ubuntu-latest
126147
target: aarch64-unknown-linux-gnu
127148
linux-packages: gcc-aarch64-linux-gnu
128149
linker: /usr/bin/aarch64-linux-gnu-gcc

0 commit comments

Comments
 (0)