chore: 凭证防泄漏检查落地——check-secrets 脚本入库 + CI 兜底 step(ADR-021)
CI / flutter-gates (push) Successful in 2m21s

- 新增 scripts/check-secrets.sh 与 scripts/hooks/pre-commit(三仓同构,规则单一来源)
- ci.yml 在 checkout 后新增 Secret scan step(同一脚本 --all),既有 step 未动
- 验收:全仓 234 个已跟踪文件扫描零误报;假凭证自测 9 类命中全拦截

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-08 16:28:04 +08:00
parent 4d40c38f06
commit 66f983d680
3 changed files with 114 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
#!/bin/sh
# pre-commit —— 凭证防泄漏(ADR-021)。启用(每人每仓一次):
# git config core.hooksPath scripts/hooks
# 注意:core.hooksPath 会整体接管 hooks 目录;本仓无其他自定义 hook。
repo_root=$(git rev-parse --show-toplevel) || exit 1
exec sh "$repo_root/scripts/check-secrets.sh" --staged