Skip to content

[M2.2e4b1-fix] Pin the Testcontainers PostgreSQL image to its digest - #94

Merged
samuelmbabhazi merged 1 commit into
mainfrom
fix/m2.2-pin-testcontainers-postgres
Nov 5, 2026
Merged

samuelmbabhazi merged 1 commit into
mainfrom
fix/m2.2-pin-testcontainers-postgres

Conversation

@samuelmbabhazi

Copy link
Copy Markdown
Collaborator

Task

Review follow-up for #73 (M2.2e4b1). Refs #21

What changed

  • apps/api/src/testing/postgres-image.ts exports POSTGRES_TEST_IMAGE, the same digest-pinned postgres:17@sha256:3b0cda93… used by the CI service container and deploy/dev/compose.yml.
  • The eight Testcontainers call sites (browser/integration app helper and seven integration specs) use it instead of the mutable postgres:17 tag.
  • A unit test asserts the constant is digest-pinned and identical to the reference in .github/workflows/ci.yml and deploy/dev/compose.yml, so the three cannot drift.

Why

THREAT_MODEL requires every tool image to be pinned to a digest. The browser acceptance job and local integration runs pulled postgres:17 by tag, which a retagged or compromised upstream image could replace.

How it was tested

  • nx run-many -t lint typecheck test -p api in a clean worktree: 22 files, 105 tests pass, lint and typecheck clean.
  • Integration and browser jobs could not run: GitHub Actions is currently blocked by the account spending limit, and Docker is not available in the local sandbox. CI must pass before merge.

Security considerations

Supply-chain hardening of test infrastructure only. No runtime change.

Checklist

  • Lint, TS tests pass locally
  • Test added (pin consistency)
  • No new shell invocation and no new secret exposure path
  • Audit events: not applicable
  • CI green (blocked by billing)

@samuelmbabhazi
samuelmbabhazi merged commit 653f2ee into main Nov 5, 2026
2 of 11 checks passed
@samuelmbabhazi
samuelmbabhazi deleted the fix/m2.2-pin-testcontainers-postgres branch November 5, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant