Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Hide secrets from `docker inspect` command (and commit, debug, etc.)

Aperta
#676 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
docker, go
Ambito
security

Direzione di ricerca

Start by reading the Docker secrets-engine documentation and tracing how se:// values are resolved into container environment variables; the issue does not name implementation files or tests. Investigate how resolved values reach inspectable container configuration and committed images, then define and test behavior that prevents secret values from persisting or being exposed while preserving the intended runtime use.

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

Descrizione

I understand this is beyond the scope of the secrets engine (which is primarily for guarding secrets access), but wanted to share my first impressions coming into docker pass, and I suspect other users.

My mental model was images get a se:// pointer, so secrets never get pushed to Hub. But the resolved secret value appears to be written back to disk, survive reference deletion and commited into image metadata.

Not sure what set my expectation. Probably secrets usage in cloud Sandboxes so 'credentials never enter the VM', or maybe 'you no longer need plaintext secrets on disk' in the readme, or 'secrets resolve just before the container starts' and 'the same reference can be reused across environments ... resolve against your local OS keychain in dev and against a prod vault in CI' in the docs docs made me think this was ephemeral runtime injection.

docker pass set db-password=supersecret123

cat > compose.yaml <<'EOF'
services:
  db:
    image: postgres:alpine
    environment:
      - POSTGRES_PASSWORD=se://db-password
EOF

docker compose up -d

docker inspect $(docker compose ps -q db) --format '{{json .Config.Env}}'
# ["POSTGRES_PASSWORD=supersecret123", ...]   <- plaintext secret stored on disk

docker pass rm db-password
docker commit $(docker compose ps -q db) db:snapshot
docker inspect db:snapshot --format '{{json .Config.Env}}'
# ["POSTGRES_PASSWORD=supersecret123", ...]    <- baked into any image you commit or push

Mostly concerned about accidental (agentic or otherwise) push/save, and anyone who pull/load the image reads the resolved secret value without access to the original keychain. Keeping the se:// reference in Config.Env would keep the value out of there but I doubt it's that trivial to solve.

Image
Lingua principale
Go
Stelle
95
Fork
18
Merge medio
7h 52m
PR unite (30g)
31

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 docker/secrets-engine

Tutte le issue di docker/secrets-engine

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.