UX: Embed CA bundle as fallback (Better support for `FROM scratch` base image)

Abierto
#222 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
42/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
go

Línea de trabajo

Empieza rastreando la solicitud HTTPS de chisel al repositorio de releases y su gestión existente del almacén de confianza del sistema de archivos; el payload no menciona ningún archivo fuente ni ninguna prueba. Compara un fallback de CA integrado, como rootcerts, con otras opciones, conservando el almacén de confianza normal y cualquier comportamiento de opt-in. Se considera completado cuando el flujo de trabajo FROM scratch mostrado puede contactar con GitHub sin un paquete de CA en el sistema de archivos, con cobertura para los entornos de fallback y los entornos normales.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Presently chisel expects the CA bundle to exist externally to contact Github over HTTPS. It would be beneficial to have an embedded fallback (even if opt-in via CLI flag) instead of failing, as it simplifies FROM scratch image usage which can avoid an intermediary --root path + COPY from an earlier stage.

FROM scratch
SHELL ["/nu", "-c"]
# NOTE: `chisel` is a prior stage (no official image yet)
RUN --mount=type=bind,from=chisel,source=/usr/local/bin/chisel,target=/chisel \
    --mount=type=bind,from=ghcr.io/nushell/nushell,source=/usr/bin/nu,target=/nu \
    /chisel cut --release ubuntu-24.04 --root / base-files_base
0.410 2025/04/26 01:52:05 Consulting release repository...
0.603 error: cannot talk to release repository: Get "https://codeload.github.com/canonical/chisel-releases/tar.gz/refs/heads/ubuntu-24.04": tls: failed to verify certificate: x509: certificate signed by unknown authority

The binary size should not increase that much and this would allow for running chisel on FROM scratch without having to provide ca-certificates.crt upfront (which can either add extra layer weight or conflict with chisel writing to the same location that's a temporary bind mount when using --root /).

There is a Go package rootcerts which can embed the CA bundle into the Chisel build? That will be used as a fallback when there is no trust store on the filesystem to leverage. I've not explored other options for approaching this, so there might be a better option if rootcerts is not something you're comfortable with.


Reference: Another user also pointed out the concern with an external CA bundle at the end of this comment.

Lenguaje dominante
Go
Estrellas
434
Forks
74
Merge medio
1 d 30 min
PR fusionados (30 d)
1

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de canonical/chisel

Todos los issues de canonical/chisel

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.