Non-deterministic wildcard secret selection
维护者通常 1 天内回复
还没有人认领这个 Issue。
- #724 来自 @locker95 —— 已关闭,未合并
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Go
- 星标
- 97
- 派生
- 23
- 平均合并
- 2 小时 1 分钟
- 30 天内合并 PR
- 33
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
docker/secrets-engine 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 57/100
docker/secrets-engine#739 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 45/100
docker/secrets-engine#709 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
docker/secrets-engine#682 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
docker/secrets-engine#676 · 2 个 reaction ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
docker/secrets-engine#665 ·
维护者通常 1 天内回复
查看 docker/secrets-engine 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
IBM-Cloud/terraform-provider-ibm#7115 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
fluxcd/notification-controller#1441 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 66/100
volcengine/volcengine-go-sdk#163 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
OneBusAway/maglev#2145 ·
维护者通常 2 天内回复
-
priority/medium status/ready type/chore
难度 2/5 1-3 小时 新手友好度 84/100
discobox-ai/discobox#1357 ·
维护者通常 1 天内回复