Skip to content

Commit 45cbaf6

Browse files
authored
Scan images with Trivy (#142)
1 parent d1b9a2e commit 45cbaf6

File tree

4 files changed

+72
-62
lines changed

4 files changed

+72
-62
lines changed

.github/workflows/build-docker.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,16 @@ jobs:
6868
cache-from: type=gha
6969
cache-to: type=gha,mode=max
7070

71+
- name: Scan image with Trivy
72+
uses: aquasecurity/[email protected]
73+
with:
74+
image-ref: "${{ env.GHCR_REPO }}:${{ github.sha }}-${{ matrix.tag }}"
75+
format: "table"
76+
exit-code: "1"
77+
ignore-unfixed: true
78+
vuln-type: "os,library"
79+
severity: "CRITICAL,HIGH,MEDIUM"
80+
7181
docker-manifest:
7282
runs-on: [self-hosted, Linux]
7383

Cargo.lock

Lines changed: 57 additions & 56 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,9 @@ tower_governor = "0.4"
4848
# UI embedding
4949
rust-embed = { version = "8.5", features = ["include-exclude"] }
5050
mime_guess = "2.0"
51-
base64 = "0.22.1"
52-
tower = "0.5.2"
53-
futures = "0.3.31"
54-
futures-util = "0.3.31"
51+
base64 = "0.22"
52+
tower = "0.5"
53+
futures-util = "0.3"
5554

5655
[build-dependencies]
5756
tonic-prost-build = "0.14"

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ COPY web/ .
1010
RUN pnpm run generate-translation-types
1111
RUN pnpm build
1212

13-
FROM rust:1.87 AS chef
13+
FROM rust:1 AS chef
1414

1515
WORKDIR /build
1616

@@ -42,7 +42,7 @@ COPY proto proto
4242
RUN cargo install --locked --path . --root /build
4343

4444
# run
45-
FROM debian:bookworm-slim AS runtime
45+
FROM debian:13-slim AS runtime
4646
RUN apt-get update -y && \
4747
apt-get install --no-install-recommends -y ca-certificates && \
4848
rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)