Skip to content

fix(p0): HTTP trust boundary + audit SQL redact - #5

Merged
tangyf07 merged 1 commit into
mainfrom
fix/p0-http-trust-boundary
Sep 8, 2026
Merged

fix(p0): HTTP trust boundary + audit SQL redact#5
tangyf07 merged 1 commit into
mainfrom
fix/p0-http-trust-boundary

Conversation

@tangyf07

@tangyf07 tangyf07 commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • P0-5 HTTP trust boundary: serve locks database / policy / catalog / environment at startup; request bodies may only supply sql / actor / model_id / prompt_summary. Overrides of policy / catalog / database / db_path / environment return 400 trust_boundary_violation.
  • Non-loopback binds (including 0.0.0.0 / ::) require --auth-token or SQL_WRITE_GATE_HTTP_TOKEN; all-interfaces without auth is refused at startup.
  • Audit SQL: default literal redaction via SQL_WRITE_GATE_AUDIT_SQL_MODE=redact|hash|plain.
  • sqlglot compatibility ceiling: >=25,<31.
  • CI: Python 3.11 + 3.12 matrix; live Postgres/MySQL integration remains 3.12-only.
  • README: replace 「HTTP binding is not server-locked」 with real serve lock guarantee.

Test plan

  • pytest tests/test_p0_http_trust_boundary.py tests/test_audit.py tests/test_v110.py tests/test_readme.py (green locally on tangyf)
  • CI matrix 3.11/3.12 on this PR

Notes

  • Tip: d83508d
  • Local origin fetch/push over HTTPS:443 from tangyf failed (connection reset); branch pushed via alternate path (box + git bundle). No force-push / no merge.

Serve binds policy/catalog/database/environment at startup; reject body overrides; require auth for non-loopback/0.0.0.0. Default audit SQL literal redaction; pin sqlglot <31; CI matrix 3.11+3.12.
@tangyf07
tangyf07 force-pushed the fix/p0-http-trust-boundary branch from d83508d to 03db2be Compare September 8, 2026 18:03
@tangyf07
tangyf07 merged commit 2a7c092 into main Sep 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant