[BUG] dangerous secret name warning list is missing BASH_ENV, ENV, ZDOTDIR, IFS and other interpreter vectors
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 88/100
Línea de trabajo
Empieza en pkg/controllers/secrets.go, en dangerousSecretNames, y luego ejecuta la reproducción documentada de doppler run con BASH_ENV, ZDOTDIR, IFS y LD_PRELOAD. Se considera terminado cuando la salida de advertencia incluye las variables de shell e intérprete enumeradas, incluidas PYTHONSTARTUP, RUBYOPT y JAVA_TOOL_OPTIONS.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Go
- Estrellas
- 400
- Forks
- 87
- Merge medio
- 38 min
- PR fusionados (30 d)
- 2
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de DopplerHQ/cli
-
[BUG] doppler secrets substitute panics when an environment entry is missing '='Posiblemente ocupada @pvarshh la tomó hace 29 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
[BUG] On new Homebrew 6 calling postflight is deprecatedPosiblemente ocupada @akhilgopu72 la tomó hace 3 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
DopplerHQ/cli#559 · 4 comentarios · 2 reacciones ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
[BUG] `doppler secrets delete` shouldn't re-print every secret in plain textPosiblemente ocupada @paymog la tomó hace 19 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
DopplerHQ/cli#542 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
doppler run --watch: SSE keepalive frames fail to parse — "unexpected end of JSON input" every ~30sPosiblemente ocupada @Shubham-Padkonde la tomó hace 36 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
Todos los issues de DopplerHQ/cli
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
bug os:ios
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
hajimehoshi/ebiten#4039 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
open-telemetry/opentelemetry-go-compile-instrumentation#1713 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
JakeChampion/lang#14392 ·
Los mantenedores suelen responder en 1 día