Compose: any service on the default network can create containers through the docker-socket-proxy

Aperta
#202 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
docker, docker-compose, python
Ambito
devops, security

Direzione di ricerca

Read docker-compose.yml and the compose test that pins the socket proxy settings; update the network access, explicit image defaults, and related compose comment. Check docs/ISSUES.md I-171 and coordinate the EVENTS=1 requirement with K-4 (#12). Done when the test covers EVENTS, PING, and VERSION, and I-171 is updated; rebuilding the stack and checking process runs, image scans, and API isolation are lead-only steps.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

queue: k8s compute (K)

Queue: K (#2) · found during K-3's review (#11) · docs/ISSUES.md I-171

In docker-compose.yml the docker-socket-proxy sits on the default network with CONTAINERS=1, IMAGES=1 and POST=1. It is meant for the pipeline only, but database, api, auth-proxy, keycloak, minio, titiler, tipg, cube-server and the init jobs can all reach it, so a compromised service there can create and start containers on the Docker host (and read other containers' environments through GET /containers/{id}/json). This predates K-3, which only added the read-only INFO=1. Process-run containers are not affected: they are on the separate process-runs network.

This is the local compose stack, not the Kubernetes deployment (which has no socket proxy).

Task

  • Put the proxy on its own network shared only with the pipeline, and take it off the default network.
  • Pin the image's implicit defaults explicitly (EVENTS, PING, VERSION are on by default in tecnativa's image) and extend the compose test that pins the proxy's settings to cover them. Coordinate with K-4 (#12), whose watcher needs EVENTS=1.
  • Update I-171 and the compose comment.

Lead-only steps

Rebuild the stack and confirm a process run and an image scan still work, and that curl docker-socket-proxy:2375/containers/json from the api container no longer connects.

Lingua principale
Python
Stelle
0
Fork
2
Merge medio
8h 26m
PR unite (30g)
47

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TechTraverse/stac-higher

Tutte le issue di TechTraverse/stac-higher

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.