展示HN:Guardrail Layer – 开源AI数据隐私防火墙
我正在构建Guardrail Layer,这是一个开源的自托管后端,充当数据库与任何AI模型、仪表板或自动化工具之间的数据隐私防火墙。<p>它自动执行数据脱敏、访问控制和审计日志记录,因此您可以安全地将大型语言模型(LLMs)或分析系统连接到真实数据,而无需担心泄露敏感信息。<p>⸻<p>最近更新<p>刚刚发布了全球正则表达式脱敏功能——基于模式的规则(如电子邮件、社会安全号码或信用卡)会自动应用于所有表。<p>其他改进:
• 扩展的审计日志记录(创建、更新、删除事件)
• 更加简洁、现代的脱敏管理用户界面
• Docker设置的可靠性
• 基于角色的访问控制基础<p>⸻<p>工作原理
• 本地运行或通过Docker Compose运行
• 连接到PostgreSQL或MySQL
• 提供用于管理连接、正则表达式规则和审计日志的Web用户界面
• 与AI查询接口兼容(例如,自然语言转SQL)<p>⸻<p>示例用例
• 安全地将本地或托管的LLM连接到您的生产数据库
• 构建内部聊天机器人或仪表板,而不暴露个人身份信息(PII)
• 在团队或工具之间强制执行一致的隐私规则<p>⸻<p>虽然处于早期阶段,但功能已完善,我希望能听到您对接下来希望添加的隐私或合规功能的反馈。
代码库:<a href="https://github.com/tyoung1996/guardrail-layer" rel="nofollow">https://github.com/tyoung1996/guardrail-layer</a>
查看原文
I’ve been building Guardrail Layer, an open-source, self-hosted backend that acts as a data privacy firewall between your database and any AI model, dashboard, or automation tool.<p>It automatically enforces redactions, access control, and audit logging, so you can safely connect LLMs or analytics systems to real data without leaking sensitive information.<p>⸻<p>Recent update<p>Just released Global Regex Redactions — pattern-based rules (like emails, SSNs, or credit cards) that apply across all tables automatically.<p>Other improvements:
• Expanded audit logging (create, update, delete events)
• Cleaner, more modern redaction management UI
• Docker setup reliability
• Foundation for role-based access control<p>⸻<p>How it works
• Runs locally or via Docker Compose
• Connects to PostgreSQL or MySQL
• Provides a web UI for managing connections, regex rules, and audit logs
• Works with AI query interfaces (e.g. natural language → SQL)<p>⸻<p>Example use cases
• Safely connect a local or hosted LLM to your production database
• Build internal chatbots or dashboards without exposing PII
• Enforce consistent privacy rules across teams or tools<p>⸻<p>It’s early-stage but functional, and I’d love feedback on what privacy or compliance features you’d want next.
Repo: <a href="https://github.com/tyoung1996/guardrail-layer" rel="nofollow">https://github.com/tyoung1996/guardrail-layer</a>