[BUG] dangerous secret name warning list is missing BASH_ENV, ENV, ZDOTDIR, IFS and other interpreter vectors
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
- 88/100
Hướng nghiên cứu
Bắt đầu tại pkg/controllers/secrets.go, ở dangerousSecretNames, sau đó chạy bản tái hiện doppler run được ghi trong tài liệu với BASH_ENV, ZDOTDIR, IFS và LD_PRELOAD. Hoàn tất khi đầu ra cảnh báo bao gồm các biến shell và interpreter được liệt kê, trong đó có PYTHONSTARTUP, RUBYOPT và JAVA_TOOL_OPTIONS.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
The CLI's dangerous-secret-name warning list (dangerousSecretNames in pkg/controllers/secrets.go) is missing several well-known environment-variable code-execution vectors — most notably BASH_ENV, plus ENV, ZDOTDIR, IFS, PYTHONSTARTUP, RUBYOPT, and JAVA_TOOL_OPTIONS.
doppler run warns when the config contains dangerous secret names (per https://docs.doppler.com/docs/accessing-secrets#injection), and the docs explicitly note the list "is not exhaustive". Still, BASH_ENV is arguably the most common shell-hijack vector on Linux/macOS: non-interactive bash sources $BASH_ENV before executing a command, so a secret named BASH_ENV pointing at any shell script at a predictable path (repo scripts, CI artifact dirs, /tmp files created by the pipeline) executes in every doppler run consumer's environment. Currently it is injected with no warning, while e.g. LD_PRELOAD gets one.
Confirmed on a dev build against a mock API: with secrets BASH_ENV=/path/script, ZDOTDIR=/dir, IFS=;;, LD_PRELOAD=/lib.so:
- the warning output listed only
LD_PRELOAD BASH_ENV,ZDOTDIR, andIFSwere all injected into the child environment- the script referenced by
BASH_ENVwas sourced and executed by the spawned/bin/bash -cchild
(Note: IFS requires no file at all — it alters word-splitting of the user's own --command.)
To Reproduce
- Configure secrets including
BASH_ENVpointing to an existing shell script andLD_PRELOADpointing to a nonexistent path doppler run --command '/bin/bash -c "true"' --debug- Observe the warning lists only
LD_PRELOAD; theBASH_ENVscript executes with no warning
Expected behavior
The warning list should include the standard shell/interpreter-hijack variable names — at minimum BASH_ENV, ENV, ZDOTDIR, IFS, PYTHONSTARTUP, RUBYOPT, JAVA_TOOL_OPTIONS — so users relying on the CLI's warning get consistent coverage of the vectors the docs describe.
Suggested fix (one-line addition to dangerousSecretNames in pkg/controllers/secrets.go):
var dangerousSecretNames = [...]string{
// Operating Systems environment variable names
// Linux
"PROMPT_COMMAND",
"LD_PRELOAD",
"LD_LIBRARY_PATH",
"BASH_ENV", // non-interactive bash sources this
"ENV", // POSIX sh sources this
"ZDOTDIR", // zsh sources $ZDOTDIR/.zshrc
"IFS", // alters shell word-splitting
...
Desktop (please complete the following information):
- OS: Linux
- Version 7.0.0-28-generic
CLI Version:
Built from source @ b618e5f (version dev); present in current main.
Additional context
Found during a security review of the CLI. The docs already document the RCE danger and recommend mounting as the remediation, so this is a warning-completeness improvement rather than a security report. The same review also confirmed PATH/PS1/HOME reserved-key handling works as intended. Happy to open a PR.
- Ngôn ngữ chính
- Go
- Star
- 397
- Fork
- 87
- Merge trung bình
- 20 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay 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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của DopplerHQ/cli
-
[BUG] doppler secrets substitute panics when an environment entry is missing '='Có thể đã có người làm @pvarshh đã nhận 6 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
doppler run --watch: SSE keepalive frames fail to parse — "unexpected end of JSON input" every ~30sCó thể đã có người làm @Shubham-Padkonde đã nhận 14 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 78/100
Tất cả issue của DopplerHQ/cli
Issue tương tự
-
area/import kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
kind/documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
kubernetes-sigs/dra-driver-nvidia-gpu#1569 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
openclaw/openclaw-enterprise#2571 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
All resource links brokenĐang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày