FD

farenhytee/database-sentinel

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

51 stars 质量 69 趋势 8MIT

Claude Skill 可审计您的项目,发现 RLS 配置错误、密钥外泄、认证绕过和存储漏洞。27 条反模式数据来源于 CVE-2025-48757,以及 10 项安全研究。

概览

问“审计我的数据库”,就能拿到带有精确修复代码的评分报告。 它可以作为(Supabase、MongoDB)、任何AI客户端的A,或者使用你自己模型的软件(都是Supabase)来运行。 - 一个在标准节点上驱动真实服务器的模型得分为测试F1 0.865,精度0.905,关键回忆1.0(结果)。线束:evals/mcp_client.py,评估系统M。 - 四个只读 Supabase 工具、一个审计提示符和目录资源。端到端基准测试:一个在 stdio 上驱动服务器的模型测试得分为 F1 0.865,关键召回率为 1.0。- 会话池,仅读角色,使用 BYPASSRLS,全部 20 个查询。- Q1 现在检查 API 授权:RLS 关闭且匿名/认证撤销不会报告为暴露。- 审计提示知道 SECURITY INVOKER 函数只拥有调用者的权限。- 在真实项目中发现;新开发案例 026。- git+https://github.com/Farenhytee/[email protected] 在任何 uvx/pipx 命令中。Claude Code 插件自动钉顶。- 一个提示符加上匿名探测验证,~$0。

概述(AI 翻译)

对你的数据库后端进行安全审计。 询问“审计我的数据库”,并获得带有精确修复代码的评分报告。

可以作为Claude技能(Supabase、MongoDB)、只读MCP服务器支持任何AI客户端,或者CLI代理使用你自己的模型(均为Supabase)。

→ MCP 服务器设置与使用指南

→ 不想自己运行?Locksoup 是托管版本:Supabase 的安全审计,带有定期的重新检查和警报。


更新日志

2026-10-01 (v1.0.1)

  • 已修复: 没有WITH CHECK的UPDATE策略不再被报告为允许用户重新分配行所有权(Postgres重复使用USING 作为检查)。Q8的标签和代理提示却显示相反,导致真实项目中出现了错误的批量分配结果。
  • 基准测试:该项目的新开发案例027。测试F1保持不变(0.836对0.838,同一天)。运行。

2026-09-30(文档)

  • MCP 流程基准测试: 一个在标准上驱动真实服务器的模型得分为测试 F1 0.865,精度 0.905,关键回忆 1.0(结果)。线束:evals/mcp_client.py,评估系统 m。

v1.0.0(2026-09-30):MCP服务器发布

  • **MCP 服务器 v1。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

🛡️ Database Sentinel

Security audits for your database backend. Ask “audit my database” and get a scored report with exact fix code.

Works as a Claude Skill (Supabase, MongoDB), a read-only MCP server for any AI client, or a CLI agent that uses your own model (both Supabase).

→ MCP server setup and usage guide

→ Don’t want to run it yourself? Locksoup is the hosted version: a Supabase security audit with scheduled re-checks and alerts.


Changelog

2026-10-01 (v1.0.1)

  • Fixed: an UPDATE policy without WITH CHECK is no longer reported as letting users reassign row ownership (Postgres reuses USING as the check). Q8’s label and the agent prompt said otherwise, which produced false mass-assignment findings on real projects.
  • Benchmark: new dev case 027 from that project. Test F1 unchanged (0.836 vs 0.838, same day). Runs.

2026-09-30 (docs)

  • MCP flow benchmarked: a model driving the real server over stdio scored test F1 0.865, precision 0.905, critical recall 1.0 (results). Harness: evals/mcp_client.py, eval system m.

v1.0.0 (2026-09-30): MCP server release

  • MCP server v1.0: four read-only Supabase tools, an audit prompt and the catalog resources. Benchmarked end to end: a model driving the server over stdio scored test F1 0.865, with critical recall 1.0.
  • Verified on hosted Supabase: session pooler, read-only role with BYPASSRLS, all 20 queries.
  • Fewer false alarms:
    • Q1 now checks API grants: RLS off with anon/authenticated revoked isn’t reported as exposed.
    • The audit prompt knows SECURITY INVOKER functions only have the caller’s rights.
    • Found on a real project; new dev case 026.
  • Pin a version: git+https://github.com/Farenhytee/[email protected] in any uvx/pipx command. The Claude Code plugin is pinned automatically.
  • Standard audit is now the CLI default: one prompt plus anon-probe verification, ~$0.0007 and ~15s per audit. --deep runs the tool-using agent, which scored the same on our bench at ~5× the cost.

v0.2.1 (2026-09-30)

  • Test F1: agent 0.782 → 0.831, single-prompt 0.766 → 0.849. No crashes or timeouts (results).
  • Fixed:
    • A bad tool argument no longer ends the audit; the error goes back to the model.
    • OpenRouter calls route to the fastest provider (slow ones caused timeouts).
    • The agent’s final findings step no longer lists candidates it had dismissed.

v0.2.0 (2026-09-29)

  • Published test results: agent F1 0.782, single-prompt 0.766, rules 0.559 on a blind, locked 10-case test split, 3 runs each (results).
在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add farenhytee/database-sentinel
新手?先看 mcpskill.org 教程 →