Toolchain image build is not reproducible: same key yields different digests
Los mantenedores suelen responder en 1 día
@Wikid82 ya está trabajando en esto.
Desde el 1/12/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
What
toolchain-image.yml and docs/ci/toolchain-image.md assume that an unchanged recipe (same scripts/toolchain-key.sh output) always produces an identical manifest-list digest (fixed SOURCE_DATE_EPOCH, rewrite-timestamp=true, no provenance/SBOM). In practice it doesn't. Two builds of the same key on 2026-12-01 produced two different digests:
| Run | Plan | Digest pushed for :caddy-crowdsec-5b61cefa8dba4099 |
|---|---|---|
46642402360 (push, development) |
layer cache (forced=false) |
sha256:c16eaa2f2516f7b812755951d53799053831077e48c152cf51673131a7a7654d |
46642506557 (Weekly Security Rebuild → workflow_call, main) |
--no-cache --pull (forced=true) |
sha256:0112e11136a3710318b19688259becbe56f814a088e05147efed24a6a0bb3602 |
Both ran within the same hour with the same base-image digests pinned in the Dockerfile.
Impact
Severity: medium. Every forced (daily/weekly) rebuild moves the digest even when nothing upstream changed. That causes a bump PR every time and moves the tag under existing pins. Combined with concurrent publishers, the bump PR pinned the losing digest, and the PR merged stale (#2110). The race itself is being fixed separately (per-key build concurrency, plus a re-check of the registry digest before writing the pin). This issue covers the underlying nondeterminism.
Where
.github/workflows/toolchain-image.yml: "Build toolchain image (deterministic multi-arch, no QEMU)" stepDockerfile:caddy-inline/crowdsec-inline/toolchain-runtimestagesdocs/ci/toolchain-image.md: "Determinism" section (claim is currently inaccurate)
Suggested approach
- Build the same key twice, once with the GHA layer cache and once with
--no-cache --pull, and diff the two indexes and child manifests (regctl manifest get,crane config/diffoci) to find which layer or config differs. - Likely suspects:
- Go module download / build-cache contents or
-trimpath/-buildvcssettings in the xcaddy / CrowdSec compile - File mtimes that
rewrite-timestampdoesn't cover (it only rewrites timestamps newer thanSOURCE_DATE_EPOCH) - Non-pinned
apkpackage versions resolved at build time under--pull - Ordering differences in the multi-arch index
- Go module download / build-cache contents or
- Once it's reproducible, add a CI canary that builds the key twice and asserts digest equality.
Found while root-causing the failed checks on #2110.
- Lenguaje dominante
- Go
- Estrellas
- 17
- Forks
- 2
- Merge medio
- 1 h 42 min
- PR fusionados (30 d)
- 173
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Wikid82/Charon
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Docs promise signed SLSA provenance that the image build does not producePosiblemente ocupada @Wikid82 la tomó hoy. Abiertoarchitecture documentation security ui
Wikid82/Charon#2152 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Orthrus agent images are not signed or SBOM-attestedPosiblemente ocupada @Wikid82 la tomó hoy. Abiertosecurity ssl testing
Wikid82/Charon#2151 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Registry prune deletes release image signatures and SBOM attestations on GHCR after 7 daysPosiblemente ocupada @Wikid82 la tomó hoy. Abiertocritical testing
Wikid82/Charon#2150 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Minor follow-ups from the country-allow-list local-network reviewPosiblemente ocupada @Wikid82 la tomó hoy. Abiertoarchitecture backend documentation frontend low
Wikid82/Charon#2149 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de Wikid82/Charon
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
agent:ready
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
turbot/flowpipe#1162 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
LifetimeRemaining divides by zero when expireAfter is 0s, producing NaN disruption costsPosiblemente ocupada @weirong-ui la tomó hoy. Abiertokind/bug needs-priority needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
kubernetes-sigs/karpenter#3728 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
compaction: redundant exclusion checks after inRangePosiblemente ocupada @moodbased la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
docker/mcp-registry#8199 ·
Los mantenedores suelen responder en 2 días