AI-Built App Security Checklist: Supabase, Stripe, Auth.js

Security checklist for AI-built apps: RLS, Secret variables, Stripe webhook signatures, AUTH_SECRET and pg_hba.conf, each quoted from vendor docs.

Published
8 min read
  • security
  • checklist
  • supabase
  • stripe
  • vercel
  • authjs

This AI-built app security checklist starts where models point: in this site's 2026-10 dataset they named Vercel for hosting in 36 of 63 answers and Stripe for payments in 55 of 64. The five checks, each quoted from vendor docs: row-level security (RLS, per-row access rules) on exposed tables, Secret rather than Config variables, Stripe webhook signatures on the raw body, an AUTH_SECRET of 32+ characters, and pg_hba.conf first match.

As of 1 November 2026.

An agent assembled your stack in one sitting. It chose a host, a database, an auth library and a payment provider, and it wired them together with whatever defaults were fastest. Nobody read the vendor security pages along the way. The sections below do that reading for the top-named tool in each of four categories (database is a tie), and cut it down to checks you can run in minutes.

Which tools do AI models name most? The 2026-10 picks evidence

In the 2026-10 issue, models named Vercel for hosting in 36 of 63 parsed answers (57.1%), Stripe for payments in 55 of 64 (85.9%), Auth.js for auth in 25 of 70 (35.7%), and PostgreSQL and Supabase for database in 13 of 67 each (19.4%). These are model outputs from a fixed prompt set. They decide which vendor documents this checklist reads.

Category Top tool Picks Answers in category Share
Hosting Vercel 36 63 57.1%
Payments Stripe 55 64 85.9%
Auth Auth.js 25 70 35.7%
Database PostgreSQL 13 67 19.4%
Database Supabase 13 67 19.4%

Method box. Issue 2026-10 was measured on 2026-10-19 with prompt set 2026.1: 957 calls, 900 parsed (94.0%), 9 models, 24 categories, 4 contexts. The October 2026 issue page says the models were asked without a repository or tools. Shares were recomputed from the published CSV rows (see the methodology). Limits: one measurement day, and the issue page states that the data "says nothing about quality, security," price or market share. A top pick here is not a safe pick, and a tool absent from the table is not unsafe. Database is a tie.

So what do the vendors themselves say to check? The table in the next section answers that.

What belongs in an AI-built app security checklist, per vendor docs?

Each of the five tools in the table documents at least one security-relevant behavior in plain words. The table records the check, the vendor's wording, and the page. All pages were read on 1 November 2026. Only Vercel's page states an update date (August 28, 2026).

Tool Check What the document says Source page
Supabase Enable RLS on every exposed table "A table in an exposed schema without RLS is readable and writable by any role with a grant on it. Enable RLS on every table in an exposed schema." Supabase Docs: Row Level Security
Supabase Keep the secret key out of the browser "Never use a secret key in the browser or expose it to customers." Same page, "Bypassing Row Level Security"
Vercel Store keys as Secret, not Config "Secret values are write-only after saving. Use them for passwords, API keys, and tokens." Vercel Docs: Config and Secret environment variables
Stripe Verify every webhook "Always verify that webhook events originate from Stripe before acting on them." Stripe Docs: webhooks
Auth.js Set a long random AUTH_SECRET "It should be a cryptographically secure random string of at least 32 characters" Auth.js: Deployment
PostgreSQL Read pg_hba.conf as first match wins "The first record with a matching connection type, client address, requested database, and user name is used to perform authentication." PostgreSQL 18 docs: The pg_hba.conf File

Three details change what you do with a row.

  • Supabase (picks). The same page says a secret key "bypasses RLS only when the request carries no user access token", and that views "bypass RLS by default because they are usually created with the postgres user." On projects that still grant anon and authenticated by default, it says to "revoke those grants. Adding policies doesn't remove them."
  • Vercel (picks). Config values "remain readable after saving for members with access." Build logs replace a Secret value with a redaction marker only if the value is 32 characters or longer, so a short Secret can still show up in a log.
  • PostgreSQL (picks). There is no fall-through: "if one record is chosen and the authentication fails, subsequent records are not considered." The trust method "allows anyone that can connect to the PostgreSQL database server to login as any PostgreSQL user they wish, without the need for a password or any other authentication." Check that no trust line matches a network address.

The Auth.js page carries a banner about the project joining Better Auth. The deployment guidance quoted above was on the page on 1 November 2026.

