Constructive Releases Safegres, an Open-Source Verifier for Secure Postgres

Constructive Releases Safegres, an Open-Source Verifier for Secure Postgres

PR Newswire

The open-source tool grades who can reach which rows in a live Postgres database, catching row-level security and permission mistakes in CI before agents and AI app builders ship them.

SAN FRANCISCO, Nov. 6, 2026 /PRNewswire/ — Constructive (constructive.io), the company behind secure-by-default Postgres infrastructure for agents, today announced the public release of Safegres, an open-source verifier for Postgres security. Safegres is a tool from Constructive that audits the row-level security (RLS) policies and grants in a live PostgreSQL database, read-only, and reports which roles can reach which rows. It never touches application data or changes anything, so teams can run it against a production copy or automatically on every database change.

Safegres: Secure Postgres

On October 30, 2026, Supabase stopped automatically granting access to new tables. Grants decide whether a role can reach a table, and RLS decides which rows it sees. Independent research shows why both layers matter. On Nov. 2, the Hamburg security firm Crissy Field and the German newspaper Handelsblatt scanned 159,041 projects built with Lovable, an AI app builder. They found 24,664 sites whose Postgres databases were serving records to anonymous visitors — 7,403 of them exposing email addresses. UpGuard found 16,326 databases exposing readable tables across about 300,000 domains, Shippable found tables open to the public in 25.6% of 4,994 projects built with Bolt.new, and CVE-2025-48757 covered 303 exposed endpoints across 170 Lovable apps. These are configuration mistakes AI tools can repeat at scale, and grant and RLS checks catch them. With agents now creating 80% of the databases on Neon, according to Databricks, and 70% of new Supabase databases, according to Supabase, these checks can’t depend on someone remembering to run them. Safegres checks grants and RLS together on every change, on any Postgres, giving teams building AI-generated and vibe-coded apps a way to verify database security before release.

Safegres is built on Constructive’s open-source “Babel for Postgres” — a nod to Babel, the tool that lets programs parse and rewrite JavaScript — a toolkit that translates SQL into a structured form programs can read, check and rewrite. The toolkit is built on PostgreSQL’s own grammar, the same rules the database itself uses, wrapped in nearly a decade of Constructive tooling, so programs can check and rewrite SQL exactly as the database will run it. Constructive’s Postgres parser is downloaded more than 9 million times a month, and its parser tools have been used in more than 1,100 public GitHub projects, including projects from teams at Canva, Gel Data (acquired by Vercel), Neon and Supabase.

“Our tools exist to make whole classes of Postgres vulnerabilities impossible to ship, catching mistakes like missing grants and open RLS policies before they ever become CVEs,” said Dan Lynch, Founder and CEO of Constructive. “The same open-source parser behind Safegres already runs in tooling built by teams at Canva and Supabase. With security incidents piling up across AI-built apps, these checks can’t be optional. They belong in the development loop, the automated checks that run every time a developer changes code, tested against real Postgres on every commit and migration.”

What Safegres Does

  • Two separate scores — 30+ security checks and 10+ performance checks, graded separately.
  • Real access, not just settings — follows permissions through inherited roles, shared defaults, views and functions to show what each role can actually reach.
  • Deterministic results — no AI judge. The same database always gets the same grade, and each report is fingerprinted.
  • Tested against an answer key — a library of sample databases, each with known flaws, checks that Safegres finds what it should and nothing it shouldn’t.
  • Built for CI/CD — runs in continuous integration and delivery (CI/CD), the automated checks that run every time a developer proposes a change, including on GitHub pull requests, and flags only what that change introduces.
  • Works with the stacks teams use — ready-made settings for Supabase, PostgREST, Hasura, Graphile and Constructive. Supabase teams can use it to audit their RLS policies and grants.

“With the industry now focusing around software factories, every factory needs quality control at every station,” said Anmol Yadav, Head of Infrastructure and Co-founder of Constructive. “Dan and I have been building toward that for years, from replicable deployments and declarative config to treating infrastructure itself as an Abstract Syntax Tree (AST). Safegres puts database security on that same assembly line, so it runs in CI/CD on every commit whether a person or an agent wrote the change.”

For Agents That Write Postgres

The sample databases double as a test for AI agents: give an agent a flawed database, then re-audit to see whether it fixed the problem without creating new ones.

“We noticed that when Safegres runs in CI and GitHub checks, coding agents that can see the results pick up changes in the security and performance scores and fix the issues on their own,” said Lynch. “That turns the verifier into a feedback loop for building evals and self-improving agents.”

Availability

Safegres is open source under the MIT license and works with Supabase projects, any PostgreSQL database and common CI pipelines.

Safegres is part of a larger open-source toolkit from Constructive. pgpm organizes Postgres code into packages, pgsql-test runs tests against a real database, and Safegres checks every change for security and performance mistakes. Together they cover the full development loop, as described on PostgreSQL.org.

Learn more at constructive.io.

About Constructive

Constructive builds agent-first infrastructure, combining modular open-source Postgres with a secure-by-default database architecture designed for the AI era. As agents begin generating and operating applications, Constructive moves trust, access control, and data integrity into the database itself. Its platform spans the entire application stack, from database schemas to APIs to frontend integrations, using a compiler-driven approach to generate and enforce systems end to end. This unified model replaces fragmented tooling with a single, composable foundation for building secure, production-grade applications. Constructive’s open-source Postgres tooling has been used by teams at Canva, Gel Data (acquired by Vercel), Neon and Supabase, has been downloaded more than 275 million times, and supports the operation of nearly 50 million databases. Constructive is led by Dan Lynch, who has been building website builders since 2005 and co-founded two acquired companies, Brandcast (acquired by TIME) and Famo.us (acquired by AMZE), backed by investors including Marc Benioff, Reid Hoffman and Naval Ravikant. Learn more at constructive.io.

Constructive™ — Modular & Secure Postgres Platform (official logo)

Cision View original content to download multimedia:https://www.prnewswire.com/news-releases/constructive-releases-safegres-an-open-source-verifier-for-secure-postgres-302931735.html

SOURCE Constructive