Debian snapshot downloads do not require signature verification

Abierto
#229 2 comentarios 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
30/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Activo
Stack tecnológico
debian, shell

Línea de trabajo

Start with the build CI workflow and 10-setup-apt.sh, then trace how debian-archive-keyring, the generated APT source configuration, and the Debian snapshot URL are used. Review the gh attestation verify flow and document whether the current settings provide signature verification and what downstream consumers should conclude. Done means the security model and any required changes are agreed and verified.

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

Descripción

Hello, I recently opened #225 in regard to this issue. Apologies that the PR was difficult to parse. However, I re-reviewed the codebase and it still appears to me that there is a gap, and I was hoping you could confirm if it is a real security issue or correct my understanding of the security model.

Given a final flashbox artifact, as published with the git workflow, it seems natural that one would want to trace back to the Debian snapshot used, and one would want to make sure it truly came from the Debian maintainers, as opposed to a malicious version developed by an attacker. This repo also makes use of GitHub attestations, which I assume is so one could do a faster sanity check (by trusting gh attestation verify) that the final artifact was produced correctly rather than doing a full reproduction of the build.

Given the above flow, it seems like there are currently gaps in what the repo provides. First, The existing build CI workflow installs debian-archive-keyring on the runner, but it does not seem like it is currently wired to be used. In particular, when 10-setup-apt.sh generates the APT source configuration used to download packages from the selected Debian snapshot, Trusted: yes is set instead of Signed-By: {Keyring path}. So the configured keyring does not appear to be used anywhere, which seems like a red flag when trying to determine if the system is safe. Additionally, the source is MIRROR="http://snapshot.debian.org/archive/debian/${SNAPSHOT}”, which is an http path instead of https. Thus, it seems like the flow is vulnerable to a MitM attack.

This may be caught if a third party successfully retrieved the intended snapshot, did a full reproduction of the build, and reported the discrepancy. However, if Flashbots relies on the published artifact, it seems like this might not get caught during the initial build before its rolled out to production. Additionally, reasonable third parties that put trust in the GitHub attestation may be fooled as well, and it seems like it might be difficult to attribute where the discrepancy came if one is detected.

So my questions would be:

  1. What should downstream consumers conclude from a successful gh attestation verify, and what downstream consumers exist in the flashbots ecosystem?
  2. The build workflow installs debian-archive-keyring on the runner. Where is this intended to be used, given that the generated APT source sets Trusted: yes? What justifies the Trusted: yes setting, and how are third parties that reproduce the build supposed to account for it?
  3. In general, is there a security issue here when combined with the use of http instead of https, and if not what bridges these gaps
Lenguaje dominante
Shell
Estrellas
26
Forks
18
Merge medio
2 d 8 h
PR fusionados (30 d)
17

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 flashbots/flashbots-images

Todos los issues de flashbots/flashbots-images

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.