Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#676 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
docker, go
Lĩnh vực
security

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Go
Star
95
Fork
18
Merge trung bình
7 giờ 52 phút
Pull request đã merge (30 ngày)
31

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của docker/secrets-engine

Tất cả issue của docker/secrets-engine

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.