# Security Policy

**Effective date:** 2026-07-31  
**Operator:** SQLGuard Inc / DoggyBagg  
**Contact:** hello@sqlguard.io  
**Canonical:** https://sqlguard.io/security · https://sqlguard.io/.well-known/security.txt  
**Trust center:** https://sqlguard.io/trust

## Honest posture (no fake badges)

We document **real controls we operate**. We do **not** claim SOC 2, ISO 27001, HIPAA, PCI DSS, FedRAMP, or third-party penetration-test badges unless this page is updated with named evidence. Operational proof is live HTTP (`/health`, unpaid `402`, `/v1/verify`) + settlement ledger (`/v1/money`) + BaseScan — not marketing seals.

## Supported versions

| Version | Supported |
|---------|-----------|
| 1.x (`master` / production Fly `sqlguard-io`) | Yes |

## Reporting a vulnerability

Email **hello@sqlguard.io** with subject `SECURITY:` and include:

- description and impact
- reproduction steps / PoC (**non-destructive** preferred)
- affected URL, host, or commit
- your contact for coordination

Please **do not** open a public GitHub issue for undisclosed vulnerabilities. Do **not** access other customers’ data, destroy data, or perform high-volume DoS.

**SLA (best effort):** acknowledge within **72 hours**; triage severity; provide a remediation timeline after confirmation. Critical payment/authz bypasses are prioritized.

## Security model (trust boundaries)

| Layer | What it is | What it is not |
|-------|------------|----------------|
| x402 Exact USDC settle (CDP facilitator when keys set; else PayAI) | Funds SKU issuance on Base | Authorization to mutate your DB |
| Sandbox + policy | Issues Ed25519 PASS/FAIL over hashed schema/sql (± mandate) | Guarantee of business safety / legality |
| `/v1/verify` + `/v1/gate` | Cryptographic + hash checks before **you** execute | Hosted production write |
| Pilot / Session / Instant Cert | Prepaid authorize artifacts | Insurance, KYC, or SOC 2 |
| `/v1/transparency` | Redacted Exact settle feed | Full SQL dump or PII catalog |
| Public `/v1/execute` | Optional; **fail-closed** by default | Assumed live on sqlguard.io |
| Neon / Postgres credits | Durable settlement + credit ledger | Ephemeral container disk |

**Mandatory buyer loop:** settle (or invoice) → burn cert → **verify** → only then execute. Lint / probe / OAuth are not statement authorize.

## Controls we actually run

- TLS terminated at the edge; Helmet CSP / HSTS / frame denial / nosniff on app responses
- Rate limits on public HTTP
- Ed25519 attestations; demo sandbox rejected in production verify unless explicitly allowed
- Public executor fail-closed by default (`GET /health` → `executor.enabled`)
- Secrets never committed (`keys/`, `.env*`); ephemeral host FS is not the money ledger — Neon is source of truth when configured
- Agent id mismatch rejected **before** x402 (not masked as unpaid 402)
- Exact fulfillment: wallet `agent_id` must match payment payer when both are 0x addresses
- CI: gitleaks + `npm audit` where configured; honesty audit scripts against live host
- Vulnerability contact via `/.well-known/security.txt`

## Incident response (public)

1. **Detect** — logs, rate limits, facilitator/ledger anomalies, researcher report  
2. **Contain** — disable abused routes / rotate keys / fail-closed executor (already default)  
3. **Eradicate** — patch, deploy Fly always-on, re-run honesty audit  
4. **Recover** — restore payments_live + credits postgres; prove `/health` + unpaid 402 paths  
5. **Communicate** — email reporters; if material customer impact, note on `/security` and contact channel  

## Scope

**In scope:** SQLGuard HTTP/MCP APIs on production hosts (`sqlguard.io`, `sqlguard-io.fly.dev`), certificate issuance/verification, credit/payment enforcement, Pilot/Session/BIND/GATE logic, authz fail-closed paths.

**Out of scope:** third-party facilitators, blockchain consensus bugs, social engineering of unrelated accounts, physical attacks, spam, and DoS via enormous legitimate paid traffic without prior coordination.

## Safe harbor

Good-faith research that avoids privacy violations, data destruction, and service disruption, and that promptly reports findings, is appreciated and will **not** be treated as an AUP/Terms violation solely for that research.

## Contact

hello@sqlguard.io  
`https://sqlguard.io/.well-known/security.txt`  
Subprocessors: [/subprocessors](/subprocessors)
