secrets set --env-file prints secret values in its parse error
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
Línea de trabajo
Start at the implementation of supabase secrets set --env-file and trace how malformed env-file lines are parsed and turned into errors. Reproduce both examples with fake values, then verify that failures report the filename and line number without including line content; add or run the relevant parser and CLI tests if present.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
When supabase secrets set --env-file <file> cannot parse a line of the file, the
error message includes the file's content. The file exists only to hold secrets, so
this prints secret values to the terminal, and from there into CI logs, shell
scrollback and AI-assistant transcripts.
We hit this in production. The file held a bare token (no KEY= prefix) by
mistake. The command failed, as it should, but the error printed the live token
and we had to revoke and rotate it. The same thing happens with a value whose
closing quote is missing (KEY="value).
To reproduce (fake values only)
printf 'eyJhbGciOiJIUzI1NiJ9.FAKE-NOT-A-REAL-TOKEN.signature\n' > /tmp/bad.env
supabase secrets set --env-file /tmp/bad.env --project-ref <any-project>
printf 'MY_KEY="fake-value-without-closing-quote\n' > /tmp/bad2.env
supabase secrets set --env-file /tmp/bad2.env --project-ref <any-project>
In both cases the error output contains the fake value.
Expected behavior
The error names the file and the line number (for example
/tmp/bad.env:1: expected KEY=VALUE) and never prints the line's content. A parser
for a secrets file should treat every byte of it as secret, including in error
messages.
System information
- Supabase CLI version: 2.78.1
- OS: Linux (Ubuntu, x86_64)
Additional context
Our workaround is to set Edge Function secrets through the Management API
(POST /v1/projects/{ref}/secrets) with a JSON body built in memory, and to block
secrets set --env-file in our automation. The same "don't echo the input on a
parse error" rule probably applies to any other CLI command that reads an env file.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.4k
- Forks
- 526
- Merge medio
- 1 d 2 h
- PR fusionados (30 d)
- 287
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la 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 supabase/cli
-
db push applies migrations when the confirmation answer is not yes or noPosiblemente ocupada @7ttp la tomó hace 1 día. Abierto🐛 Bug supabase/cli
supabase/cli#6869 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
db diff (migra): session search_path/role applied once per pool, lost on idle reconnect → spurious drop+create and REVOKE floodsPosiblemente ocupada @7ttp la tomó hace 1 día. Abierto🐛 Bug supabase/cli
supabase/cli#6860 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
functions serve: SIGTERM to a stale process kills unrelated processes via kill(-pid) on reused child PIDsPosiblemente ocupada @7ttp la tomó hace 1 día. Abierto🐛 Bug supabase/cli
supabase/cli#6858 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
🐛 Bug supabase/cli
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
🐛 Bug supabase/cli
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
Todos los issues de supabase/cli
Issues similares
-
needs:triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
ai-discovered
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
jessepollak/home#1627 ·
Los mantenedores suelen responder en 1 día
-
agent-canvas bug llm priority:low ready-for-dev
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
OpenHands/OpenHands#17806 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
radius-project/ai-extensions#923 ·
Los mantenedores suelen responder en 1 día