secrets set --env-file prints secret values in its parse error
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 2.4k
- Fork
- 526
- Merge medio
- 1g 2h
- PR unite (30g)
- 287
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di supabase/cli
-
db push applies migrations when the confirmation answer is not yes or noForse già presa @7ttp l’ha presa oggi. Aperta🐛 Bug supabase/cli
supabase/cli#6869 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
db diff (migra): session search_path/role applied once per pool, lost on idle reconnect → spurious drop+create and REVOKE floodsForse già presa @7ttp l’ha presa oggi. Aperta🐛 Bug supabase/cli
supabase/cli#6860 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
functions serve: SIGTERM to a stale process kills unrelated processes via kill(-pid) on reused child PIDsForse già presa @7ttp l’ha presa oggi. Aperta🐛 Bug supabase/cli
supabase/cli#6858 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
🐛 Bug supabase/cli
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
🐛 Bug supabase/cli
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di supabase/cli
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
openedx/frontend-app-authoring#3274 ·
I maintainer di solito rispondono entro 1 giorno
-
🎙️ task - fix(deployer): deploy --env prep runs deploy:dev where the repo declares deploy:prepAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
area/documentation status/need-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
google-gemini/gemini-cli#29548 ·
I maintainer di solito rispondono entro 1 giorno
-
sdk-typescript vector-store
Difficoltà 2/5 Mezza giornata Idoneità per principianti 82/100
mem0ai/mem0#7495 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno