database-security
仓库创建 2026年7月1日最近提交 23 天前SkillHot 收录 22 天前
▸ 精选理由
覆盖查询、迁移与权限的实务规则,利于审计
这个 Skill 做什么
防止 SQL 注入、ORM 误用与凭证泄露并强化最小权限。
帮开发和 agent 避免常见的数据库安全坑:防 SQL 注入、ORM 误用、凭证泄露,并推动最小权限和安全迁移。写 DB 访问、评审代码或做安全加固时会用到这些规则和做法。核心是落地可执行的原则——参数化查询/prepared statements、用 ORM 安全 API、最小权限账号与谨慎的迁移流程。
▸ 展开 SKILL.md 英文原文
Prevent SQL injection, ORM misuse, credential leaks; enforce least-privilege DB users and safe migrations
2
Stars
0
Forks
40
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/ShieldNet-360/secure-vibe/main/skills/database-security/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/ShieldNet-360/secure-vibe/main/skills/database-security/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# Database Security
## Rules (for AI agents)
### ALWAYS
- Use parameterized queries / prepared statements for any SQL that touches
user-controlled values. Pass values as parameters, never via string
concatenation or formatting (`%s`, `+`, template literals).
- Use the ORM's safe query API. In SQLAlchemy: `session.execute(text(":id"),
{"id": user_id})`. In Django: ORM methods, `Model.objects.filter(...)`. In
Sequelize / Prisma / SQLAlchemy core: `.where({ ... })` builders. In Go:
`db.QueryContext(ctx, "select ... where id = $1", id)`.
- Validate that identifier columns / table names — which can't be parameterized —
come from a hard-coded allowlist, not from user input.
- Use a dvia SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有