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

未关闭 适合新手
#24 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
77/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
php, shell
领域
devops, security

调研方向

打开第 187 行的 scripts/docker-entrypoint.sh,检查失败消息如何使用 $config_env_output 和 $config_err_output。从日志消息中移除 stdout,同时保留失败原因、退出代码和已脱敏的 stderr。确认失败日志不再包含 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 分钟
30 天内合并 PR
6

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。