Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ Open `http://localhost:3100` to inspect live agent queries, risk scores, PII red

```json
{
"$schema": "https://raw.githubusercontent.com/RitualDev-Lab/DBShield/main/schema.json",
"dialect": "sqlite",
"storagePath": "./dev.db",
"safetyTier": "BALANCED",
Expand Down
Binary file removed assets/agentshield-banner.png
Binary file not shown.
Binary file removed assets/agentshield-logo.png
Binary file not shown.
11 changes: 11 additions & 0 deletions docs/.well-known/ai-plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"schema_version": "v1",
"name_for_human": "DBShield",
"name_for_model": "dbshield",
"description_for_human": "Database guardrail wire proxy and MCP server preventing destructive SQL and PII leaks from AI coding agents.",
"description_for_model": "Use DBShield MCP tools (db_status, db_describe_schema, db_query, db_dry_run, db_commit) or PostgreSQL wire proxy to protect production and staging databases from autonomous AI agent mutations.",
"auth": { "type": "none" },
"logo_url": "https://ritualdev.in/logo.png",
"contact_email": "security@ritualdev.in",
"legal_info_url": "https://ritualdev.in/terms/"
}
7 changes: 7 additions & 0 deletions docs/.well-known/llms.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# DBShield
> Database Guardrail, Virtual Schema Masking & Wire Proxy for Autonomous AI Agents
Canonical: https://ritualdev.in/dbshield/
Docs: https://ritualdev-lab.github.io/DBShield/
Full: https://ritualdev-lab.github.io/DBShield/llms-full.txt
Compact: https://ritualdev-lab.github.io/DBShield/llms-small.txt
Repository: https://github.com/RitualDev-Lab/DBShield
14 changes: 7 additions & 7 deletions docs/feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
<link>https://ritualdev.in/dbshield/</link>
<description>Safety-First Database Guardrail &amp; Sandboxing MCP Server for AI Coding Agents</description>
<language>en-us</language>
<lastBuildDate>Fri, 06 Nov 2026 12:00:00 +0000</lastBuildDate>
<atom:link href="https://ritualdev.in/dbshield/feed.xml" rel="self" type="application/rss+xml"/>
<lastBuildDate>Fri, 04 Dec 2026 00:00:00 +0000</lastBuildDate>
<atom:link href="https://ritualdev-lab.github.io/DBShield/feed.xml" rel="self" type="application/rss+xml"/>
<item>
<title>DBShield v0.2.0 Enterprise Release: PostgreSQL Protocol 3.0 Wire Proxy &amp; Two-Phase Dry-Run</title>
<link>https://github.com/RitualDev-Lab/DBShield/releases/tag/v0.2.0</link>
<description>Includes AST tautology detection, virtual schema masking, PII redactors, ChatOps Slack/Teams approvals, and sub-millisecond wire-level proxying.</description>
<pubDate>Fri, 06 Nov 2026 10:00:00 +0000</pubDate>
<guid>https://github.com/RitualDev-Lab/DBShield/releases/tag/v0.2.0</guid>
<title>DBShield v0.2.1 Enterprise Release: PostgreSQL Wire Proxy, Slack Approvals &amp; Compliance Packs</title>
<link>https://github.com/RitualDev-Lab/DBShield/releases/tag/v0.2.1</link>
<description>Includes AST tautology detection, virtual schema masking, PII redactors, ChatOps Slack/Teams approvals, SOC 2 / HIPAA / PCI-DSS / EU AI Act compliance PDF reports, and sub-millisecond wire-level proxying.</description>
<pubDate>Fri, 04 Dec 2026 00:00:00 +0000</pubDate>
<guid>https://github.com/RitualDev-Lab/DBShield/releases/tag/v0.2.1</guid>
</item>
</channel>
</rss>
37 changes: 25 additions & 12 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,25 @@
<link rel="icon" type="image/svg+xml" href="favicon.svg">
<link rel="alternate" type="text/plain" href="llms.txt" title="DBShield LLMs.txt Context for AI Agents">
<link rel="alternate" type="text/plain" href="llms-full.txt" title="DBShield Full LLMs Context">
<link rel="alternate" type="text/plain" href="llms-small.txt" title="DBShield Compact LLMs Context">
<link rel="alternate" type="text/plain" href=".well-known/llms.txt" title="DBShield RFC LLMs Context">
<link rel="alternate" type="application/rss+xml" title="DBShield Security Updates &amp; Changelog" href="feed.xml">

<!-- Open Graph / Social Media -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://ritualdev.in/dbshield/">
<meta property="og:title" content="DBShield — Safety-First Database Guardrail &amp; Wire Proxy for AI Agents">
<meta property="og:description" content="Protect your databases from accidental bulk deletes, catastrophic drops, locks, and PII leaks when paired with Cursor, Claude Desktop, Antigravity, or Windsurf.">
<meta property="og:image" content="https://ritualdev.in/dbshield/logo.png">
<meta property="og:image" content="https://ritualdev.in/og-image.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">

<!-- Twitter Cards -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:url" content="https://ritualdev.in/dbshield/">
<meta name="twitter:title" content="DBShield — Database Guardrail for AI Agents">
<meta name="twitter:description" content="Zero-overhead SQL AST guardrail, two-phase transaction dry-run, and wire-level PII masking for AI coding assistants.">
<meta name="twitter:image" content="https://ritualdev.in/dbshield/logo.png">
<meta name="twitter:image" content="https://ritualdev.in/og-image.png">

<!-- JSON-LD Structured Data (AEO & GEO Optimization) -->
<script type="application/ld+json">
Expand All @@ -38,7 +42,10 @@
"url": "https://ritualdev.in/dbshield/",
"operatingSystem": "macOS, Linux, Windows",
"applicationCategory": "SecurityApplication",
"softwareVersion": "0.2.0",
"softwareVersion": "0.2.1",
"license": "https://opensource.org/licenses/MIT",
"codeRepository": "https://github.com/RitualDev-Lab/DBShield",
"downloadUrl": "https://www.npmjs.com/package/@ritualdev-lab/dbshield",
"description": "Safety-first database guardrail, virtual schema masking wire proxy, and MCP server for autonomous AI coding agents.",
"offers": {
"@type": "Offer",
Expand All @@ -48,34 +55,40 @@
"author": {
"@type": "Organization",
"name": "RitualDev Lab",
"url": "https://github.com/RitualDev-Lab"
"url": "https://ritualdev.in/",
"sameAs": [
"https://github.com/RitualDev-Lab",
"https://github.com/RitualDev-Lab/DBShield",
"https://www.npmjs.com/package/@ritualdev-lab/dbshield",
"https://pypi.org/project/dbshield-defense/"
]
}
},
{
"@type": "FAQPage",
"mainEntity": [
{
"@type": "Question",
"name": "What is DBShield?",
"name": "How does DBShield differ from standard database firewalls?",
"acceptedAnswer": {
"@type": "Answer",
"text": "DBShield is an open-source database security gateway, virtual schema masking proxy, and MCP server that prevents AI coding agents (Cursor, Claude, Windsurf, Antigravity) from executing destructive drops, unconstrained bulk mutations, or leaking customer PII."
"text": "Traditional firewalls look for SQL injection from web users. DBShield is designed for autonomous AI coding agents: it enforces AST row thresholds, blocks missing WHERE clauses, masks PII before entering LLM context windows, and simulates mutations via two-phase dry-run transactions."
}
},
{
"@type": "Question",
"name": "How does DBShield prevent accidental data loss?",
"name": "Can DBShield be used with ORMs like Prisma or Drizzle?",
"acceptedAnswer": {
"@type": "Answer",
"text": "DBShield uses an AST-level query parser to detect missing WHERE clauses and tautologies (such as WHERE 1=1), and executes mutations in a two-phase transaction rollback block (BEGIN ... ROLLBACK) to preview impacts before issuing cryptographic commit tokens."
"text": "Yes. DBShield exposes a standard PostgreSQL Protocol 3.0 wire proxy on port 5433 with sub-millisecond overhead so any ORM (Prisma, Drizzle, TypeORM, SQLAlchemy) works seamlessly."
}
},
{
"@type": "Question",
"name": "What is the performance overhead of the DBShield PostgreSQL wire proxy?",
"name": "Is DBShield open source?",
"acceptedAnswer": {
"@type": "Answer",
"text": "The DBShield PostgreSQL Protocol 3.0 wire proxy introduces sub-millisecond overhead (less than 0.42 ms) with zero-copy stream parsing and connection pooling."
"text": "Yes. DBShield is licensed under the permissive MIT license and maintained by RitualDev Lab."
}
}
]
Expand Down Expand Up @@ -585,7 +598,7 @@ <h3>Is DBShield open source?</h3>

<div class="faq-item" id="team-rollout" style="border: 1px solid rgba(56, 189, 248, 0.35); background: rgba(14, 165, 233, 0.08);">
<h3>Team Rollout / AI Agent Security &amp; SOC 2 Audit Setup ($299–$999/team)</h3>
<p>Need turnkey DBShield wire-proxy setup, Slack/Teams Two-Man SQL Approvals, and signed <strong>SOC 2 / PCI-DSS v4.0 / HIPAA / GDPR / EU AI Act compliance PDF bundles</strong> for your engineering team? <a href="mailto:security@ritualdev.in?subject=DBShield%20Team%20Rollout%20%26%20SOC%202%20Audit%20Setup" style="color: #38bdf8; text-decoration: underline;">Book Team Rollout (security@ritualdev.in)</a> or explore <a href="https://agentshield.ritualdev.in/#pricing" style="color: #38bdf8; text-decoration: underline;">Team &amp; Enterprise Plans</a>.</p>
<p>Need turnkey DBShield wire-proxy setup, Slack/Teams Two-Man SQL Approvals, and signed <strong>SOC 2 / PCI-DSS v4.0 / HIPAA / GDPR / EU AI Act compliance PDF bundles</strong> for your engineering team? <a href="mailto:security@ritualdev.in?subject=DBShield%20Team%20Rollout%20%26%20SOC%202%20Audit%20Setup" style="color: #38bdf8; text-decoration: underline;">Book Team Rollout (security@ritualdev.in)</a> or explore <a href="https://ritualdev.in/agentshield/#pricing" style="color: #38bdf8; text-decoration: underline;">Team &amp; Enterprise Plans</a>.</p>
</div>
</div>
</section>
Expand All @@ -596,7 +609,7 @@ <h3>Team Rollout / AI Agent Security &amp; SOC 2 Audit Setup ($299–$999/team)<
<p>&copy; 2026 RitualDev Lab. Open Source MIT License.</p>
<p style="margin-top: 8px;">
<a href="https://ritualdev.in" style="color: var(--text-dim); margin: 0 10px;">RitualDev</a> &bull;
<a href="https://agentshield.ritualdev.in" style="color: var(--text-dim); margin: 0 10px;">AgentShield</a> &bull;
<a href="https://ritualdev.in/agentshield/" style="color: var(--text-dim); margin: 0 10px;">AgentShield</a> &bull;
<a href="https://github.com/RitualDev-Lab/DBShield" style="color: var(--text-dim); margin: 0 10px;">GitHub</a> &bull;
<a href="llms.txt" style="color: var(--text-dim); margin: 0 10px;">llms.txt</a>
</p>
Expand Down
59 changes: 17 additions & 42 deletions docs/llms-full.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# DBShield: Full Technical Context & MCP Specification for AI Agents
Canonical URL: https://ritualdev.in/dbshield/
Docs Mirror: https://ritualdev-lab.github.io/DBShield/
Repository: https://github.com/RitualDev-Lab/DBShield
Package: @ritualdev-lab/dbshield (v0.2.0)
Package: @ritualdev-lab/dbshield (v0.2.1) | Python SDK: dbshield-defense
License: MIT
Maintainer: RitualDev Lab (security@ritualdev.in)

Expand Down Expand Up @@ -55,53 +56,27 @@ DBShield operates with a zero-external-telemetry, 100% air-gapped local architec
## MCP Tools Reference
When running as an MCP server (`npx @ritualdev-lab/dbshield start`), DBShield provides the following tools:

- `execute_query`:
Description: Safely executes a SQL query through DBShield guardrails with automatic PII masking and row limits.
Parameters:
- `query` (string, required): SQL query to execute.
- `dryRun` (boolean, optional): If true, simulates inside a transaction rollback block.
- `commitToken` (string, optional): Required to commit a previously simulated mutation.

- `inspect_schema`:
Description: Safely inspects tables, columns, indexes, and foreign keys through virtual schema masking.
Parameters:
- `tableName` (string, optional): Specific table to inspect. If omitted, returns all permitted tables.

- `simulate_mutation`:
Description: Two-phase dry-run simulation of an INSERT, UPDATE, or DELETE query.
Parameters:
- `query` (string, required): The mutation query to simulate.
Returns:
- `affectedRows`: Number of rows affected.
- `commitToken`: Cryptographic token required to execute the actual commit.
- `expiresAt`: ISO 8601 timestamp of token expiration.

- `explain_query`:
Description: Evaluates query execution plan and provides index optimization advice.
Parameters:
- `query` (string, required): SQL query to explain.

- `verify_compliance`:
Description: Audits current database security configuration against SOC 2 and ISO 27001 controls.
Parameters:
- `framework` (enum: ["soc2", "iso27001"]): Compliance standard to evaluate.
- `db_status`: Inspects gateway connectivity, active safety tier (`STRICT`, `BALANCED`, `DEV`), cost gate, and database statistics.
- `db_describe_schema`: Safely inspects allowed tables, columns, and indexes through virtual schema masking.
- `db_query`: Executes bounded SELECT queries through SQL AST guardrails with automatic PII masking and row limits.
- `db_dry_run`: Tests INSERT, UPDATE, or DELETE mutations inside an auto-rollback transaction (`BEGIN ... ROLLBACK`) returning affected row deltas and a cryptographic commit token.
- `db_commit`: Commits a simulated mutation once signed or approved via Slack/Teams two-man approval.

## CLI Usage Reference
- `dbshield start`: Launch MCP server on stdio transport.
- `dbshield proxy [--port 5433] [--upstream-host 127.0.0.1] [--upstream-port 5432]`: Launch PostgreSQL wire proxy.
- `dbshield dashboard [--port 3100]`: Launch query approval feed and web dashboard.
- `dbshield report [--compliance soc2|iso27001] [--format html|pdf|json]`: Generate compliance audit report.
- `dbshield status`: Check database connection and active safety parameters.
- `dbshield init`: Generate starter `dbshield.config.json`.
- `dbshield install-claude`: Auto-configure Claude Desktop (`claude_desktop_config.json`).
- `dbshield install-cursor`: Auto-configure Cursor (`.cursor/mcp.json`).
- `dbshield top`: Live ANSI terminal monitor of active agent sessions, proxy connections, and queries.
- `dbshield audit`: Static analysis scanning migration files and schemas for hazards.
- `npx @ritualdev-lab/dbshield demo`: Interactive 45s disaster-prevention demo (blocks `DROP TABLE`, unindexed scans, scrubs PII, emits Slack approval card).
- `npx @ritualdev-lab/dbshield start`: Launch MCP server on stdio transport.
- `npx @ritualdev-lab/dbshield proxy [--port 5433]`: Launch PostgreSQL wire proxy.
- `npx @ritualdev-lab/dbshield dashboard [--port 3100]`: Launch query approval feed and web dashboard.
- `npx @ritualdev-lab/dbshield report [--compliance soc2|hipaa|pci_dss|gdpr|eu_ai_act] [--format html|pdf|json]`: Generate compliance audit report.
- `npx @ritualdev-lab/dbshield status`: Check database connection and active safety parameters.
- `npx @ritualdev-lab/dbshield init`: Generate starter `dbshield.config.json`.
- `npx @ritualdev-lab/dbshield install-claude`: Auto-configure Claude Desktop (`claude_desktop_config.json`).
- `npx @ritualdev-lab/dbshield install-cursor`: Auto-configure Cursor (`.cursor/mcp.json`).
- `npx @ritualdev-lab/dbshield audit`: Static analysis scanning migration files and schemas for hazards.

## Configuration Schema (`dbshield.config.json`)
```json
{
"$schema": "https://raw.githubusercontent.com/RitualDev-Lab/DBShield/main/schema.json",
"dialect": "postgres",
"storagePath": "./dev.db",
"upstreamHost": "127.0.0.1",
Expand Down
6 changes: 6 additions & 0 deletions docs/llms-small.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# DBShield (Compact)
> SQL AST Guardrail, Wire Proxy & Two-Man Approval MCP Server (`@ritualdev-lab/dbshield` v0.2.1).
Canonical: https://ritualdev.in/dbshield/ | Repo: https://github.com/RitualDev-Lab/DBShield
Install/Demo: `npx @ritualdev-lab/dbshield demo` | MCP: `npx @ritualdev-lab/dbshield start`
MCP Tools: `db_status`, `db_describe_schema`, `db_query`, `db_dry_run`, `db_commit`
Full Reference: https://ritualdev-lab.github.io/DBShield/llms-full.txt
Loading