Security: raw config-to-env output (decrypted secrets) is echoed to pod logs on failure

オープン 初心者向け
#24 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
77/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
php, shell
領域
devops, security

調査の方向性

187 行目の scripts/docker-entrypoint.sh を開き、失敗メッセージで $config_env_output と $config_err_output がどのように使われているかを調べます。失敗理由、終了コード、redacted stderr は維持したまま、ログに記録されるメッセージから stdout を削除します。失敗ログに config-to-env の出力が含まれなくなったことを確認します。

索引モデルが issue の本文から書いたものです。

説明

Finding (medium): config-to-env output echoed to the log on failure

scripts/docker-entrypoint.sh:187 (commit fe16600): echo "[CONFIG] ERROR: Failed to load config from '$CONFIG_SVC' ($config_fail_reason, exit code $config_exit): $config_env_output $config_err_output" >&2.

$config_env_output is the stdout of npx @osaas/cli web config-to-env: export NAME=value lines that include secret parameters decrypted with CONFIG_API_KEY. When the load is marked failed (non-zero exit, timeout, or output with no valid export line) the stdout, which may hold partial exports, goes to stderr, the pod log, Loki and anyone with log access.

Suggested fix: print only $config_fail_reason, the exit code and a redacted $config_err_output; never print the stdout.

Siblings with the same line: Eyevinn/web-runner#75, Eyevinn/python-runner#38, wasm-runner (filed separately).

Lessons

Found by the #269 logger-call sweep (Eyevinn/osaas-maker-manager#275, ticket S4); static read of a tarball of the default branch, not reproduced live. Source: Eyevinn/osaas-maker-manager#269.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 [email protected]

主要言語
Shell
スター
0
フォーク
2
平均マージ
45分
マージ済み PR(30日)
6

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

似ている issue

Shell/Bash の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。