Skip to content

feat(guard): AST lexical token normalizer, serializable envelopes & intent-effect gap (Phase 1) - #33

Merged
divyanshujethi merged 1 commit into
mainfrom
feat/phase1-sql-normalizer-readonly
Nov 8, 2026
Merged

divyanshujethi merged 1 commit into
mainfrom
feat/phase1-sql-normalizer-readonly

Conversation

@divyanshujethi

Copy link
Copy Markdown
Contributor

Phase 1: DBShield Hardening

  • AST Lexical Token Normalizer (normalizeSqlForAudit): Neutralizes zero-width unicode smuggling characters, detects inline comment evasion, and detects unquoted semicolon multi-statement injection.
  • Serializable Transaction Envelopes: Enforces serializable dry-run simulation envelopes in PostgresAdapter with verified auto-rollback guarantee.
  • Intent vs. Effect Gap Analysis: Adds detection in SandboxEngine.dryRun comparing agent stated intent / expected affected rows against simulated execution impact to protect against catastrophic blast radius.
  • Tests: Added comprehensive test suite in tests/sql-normalizer-readonly.test.ts. All 189 tests pass.

@divyanshujethi
divyanshujethi merged commit ec5482e into main Nov 8, 2026
8 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