Raw config-to-env output (decrypted secrets) is echoed to pod logs on failure

未關閉 適合新手
#38 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
72/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
bash, shell
領域
security

研究方向

閱讀 scripts/docker-entrypoint.sh 第245行和第261行附近的程式碼,接著追蹤 config_env_output 和 config_err_output 的擷取方式。檢查失敗路徑和不匯出的路徑,確認包含秘密資訊的 stdout 不會被記錄,且有用並經過遮蔽的 stderr 會保留下來。完成標準是這些錯誤會回報結束碼和安全的診斷資訊,同時不印出設定輸出。

由索引模型根據 Issue 內容生成。

描述

security

Finding (medium)

scripts/docker-entrypoint.sh:245 and :261: echo "[CONFIG] ERROR: Failed to load config (exit $config_exit): $config_env_output $config_err_output" >&2, and line 261 prints $config_env_output again. That variable is the stdout of npx @osaas/cli web config-to-env: export NAME=value lines including secret parameters decrypted with CONFIG_API_KEY. On non-zero exit or output with no matching export line, they go to stderr, Loki and anyone with log access. Line 97 redaction only covers git stderr (gh*_, Basic).

Fix: print only the exit code and a redacted $config_err_output. Sibling: Eyevinn/web-runner has the same line (filed separately); #26 introduced the fatal path without covering log content.

Low

The runner runs as root and OSC_ACCESS_TOKEN, GIT_TOKEN, GITHUB_TOKEN and CONFIG_API_KEY stay exported into pip install build hooks and the app; Dockerfile has curl | bash for NodeSource and unpinned pip install gradio.

Lessons

Found by the Weekly Security Audit (2026-11-04); static read of a shallow clone, not reproduced live.

🤖 Generated with Claude Code

Co-Authored-By: Claude [email protected]

主要語言
Shell
星號
0
分支
2
平均合併
40 分鐘
30 天內合併 PR
5

環境準備

  • 提供 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 沒有貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

相似的 Issue

更多 Shell/Bash Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。