fix(auth): 固定验证码改为显式 AUTH_EMAIL_DEV_CODE 环境开关(安全评审反馈)
ci / server (push) Failing after 10s
ci / design-system (push) Failing after 10s

不再从 mailer 运行时类型推导认证材料:固定码仅当显式设置
AUTH_EMAIL_DEV_CODE 时生效(run-dev.sh 设 888888,生产部署不经
该脚本即为随机码),设置时启动打印醒目告警。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-07-11 20:42:11 +08:00
parent 7dccd694e0
commit 8266c575aa
6 changed files with 16 additions and 6 deletions
+3
View File
@@ -3,6 +3,9 @@
# DashScope Key 从 Bitwarden 取(条目名 dashscope-api-key),有则真实识别,无则自动落 mock provider。
# 前置:rbw unlock 已解锁;docker compose up -d 已起 pg/redis。
set -e
# 开发期固定邮箱验证码(仅本脚本设置;生产部署不经此脚本,不会带上)
export AUTH_EMAIL_DEV_CODE=888888
if rbw get dashscope-api-key >/dev/null 2>&1; then
echo "[run-dev] 使用真实 gummy provider"
rbw get dashscope-api-key | { read -r K; ASR_PROVIDER=gummy DASHSCOPE_API_KEY="$K" exec go run ./cmd/server; }