Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,35 @@ jobs:
run: make migrate_dev
- name: Run tests
run: go test ./... -p 1 -race -v -count=1

test_multigres:
name: Test / Multigres
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 30
services:
postgres:
image: ghcr.io/multigres/multigres-cluster:latest
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Severity: LOW

The latest tag is mutable and unpinned. If the multigres GitHub org or registry is compromised, a malicious image could be silently pushed and would execute arbitrary code in the CI runner — potentially exfiltrating repository secrets. The other service images in this workflow (postgres:15, orioledb/orioledb:beta16-pre-2-pg17) use pinned versions.
Helpful? Add 👍 / 👎

💡 Fix Suggestion

Suggestion: Pin the multigres-cluster image to a specific immutable version tag or SHA256 digest instead of using :latest. First, identify the desired release version or obtain the current image digest by running: docker pull ghcr.io/multigres/multigres-cluster:latest && docker inspect --format='{{index .RepoDigests 0}}' ghcr.io/multigres/multigres-cluster:latest. Then replace :latest with either a specific version tag (e.g., ghcr.io/multigres/multigres-cluster:v0.1.2) or a full digest pin (e.g., ghcr.io/multigres/multigres-cluster@sha256:<hash>). This follows the same pinning practice already used by the other service images in this workflow (postgres:15 and orioledb/orioledb:beta16-pre-2-pg17).

env:
MULTIGRES_GATEWAY_PG_PORT: "5432"
MULTIGRES_NUM_CELLS: "2"
ports:
- 5432:5432
options: >-
--init
--shm-size=1gb
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
- name: Init Database
# Multigres' superuser is postgres/postgres (POSTGRES_PASSWORD is
# ignored); init_postgres.sql then creates supabase_auth_admin (pw root)
# which migrations and tests connect as, exactly like the other jobs.
run: psql -f hack/init_postgres.sql postgresql://postgres:postgres@localhost:5432/postgres
- name: Run migrations
run: make migrate_dev
- name: Run tests
run: go test ./... -p 1 -race -v -count=1
Loading