Skip to content

Commit a06ff70

Browse files
committed
fix(ci): align gateway build base and add image security audit
Pin the Rust builder to Bookworm to match the runtime glibc, scan trogon-gateway canary images with Trivy/SBOM in CI, and keep docs builds on Corepack-managed pnpm with frozen installs.
1 parent dbc1a23 commit a06ff70

4 files changed

Lines changed: 42 additions & 8 deletions

File tree

.github/workflows/canary-container-images.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
password: ${{ secrets.GITHUB_TOKEN }}
5252

5353
- name: Build and push canary image
54+
id: build_image
5455
uses: docker/build-push-action@v7
5556
with:
5657
context: ${{ steps.service_config.outputs.context }}
@@ -61,3 +62,38 @@ jobs:
6162
${{ steps.image.outputs.name }}:sha-${{ steps.image.outputs.short_sha }}
6263
cache-from: type=gha
6364
cache-to: type=gha,mode=max
65+
sbom: true
66+
provenance: mode=max
67+
68+
- name: Scan image for vulnerabilities
69+
uses: aquasecurity/trivy-action@0.32.0
70+
with:
71+
image-ref: ${{ steps.image.outputs.name }}:canary
72+
scanners: vuln
73+
format: table
74+
output: trivy-results.txt
75+
ignore-unfixed: true
76+
exit-code: 0
77+
78+
- name: Generate SBOM
79+
uses: anchore/sbom-action@v0.20.6
80+
with:
81+
image: ${{ steps.image.outputs.name }}:canary
82+
artifact-name: sbom-${{ matrix.service }}-spdx
83+
format: spdx-json
84+
85+
- name: Document image security audit
86+
shell: bash
87+
run: |
88+
{
89+
echo "## Image security audit: \`${{ matrix.service }}\`"
90+
echo ""
91+
echo "- Image: \`${{ steps.image.outputs.name }}:canary\`"
92+
echo "- Runtime base: \`debian:bookworm-20260518-slim\`"
93+
echo "- SBOM artifact: \`sbom-${{ matrix.service }}-spdx\` (SPDX JSON)"
94+
echo ""
95+
echo "### Vulnerability scan (Trivy, image packages)"
96+
echo '```text'
97+
cat trivy-results.txt
98+
echo '```'
99+
} >> "$GITHUB_STEP_SUMMARY"

.github/workflows/docs-pages.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,16 @@ jobs:
2424
persist-credentials: false
2525
fetch-depth: 0
2626

27-
- name: Setup pnpm
28-
uses: pnpm/action-setup@fdbc4fdcf7d143a5d0a39e9a02e103b13e309024
29-
with:
30-
version: 11.5.1
31-
3227
- name: Setup Node
3328
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
3429
with:
35-
node-version: 24
30+
node-version: 26
3631
cache: pnpm
3732
cache-dependency-path: docs/pnpm-lock.yaml
3833

34+
- name: Enable Corepack
35+
run: corepack enable
36+
3937
- name: Setup Pages
4038
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d
4139

.mise.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ depends = ["build:rust", "build:docs"]
1818

1919
[tasks."build:docs"]
2020
dir = "docs"
21-
run = "pnpm docs:build"
21+
run = "pnpm install --frozen-lockfile && pnpm docs:build"
2222

2323
[tasks."build:rust"]
2424
dir = "rsworkspace"

devops/docker/compose/services/trogon-gateway/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ── Stage 1: chef — generate dependency recipe ──────────────────────────────
2-
FROM rust:1.96.0-slim AS chef
2+
FROM rust:1.96.0-slim-bookworm AS chef
33

44
RUN cargo install cargo-chef --locked
55

0 commit comments

Comments
 (0)