How AWS uses our Postgres parser to secure Aurora and RDS drivers
When the same security bug comes back in a new feature, another patch isn't enough. AWS engineers ran into this in their open-source driver wrappers for Aurora and RDS: a series of high-severity vulnerabilities, including CVE-2025-12967, CVE-2026-11400, and CVE-2026-11401, traced back to how PostgreSQL resolves unqualified names in the drivers' own SQL. The Node.js wrapper team fixed the queries by hand twice, and the same mistake came back.
On October 8, 2026, AWS engineers added a CI check to the Node.js wrapper. It uses libpg-query, the PostgreSQL parser at the heart of Constructive's open-source toolchain, to parse the driver's SQL into an abstract syntax tree (AST). The check inspects that tree for unqualified function, operator, or type references that could resolve somewhere the driver didn't intend. If it finds one, the build fails. In the same pull request, it caught a bare count(1) in an Aurora Global Database query that manual review had missed.
The check took just a few hundred lines because AWS didn't have to write a parser. And instead of fixing only the references the team already knew about, CI now checks new code for the same pattern. Read Dan Lynch's account in IT Brief.
A standard building block for Postgres
JavaScript teams reach for Babel when they need to work with the structure of code rather than raw text. For nearly a decade, we've been building a Babel for Postgres: an open-source AST toolchain based on PostgreSQL's own grammar. It lets teams parse SQL, walk and transform typed nodes, and turn the tree back into SQL. The AWS check shows why that matters: a build tool can tell a function call from a piece of text without inventing its own rules for how to read SQL.
On November 10, 2026, our open-source Postgres tooling passed 300 million downloads, with more than 50 million downloads a month and 9× year-over-year growth. That adoption matters because teams can build the checks they need on a shared foundation instead of writing their own SQL tooling from scratch.
Machine-readable intent
We use AI every day to explore approaches and draft code, but that doesn't mean every decision should go back to a model. Inference can draft a change, and deterministic software can decide whether it meets a rule. When the intent behind a rule is machine-readable, the same code checked against the same rule gives the same answer every time.
The AWS check doesn't prove that a query is safe in every respect. It enforces one specific requirement: the driver's SQL must qualify the function, operator, and type references covered by the rule. CI checks that requirement on every change, no matter who or what wrote the SQL.
From open-source parsing to secure data infrastructure
Parsing answers what a SQL statement says. Verifying what a role can access takes a different kind of check. Safegres audits grants and row-level security in a live Postgres database and reports which roles can reach which data. Our Securing Postgres with Safegres course walks through adding that audit to CI.
The Constructive platform applies the same principle to multi-tenant Postgres: define access in the database itself and verify those boundaries before shipping, regardless of whether a person or an agent wrote the change.
We aren't building guardrails around AI. We're building infrastructure that is trustworthy by design.