Non-deterministic wildcard secret selection
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
- #724 @locker95 による — マージされずにクローズ
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
調査の方向性
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分
- マージ済み PR(30日)
- 33
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
docker/secrets-engine のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 57/100
docker/secrets-engine#739 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
docker/secrets-engine#709 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
docker/secrets-engine#682 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
docker/secrets-engine#676 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
docker/secrets-engine#665 ·
メンテナーはふだん 1 日以内に返信
docker/secrets-engine の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
fluxcd/notification-controller#1441 ·
メンテナーはふだん 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 日以内に返信
-
TestPseudoLocaleRemote fails now and then: it types the code before the laptop asks for it対応中かも @fzn0x が今日担当しました。 オープンbug priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
edit_file diff rendering panics on invalid UTF-8 text対応中かも @TDnorthgarden が今日担当しました。 オープンarea/tui
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
docker/docker-agent#4955 ·
メンテナーはふだん 1 日以内に返信