secrets set --env-file prints secret values in its parse error
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 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 小时
- 30 天内合并 PR
- 287
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
supabase/cli 的其他 Issue
-
db push applies migrations when the confirmation answer is not yes or no可能已有人在做 @7ttp 今天认领。 未关闭🐛 Bug supabase/cli
维护者通常 1 天内回复
-
db diff (migra): session search_path/role applied once per pool, lost on idle reconnect → spurious drop+create and REVOKE floods可能已有人在做 @7ttp 今天认领。 未关闭🐛 Bug supabase/cli
supabase/cli#6860 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
functions serve: SIGTERM to a stale process kills unrelated processes via kill(-pid) on reused child PIDs可能已有人在做 @7ttp 于 1 天前认领。 未关闭🐛 Bug supabase/cli
supabase/cli#6858 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
🐛 Bug supabase/cli
难度 4/5 3-5 天 新手友好度 35/100
维护者通常 1 天内回复
-
🐛 Bug supabase/cli
难度 4/5 3-5 天 新手友好度 35/100
维护者通常 1 天内回复
相似的 Issue
-
documentation
难度 2/5 1-3 小时 新手友好度 88/100
inu-appcenter/memorIN-frontend#106 ·
维护者通常 1 天内回复
-
kind/bug
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 7 天内回复
-
[Bug] @deck.gl/arcgis dist import resolves to unpublished @deck.gl/core source path (9.3.11, 9.4.0)未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
CSCfi/sd-search-ui#145 ·
维护者通常 1 天内回复
-
check:passed streams:add
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复