secrets set --env-file prints secret values in its parse error
メンテナーはふだん 1 日以内に返信
@7ttp がすでに取り組んでいます。
2026年9月27日 から。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 2.4k
- フォーク
- 526
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 307
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
supabase/cli のほかの issue
-
🐛 Bug supabase/cli
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
🐛 Bug supabase/cli
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
-
SQL statement splitter breaks E'...' strings that contain a backslash-escaped quote対応中かも @7ttp が 1 日前に担当しました。 オープン🐛 Bug supabase/cli
メンテナーはふだん 1 日以内に返信
-
db push applies migrations when the confirmation answer is not yes or no対応中かも @7ttp が 1 日前に担当しました。 オープン🐛 Bug supabase/cli
メンテナーはふだん 1 日以内に返信
-
🐛 Bug supabase/cli
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
bug via-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
pingdotgg/t3code#14452 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
solana-foundation/program-examples#747 · コメント 1 件 ·
メンテナーはふだん 9 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
remotion-dev/remotion#11847 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
openwatersio/slackwater#355 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
melgarafael/DeskcommCRM#1998 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信