chore: build the canonical MinIO image from a pinned upstream source (#46) #50
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #50"
general
weight: 0.35
Xander-Xai
Why
MinIO Community Edition is a source-only distribution and the official public image is gone. Re-verified for this change, not assumed:
| Fact | How verified | Result |
|---|---|---|
|
minio/minioupstream state | GitHub APIrepos/minio/minio|archived: true, default branchmaster,AGPL-3.0, last push2026-04-24|| Community Edition distribution policy |
README.md@ pinned commit | "We will no longer provide pre-compiled binary releases for the community version"; README also states "THIS REPOSITORY IS NO LONGER MAINTAINED." || Docker Hub availability |
GET hub.docker.com/v2/repositories/minio/minio/tags|{"message":"object not found"}— the repository is deleted, not merely frozen || Published release assets | GitHub API
releases|RELEASE.2025-10-15T17-29-55Zhas 0 binary assets || Go version |
go.mod@ pinned commit |go 1.24.0,toolchain go1.24.8|| Official build instructions |
README.md→ Build Docker Image | build the binary from source first, thendocker build .|So
docker-compose.yml'simage: minio/minio:latesthad two defects at once:1. Mutable —
:latestmeans the deployed artifact was not a function of the Git commit.2. Dead —
docker compose upcould no longer resolve anyminio/minio:<tag>. And the newest image that ever existed would have been frozen below theRELEASE.2025-10-15fix for CVE-2025-62506.This is why the issue's original acceptance ("replace with a concrete supported release tag", "traceable to an upstream published release") could not be met honestly. Per the review instruction I widened it to "immutable, traceable official upstream source reference: published tag OR full 40-character commit SHA" and recorded the reasoning on the issue before implementing: #46 comment.
What
Only one thing changes: where the MinIO server binary/image comes from.
deploy/minio/Dockerfile(new) — minimal multi-stage build:- builder
golang:1.24-alpine3.22(the Go version comes from upstream's owngo.mod); installsbash/perl/git/makebecause the pinned commit'sbuildscripts/checkdeps.shneeds them;- fetches exactly the pinned SHA from
github.com/minio/minio, then re-verifiesgit rev-parse HEADequals it;- compiles with that commit's own
make buildtarget — its Makefile supplies-tags kqueue -trimpathand the ldflags viabuildscripts/gen-ldflags.go. No build flags were invented here;- fails closed if
MINIO_COMMITis unset or is not a 40-char lowercase hex SHA, so the build can never silently fall through tomaster;- runtime
alpine:3.22.6+curl(the canonical healthcheck shells out to curl) +ca-certificates+tzdata, running as the unprivilegedminiouser (uid/gid 1000);- both base images pinned by multi-arch OCI index digest, not just by version tag — see the review follow-up below.
docker-compose.yml—minionow usesbuild:withMINIO_COMMITand the auditable local tagbeauty-rag-minio:7aac2a2c;image: minio/minio:latestis gone.tests/test_container_image_pins.py(new) — 24 deterministic static guards.docs/deployment-guide.md— operator-facing provenance + license-boundary note.Pinned source reference
7aac2a2c5b7c882e68c1ce017d8256be2feea27f— committer date2026-02-12T20:18:48Z, subject "update README.md format and clarify state of the project".It is the final commit on
masterof the archived upstream. I pinned the final upstream state rather than reaching further back for a commit with a more "code-like" diff, and recorded the trade-off rather than glossing over it: this commit touchesREADME.mdonly, so the compiled Go source is identical to its parent. It is chosen because it post-dates theRELEASE.2025-10-15CVE fix — the fix the dead public image never received.The image carries OCI labels (
org.opencontainers.image.revision,io.minio.upstream.commit) so the artifact is auditable back to the commit.docker compose configUnchanged MinIO contract:
expose: ["9001"],minio-data:/minio_data,MINIO_ROOT_USER=${MINIO_ACCESS_KEY:?…}/MINIO_ROOT_PASSWORD=${MINIO_SECRET_KEY:?…},command: ["minio","server","/minio_data","--console-address",":9001"], the curl healthcheck withinterval 30s/timeout 20s/retries 3,restart: unless-stopped,rag-network. Verified identical, and pinned by tests.No
ENTRYPOINTis set in the image: with an entrypoint, Compose'scommandlist would becomeminio minio server …and break the server invocation that/api/mediapresigned URLs depend on.Supply-chain guards
tests/test_container_image_pins.py(25 tests) — no:latestanywhere canonical; nominio/minio:reference;MINIO_COMMITis a full 40-char lowercase SHA;master/main/latest/HEADrejected as a source ref; the Dockerfile consumes that ref and validates its shape; no vendored MinIO source and nogo install …@latest; everyFROMcarries a well-formedsha256:digest; the runtime stage selects a non-rootUSERwhose account exists and owns/minio_data; and preservation of the data volume, auth env, ports, command and healthcheck.I verified the guards bite by injecting eight regressions —
:latestrestored,MINIO_COMMIT: master, abbreviated SHA, healthcheck deleted,ENTRYPOINTadded, volume swapped, builder reverted to a moving tag, andUSERremoved — each failed with the intended message, and the clean state returns to 25/25.Validation
| Check | Result |
|---|---|
|
docker compose config| pass || all four overlays (
gpu/cpu/microservices/observability) | pass ||
scripts/check_repo_consistency.py| pass ||
ruff check ./ruff format --check .| pass / 279 files formatted ||
pytestrelated suites (pins, compose,deploy/, media route, api, consistency) | 629 passed |The two overlays initially reported
FAIL; that is the pre-existing intentional fail-fast onGF_SECURITY_ADMIN_PASSWORD. I confirmed it reproduces identically on pristineorigin/mainand that both overlays resolve on base and branch once the variable is supplied — so it is not a regression from this change, and I left it alone.What not (explicit non-goals)
/api/mediais not touched and was not re-validated end-to-end.minio/minio:<tag>; the repository is deleted, so no such reference exists to pin.License / provenance note
MinIO is an external AGPLv3 dependency built from official upstream source. The source is fetched from
github.com/minio/minioat build time and is neither vendored into this repository nor relicensed;org.opencontainers.image.licenseson the built image isAGPL-3.0-only. This records dependency provenance only and is not a legal conclusion — operators remain responsible for their own AGPLv3 obligations.Build test — EXECUTED (not blocked)
docker compose build miniowas executed once on this host (Docker 29.5.2):beauty-rag-minio:7aac2a2c, idsha256:21cf96d6…, 43.9 MB;minio version DEVELOPMENT.2026-02-12T20-18-48Z (commit-id=7aac2a2c5b7c882e68c1ce017d8256be2feea27f)— direct proof it came from the pinned source;Cmd, emptyEntrypoint,/minio_datavolume andWorkingDirall match the intended contract.A throwaway single-host container (project
minio-pin-smoke, since removed withdown -v) reachedhealthyvia the unchanged curl healthcheck, answered/minio/health/liveand/minio/health/readywith 200, returned 403 unauthenticated, and answered a SigV4-signedListBucketswith 200 and valid S3 XML — so the root-credential env contract and the S3 auth path the Python SDK uses both work.Runtime evidence
docs/deployment-guide.mdas a one-off local run and explicitly not a CI guarantee; contract and guards remainREPO_VERIFIED, and/api/mediaend-to-end, production and HA remainPENDING.Because the canonical Compose no longer contains the dead public MinIO image reference and* the immutable source contract is complete and build-verified,
Closes #46is used. No other issue is referenced or merged.Closes #46
---
Review follow-up (commit
b5cdf11)Codex review raised two P2 findings. Both were substantive and are fixed; the threads are left unresolved for re-review rather than marked addressed.
1.
golang:1.24-alpine3.22was described as immutable but is not. A version tag still moves: the Go patch level and the Alpine manifest are rebuilt upstream under the same tag, so the compiler — and therefore the resulting MinIO binary — could change while the Compose image tag and the recorded upstream commit stayed identical. That is the same drift class this issue exists to remove, one layer down. Both base images are now pinned by multi-arch OCI index digest, each keeping a readable tag beside it so the pin stays auditable:golang:1.24-alpine3.22@sha256:3641e0d9b931dc4f2f185dcd669c4679670e9277c8166a838ddb98a2d4389cb5alpine:3.22.6@sha256:5291449c3df73caf6ed85e649dec1b9e818b39a5d8c871e97afc13e9cd5e8fa8The
docker buildx imagetools inspectprocedure for a deliberate update is recorded in both the Dockerfile and the deployment guide, so the next refresh is a reviewable act.2. The runtime stage created an unprivileged
minioaccount but never selected it, so the network-facing storage service still ran as UID 0 — hardening that granted root while implying otherwise. It now setsUSER minio(uid/gid 1000, matching the rootDockerfile's app user) and owns/minio_data, so a freshly created volume inherits that ownership.Because this change could plausibly break writes, I re-validated rather than assumed: the rebuild was clean, the container reported
healthy,idshoweduid=1000(minio), and a SigV4CreateBucket/PUT/GETcycle completed with/minio_data/smoke-bucketon disk owned byminio:minio— so the privilege drop did not trade a root problem for an unwritable data directory.Flagged rather than buried: the previous public image ran as root, so a volume it created is root-owned and the non-root process cannot write to it. New deployments need nothing extra; upgrading an existing
minio-datavolume needs a one-timechown -R 1000:1000, documented in the Dockerfile anddocs/deployment-guide.md.