migration-safety-guard

仓库创建 2026年7月4日最近提交 21 天前SkillHot 收录 20 天前
▸ 精选理由

在数据库变更环节防止灾难性数据损失

▸ 风险提示

需要访问数据库元信息或执行模拟,可能涉及生产权限

这个 Skill 做什么

阻止会导致不可逆数据丢失或跨租户泄露的危险 schema 迁移。

在写或应用 schema 迁移前,阻止那些会造成不可恢复数据丢失、跨租户数据泄露或在大热表上导致阻塞性 DDL 的危险改动。遇到增删列、改表、建表、索引或其他模式变更时就要启用,防止上线后立刻坏数据或泄露。它强调按 expand-contract、显式 RLS/租户隔离或非锁表的安全路径来处理,宁可阻止也不允许冒险跑迁移。

▸ 展开 SKILL.md 英文原文

Blocks a schema migration from shipping with irreversible data loss, a new tenant-scoped table missing row-level security, or blocking DDL on a large/hot table — done in place instead of via expand-contract, an explicit RLS/tenant-isolation policy, or a non-locking DDL form. Best used reactively before writing or applying any migration. Use when the user says "write a migration", "add/alter/drop a column or table", "create index", "schema change", "ALTER TABLE", "DROP", or "CREATE TABLE". DO NOT USE for secret exposure (use no-secret-leak-guard) or general diff scope (use clean-diff-guard); this guard is specifically about migration data-loss, tenant-isolation, and lock safety.

Skill 开发管理迁移安全数据保护DDL 风险通用
1
Stars
0
Forks
8
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/mohamedzhioua/proofguard/main/deferred/migration-safety-guard/skill/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/mohamedzhioua/proofguard/main/deferred/migration-safety-guard/skill/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# migration-safety-guard

A migration is the one kind of change that can destroy data or expose it
across tenants the moment it runs — there is no "revert the deploy" for a
`DROP COLUMN` that already ran against production data, and there is no
"patch it later" for a new table that served cross-tenant rows for even one
request. Both failure classes have shipped in the wild: the 2025 Lovable
disclosure (CVE-2025-48757) was exactly a missing row-level-security policy
on a Supabase/Postgres table, letting any authenticated user read every
tenant's data through the app's own API; irreversible `DROP COLUMN`/`DROP
TABLE` migrations that silently discard production data are a recurring
incident-rev
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有