Which of these can you test without touching production? Two of them.

How do you run the secrets and database checks?

Two checks cost the least and catch the most: confirm no signing secret sits in your build output, and confirm every table reachable through a public API has row-level security. The first is one command on a local build folder. The second follows a documented Supabase procedure.

For the build output, search for a key prefix. Stripe webhook secrets start with whsec_. This run used a throwaway folder holding a hand-written placeholder, so it shows what a hit looks like and is not a scan of any real project.

grep -rEn 'whsec_[A-Za-z0-9]+' out
static/app.js:1:const cfg = { api: "/api", webhookSecret: "whsec_EXAMPLEEXAMPLEEXAMPLE0000", mode: "demo" };

The real run printed the fixture's absolute directory in front of static/app.js; it is trimmed here. Any line like this in a real build means the secret ships to every visitor. Roll it in the Stripe dashboard and keep it in a server-side variable.

For the database, Supabase documents a per-table routine: enable RLS and set grants, write a policy per operation, then add a test file. Its words: "Create a .sql file under supabase/tests/ that asserts allow and deny for select , insert , update , and delete , for anon and authenticated . Run supabase test db and fix what it reports." Once RLS is on, the page says, "no data is accessible through the API when using a publishable key, until you create policies." We did not run this test: no local PostgreSQL was available for this note.

supabase test db

That covers storage and data. What about the two things that move money and identity?

How do you verify payments and auth before launch?

Stripe documents that an endpoint verifies a webhook using the JSON payload, the Stripe-Signature header and the whsec_ signing secret. Auth.js documents AUTH_SECRET as "the only strictly required environment variable." Checking both takes one test event and one environment review.

  1. Forward a test event. Stripe's local-test steps use the CLI: stripe login, then stripe listen --forward-to localhost:4242/webhook. Confirm your handler accepts the event and rejects one with a changed body.
  2. Keep the body raw. The Stripe page states: "Stripe requires the raw body of the request to perform signature verification. If you're using a framework, make sure it doesn't manipulate the raw body."
  3. Leave the recency check on. Stripe's libraries have a default tolerance of 5 minutes, and "using a tolerance value of 0 disables the recency check entirely."
  4. Roll the secret. Stripe recommends you "roll (change) secrets periodically, or when you suspect a compromised secret." You can expire the old one immediately or delay expiry for up to 24 hours.
  5. Serve the endpoint over TLS. Stripe webhooks support only TLS versions v1.2 and v1.3.
  6. Set AUTH_SECRET. Auth.js says it encrypts cookies and tokens and should be at least 32 characters. Generate it; do not paste the value an agent wrote into a README.
  7. Separate OAuth apps. When users are stored in a database, Auth.js recommends "a different OAuth app for development/production so that you don't mix your test and production user base."
  8. Behind a reverse proxy, set AUTH_TRUST_HOST to true. It "tells Auth.js to trust the X-Forwarded-Host header from the reverse proxy."

See how often models named these two tools on the Stripe pick page and the Auth.js pick page. What should you run first?

What should you run first?

A model naming a tool tells you nothing about how that tool is configured in your project. Picks are not a safety rating; the vendor pages above are what answer that. Run the whsec_ search on your build folder and the RLS test on your database, then read the row for each tool you use.

Next step: compare your own stack with the open picks dataset to see which of these tools models named in your categories.

Common follow-up questions

Is the Supabase publishable (anon) key safe to expose in frontend code?

Supabase says that once RLS is enabled, "no data is accessible through the API when using a publishable key, until you create policies." So the safety comes from RLS and your policies, not from hiding the key. A secret key is different: "Never use a secret key in the browser or expose it to customers."

Why does Stripe webhook signature verification fail in my framework?

Stripe requires the raw request body for verification. Its page warns that if you use a framework, you must make sure it does not manipulate the raw body. A parser that reads and re-serializes the JSON changes the bytes, so the computed signature no longer matches the Stripe-Signature header.

Do I need to set AUTH_TRUST_HOST when deploying Auth.js on Vercel?

Not by hand. The Auth.js deployment page says the value is inferred automatically on supported hosting providers and names VERCEL and CF_PAGES (Cloudflare Pages) as supported. Behind your own reverse proxy elsewhere, set it to true.

Do the picks counts mean these tools are secure?

No. The 2026-10 issue page states the data says nothing about quality, security, price or market share. The counts show which vendor documents are worth reading first. They are not a safety rating.

Sources

Checked 1 November 2026.