person_detection_int8_vela_convert.sh installs Vela with the venv's seeded pip before upgrading it

Abierto Apto para principiantes
#3,953 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
76/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python, shell

Línea de trabajo

Empieza por tensorflow/lite/micro/tools/make/ext_libs/person_detection_int8_vela_convert.sh, especialmente la configuración de venv y las instalaciones de pip alrededor de las líneas 61–64. Lee las indicaciones de Python enlazadas y luego comprueba cómo puede el script instalar y verificar pip 26.2.2 o posterior sin depender del almacén de confianza de pip incluido. La tarea estará completa cuando la venv nueva actualice pip antes de instalar NumPy y Vela, con la verificación TLS activada; la comprobación de regresión propuesta puede verificar el comportamiento con un pip incluido antiguo.

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

Descripción

Summary

tensorflow/lite/micro/tools/make/ext_libs/person_detection_int8_vela_convert.sh creates a fresh venv and installs NumPy and Vela with the pip that python3 -m venv seeds from the interpreter's ensurepip (:61-64):

    python3 -m venv $TEMPFILE
    source $TEMPFILE/bin/activate
    pip install numpy==1.26.4 >&2
    pip install --prefer-binary ethos-u-vela >&2

pip loads its vendored certifi bundle in addition to the system trust store, so the downloads trust whatever roots the seeded pip shipped with. After the eMudhra/emSign incident, the Python maintainers' guidance is that pip must be at least 26.2.2, and that until the CPython ensurepip fix ships, pip should be upgraded in every new venv before it is used: https://discuss.python.org/t/information-for-python-users-regarding-emudhra-emsign-ca-certificate-security-incident/109576/1. Upgrading the parent environment or the OS trust store does not change the pip inside the new venv.

The script runs when ethos_u.inc:82 converts the person-detection model and ethos-u-vela is not already installed, for example in Corstone-300 builds with CO_PROCESSOR=ethos_u (test_cortex_m_corstone_300.sh:39).

Observed

We found this in heliaRT (Ambiq's TFLM fork), which carries this script unchanged. In our CI image, the ensurepip wheel holds pip 23.0.1 with certifi 2022.12.07, which still includes the distrusted emSign ECC Root CA - G3. We measured this in our image only, not in upstream's CI images or runners. The script is unchanged at tensorflow/tflite-micro@0f3f6012.

Suggested fix

After creating the venv, install a fixed pip (>= 26.2.2) in a way that does not depend on the old pip's trust store (for example a hash-pinned wheel, as the guidance above does), check its version, then install NumPy and Vela. TLS verification stays enabled throughout. I can send a PR with a regression check that seeds the venv with an old pip.

Lenguaje dominante
C++
Estrellas
3.1k
Forks
1.1k
Merge medio
1 d 48 min
PR fusionados (30 d)
83

Preparar el entorno

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 tensorflow/tflite-micro

Todos los issues de tensorflow/tflite-micro

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.