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

Đang mở Phù hợp với người mới
#24 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
77/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
php, shell
Lĩnh vực
devops, security

Hướng nghiên cứu

Mở scripts/docker-entrypoint.sh tại dòng 187 và kiểm tra cách thông báo lỗi sử dụng $config_env_output và $config_err_output. Xóa stdout khỏi thông báo được ghi log, đồng thời giữ nguyên lý do lỗi, mã thoát và stderr đã được che thông tin nhạy cảm. Xác nhận log lỗi không còn chứa đầu ra config-to-env.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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]

Ngôn ngữ chính
Shell
Star
0
Fork
2
Merge trung bình
45 phút
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue tương tự

Thêm issue về Shell/Bash

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.