fix(audit-20261019): T1-T9 审计修复、存储归属与审计日志列宽
CI / server typecheck + tests (push) Canceled after 0s
CI / web typecheck + tests + miniprogram syntax (push) Canceled after 0s
CI / eslint (观察项,C7 骨架) (push) Canceled after 0s
CI / npm audit (critical 硬拦) (push) Canceled after 0s

- T1 资金/库存/报价/自采 P1(BIZ-1/2/3/4/10/13/14)
- T2 主系统反向事件墓碑/改派/孤儿处理(BIZ-6/8/9)
- T3 选分公司 ticket、trust proxy、角色权限收口(SEC-2/3/4)
- T4 缺列/RLS/tenant 名单/FK/迁移执行器(DATA-1..8)
- T5 401 登出/分页/映射口径/blob/ZIP 中文名(FE-1..4/BIZ-15)
- T6 测试脚本目标守卫/config fail-fast/容器配置(OPS-2..8)
- T7 前后端测试与 lint 门禁清零
- T8 应付卡片按关联订单日(口径 A)
- T9 存储对象全链路归属校验、敏感列禁写、审计 target_id 超长修复
This commit is contained in:
Ubuntu
2026-10-19 16:16:51 +08:00
parent 601a207b1e
commit 5fa2bbfd55
252 changed files with 18656 additions and 721 deletions
+13 -2
View File
@@ -31,8 +31,19 @@ NODE
export SKIP_DEMO_SEED="${SKIP_DEMO_SEED:-1}"
export SKIP_E2E_SEED="${SKIP_E2E_SEED:-1}"
echo "[entrypoint] running migrations..."
node dist/migrate.js
# OPS-6:迁移可开关(默认 1 保持现状);0 = 跳过(多副本部署时只让一个实例跑迁移)
RUN_MIGRATIONS="${RUN_MIGRATIONS:-1}"
if [ "$RUN_MIGRATIONS" = "1" ]; then
echo "[entrypoint] running migrations..."
if ! node dist/migrate.js; then
echo "[entrypoint] ERROR: 数据库迁移失败,API 不会启动。" >&2
echo "[entrypoint] 请先备份数据库(pg_dump)并检查 migrations/ 与 schema_migrations 后重试;" >&2
echo "[entrypoint] 本脚本不自动备份/自动回滚(避免给出假的安全感)。" >&2
exit 1
fi
else
echo "[entrypoint] skip migrations (RUN_MIGRATIONS=$RUN_MIGRATIONS)"
fi
echo "[entrypoint] starting API..."
exec "$@"