Security Architecture

Last updated: December 6, 2026 · SchemaWall

1. Worker Isolation & Secret Segregation

  • Zero Secret Inheritance: Every PGlite WASM sandbox runs inside a fresh worker_threads worker spawned with env: {}. GitHub App private keys, webhook secrets, and Firestore tokens are never exposed to the SQL execution thread.
  • Hard Timeout & Concurrency Isolation: Each worker is terminated unconditionally via worker.terminate() if execution exceeds 8 seconds, and Cloud Run runs with --concurrency=1 to eliminate cross-PR memory interference.
  • Pre-Execution Guard: Dangerous filesystem/program SQL commands (such as COPY ... PROGRAM and lo_import) are blocked before reaching PGlite.

2. Fail-Open Engine Safety vs. Fail-Closed Findings

Unknown PGlite compatibility errors or sandbox timeouts fail open with a non-blocking REVIEW warning so tool limitations never stall your team. Confirmed RLS leaks, unauthorized writes, over-GRANTs, destructive DDL, and CI bypasses fail closed and block merges.

3. Tamper Resistance & Admin Approvals

  • Inline SQL suppression comments (e.g., -- schemawall-ignore) and CI workflow continue-on-error: true edits are rejected as HIGH (BLOCK).
  • Silencing intentionally public lookup tables requires a verified repository Admin/Maintainer to comment /schemawall allow-public public.<table>; bot accounts and write-only collaborators are rejected.

4. Merge Blocking Across GitHub Plans

In private repositories on GitHub’s Free plan, GitHub does not enforce branch-protection Required Status Checks, so SchemaWall acts as a visible PR warning gate. On GitHub Pro, Team, Enterprise, and public repositories, configuring SchemaWall Postgres Gate as a Required Status Check enforces physical merge blocking.

5. Vulnerability Reporting

Report security issues directly to support@schemawall.dev.