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

Open
#202 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
docker, docker-compose, python
Domain
devops, security

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Python
Stars
0
Forks
2
Avg merge
8h 26m
Merged PRs (30d)
47

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TechTraverse/stac-higher

All issues in TechTraverse/stac-higher

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.