sandboxpolicy: admit section gadget images by digest, like the exec product images

Abierto
#1,108 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
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go, kubernetes
Área
backend, security

Línea de trabajo

Read the section engine implementations in pkg/sandboxpolicy/igbackend and the exec image admission path referenced by #1054 and #1101. Trace where release image digests are defined and how section readiness reports typed reasons. Add coverage for an unpinned image; done means all four enforcement image types share digest admission and the test verifies refusal and its status reason.

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

Descripción

Follow-up from the review of #1075.

Problem

The section engines (NewNativePrivilegeEngine, NewNativeNetworkEngine, NewNativeFileEngine in pkg/sandboxpolicy/igbackend) load their gadget image by reference from the store. They do not check the image digest against a pinned list. The exec engine does admit only pinned product images (#1054, #1101).

So a section image that changes under the same reference is loaded and attached on enforcing nodes without any check.

Proposal

Reuse the exec engine's admission for the section images:

  • pin each section image by digest in the release, next to the exec product images;
  • refuse to load a section image whose digest is not pinned, and report the section NotReady with a typed reason;
  • keep one admission path for all enforcement images.

Done when

  • Every enforcement image (exec, privilege, network, file) is admitted by digest through one code path.
  • A test loads an unpinned image and checks the refusal and the status reason.
Lenguaje dominante
Go
Estrellas
39
Forks
42
Merge medio
2 d 16 h
PR fusionados (30 d)
48

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 kubescape/node-agent

Todos los issues de kubescape/node-agent

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.