Skip to content

Commit 5f67932

Browse files
committed
ci: add docker image scanning
1 parent 82218a1 commit 5f67932

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ jobs:
2525
with:
2626
node-version: "20"
2727

28+
- name: Install Trivy
29+
run: |
30+
sudo apt-get update
31+
sudo apt-get install -y wget apt-transport-https gnupg lsb-release
32+
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo gpg --dearmor -o /usr/share/keyrings/trivy-archive-keyring.gpg
33+
echo "deb [signed-by=/usr/share/keyrings/trivy-archive-keyring.gpg] https://aquasecurity.github.io/trivy-repo/deb stable main" | sudo tee /etc/apt/sources.list.d/trivy.list
34+
sudo apt-get update
35+
sudo apt-get install -y trivy
36+
2837
- name: Sync Python dependencies
2938
run: uv sync --frozen
3039

@@ -33,3 +42,6 @@ jobs:
3342

3443
- name: Run test coverage
3544
run: make coverage
45+
46+
- name: Scan Docker images
47+
run: make scan-images

Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,10 @@ audit:
3535

3636
coverage:
3737
uv run --with pytest-cov pytest --cov=src --cov-report=term-missing --cov-fail-under=85
38+
39+
scan-images:
40+
docker build -t nimbus-control-plane:ci .
41+
trivy image --exit-code 1 --severity HIGH,CRITICAL --ignore-unfixed --no-progress nimbus-control-plane:ci
42+
docker build -t nimbus-ai-runner:ci containers/ai-eval-runner
43+
trivy image --exit-code 1 --severity HIGH,CRITICAL --ignore-unfixed --no-progress nimbus-ai-runner:ci
44+
docker image rm -f nimbus-control-plane:ci nimbus-ai-runner:ci >/dev/null 2>&1 || true

0 commit comments

Comments
 (0)