Non-deterministic wildcard secret selection
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
- #724 của @locker95 — đã đóng, không merge
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Read plugin.go and run.go around the “First match wins” handling, then compare how wildcard matches are selected with the sorting in testing.go. Reproduce the issue with the commands in the report; done means repeated runs consistently select the intended first match, with coverage that catches nondeterministic ordering.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Wildcard secrets with 2+ matches randomly inject the wrong secret ~1 in 8 times.
The docs recommend a docker/db/<env>/password layout, and docker pass run --help uses se://*/password as the wildcard example and says the "first match is used".
Steps to reproduce:
docker pass set app/dev/pw=test
docker pass set app/prod/pw=qcXU9Yt7jWy0YV8FAAk1kDh89JPh4r3F
for i in $(seq 100); do docker run --rm -e DB_PASSWORD='se://app/*/pw' alpine printenv DB_PASSWORD; done
# 14 test
# 86 qcXU9Yt7jWy0YV8FAAk1kDh89JPh4r3F
Compose inherits this with --scale, or multiple deploy.replicas: with multiple environment::
cat > compose.yaml <<EOF
services:
app:
image: alpine
command: printenv DB_PASSWORD
environment:
DB_PASSWORD: se://app/*/pw
EOF
docker compose up --scale app=100
I believe the cause is in plugin.go and run.go under a // For now: First match wins. The 1/8 split reminds me of Go's swiss-mapping on small sets, not a race condition.
Introduced by #666 (spooky!) which flagged this as a critical/high/security finding "non-deterministic secret selection"
Not caught by testing.go because it sorts the results.
- Ngôn ngữ chính
- Go
- Star
- 97
- Fork
- 23
- Merge trung bình
- 2 giờ 1 phút
- Pull request đã merge (30 ngày)
- 33
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của docker/secrets-engine
-
Can't be build at BSD anymoreĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 57/100
docker/secrets-engine#739 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
docker/secrets-engine#709 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
docker/secrets-engine#682 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
docker/secrets-engine#676 · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
docker/secrets-engine#665 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của docker/secrets-engine
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
IBM-Cloud/terraform-provider-ibm#7115 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
fluxcd/notification-controller#1441 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
volcengine/volcengine-go-sdk#163 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
OneBusAway/maglev#2145 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
priority/medium status/ready type/chore
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
discobox-ai/discobox#1357 ·
Maintainer thường phản hồi trong vòng 1 ngày