In short
- A policy people read is short. This one has seven sections and each rule can be checked by a query, a command or a dated report.
- Write rules about the published app. "Review all AI-generated code" cannot be checked for someone who does not read code. "Every table has an access rule" can.
- Sort data in three classes. Invented data needs no approval, internal business data needs the publication checklist, and personal or regulated data needs a named approval before the first row is loaded.
- The publication checklist has five lines: owner named, sign-in on, a rule on every table and bucket, no secret in the frontend, an outside test with proof.
- Add the two rules most policies forget: retest after every change, and a retirement procedure that deletes the data and revokes the keys.
On this page
- What a vibe coding policy is for
- The policy: scope and allowed tools
- The policy: data classes
- The policy: what must be true before an app is published
- The policy: changes, retirement and incidents
- How to verify each rule on the live app
- Mistakes that make a policy fail
- Where Keybrum fits in this policy, and where it does not
- Questions
- Sources
What a vibe coding policy is for
Most AI policies were written for chatbots: what may be pasted into a prompt, which assistants are approved. They say nothing about the employee who used an AI builder to publish a working app with a database behind it. A vibe coding policy covers that case. It answers four questions for anyone in the company who builds: which tools, which data, what must be true before others use the app, and what happens when it is no longer needed.
The reason to write it down is the track record of these apps. The research behind CVE-2025-48757 tested 1,645 apps built with Lovable and found missing or weak row level security in 170 of them, about one in ten. The builders ship their own scanners, and their documentation sets the limit: Lovable writes that its security tools "cannot guarantee complete security" and that you are responsible for the requirements of your use case. A policy is how a company takes that responsibility on purpose.
Three principles shaped the template. It is short, because a policy nobody reads protects nobody. Each rule is about the deployed app, so it can be verified by someone who does not read code. And it says yes by default: the aim is to make the approved path easier than a personal account. For the reasoning behind each rule, see the enterprise vibe coding guide.
The policy: scope and allowed tools
1. Scope
- This policy applies to every employee and contractor of COMPANY who builds an application, an automation or an agent with an AI tool, for work.
- An "app" is anything that can be reached at an address by someone other than its author: a web app, an API, a chatbot, an agent that takes requests.
- Experiments that stay on the author's machine and use only invented data are outside this policy.
- Software built by the engineering team under its own release process follows that process. Rules 3 and 4 still apply to it.
2. Allowed tools and accounts
- Apps are built with the tools on the approved list kept by IT: LIST OF BUILDERS, EDITORS AND AGENTS.
- Apps are hosted and store their data only in company accounts on: LIST OF HOSTS AND BACKENDS. Personal accounts are not used for work apps, including free ones.
- Accounts are created with the work email address and, where the tool offers it, the company single sign-on.
- To ask for a new tool, write to CONTACT. IT answers within TEN working days. A tool is approved when its terms allow business use and company data is not used to train models without agreement.
- The built-in security scan of the tool, where one exists, is turned on and its critical findings are fixed before publishing.
The policy: data classes
3. Data that may and may not be used
| Class | Examples | Rule |
|---|---|---|
| Green | Invented or public data: sample names, published prices, public documentation | May be used freely, in prompts and in apps |
| Amber | Internal business data: product lists, internal procedures, aggregated figures, supplier names | May be used in an app once section 4 is met. Not pasted into tools outside the approved list |
| Red | Personal data of customers or employees, credentials, payment card data, health data, contracts under a confidentiality clause | Only with written approval of the data owner and of SECURITY CONTACT before the first row is loaded. Never in a prompt |
- The author states the class of every table when the app is declared. When in doubt, the higher class applies.
- Development and demos use Green data. Real data goes in only after section 4 is met.
- Passwords, API keys and tokens are never given to an AI tool in a prompt. They are stored in the secret settings of the host. See the secrets management guide.
- An app never holds more data than its purpose needs. A full export is not loaded when ten columns are enough.
The policy: what must be true before an app is published
4. Publication checklist
"Published" means the app holds Amber or Red data, or anyone outside the author's team has its address. Before that moment, every line below is true and written in the app register.
- 4.1 Owner named. The register lists the app's address, its owner, a second person with access to the hosting account, and the data classes it holds.
- 4.2 Sign-in on. No page or API route returns Amber or Red data without a session. Sign-up is limited to company accounts unless customers are meant to use the app.
- 4.3 A rule on every table. Every database table, storage bucket and collection has an access rule that limits each user to the records they may see. No rule allows everyone.
- 4.4 No secret in the frontend. No secret key appears in the JavaScript, the HTML or any file the app serves. Only keys designed to be public are sent to the browser.
- 4.5 An outside test with proof. The deployed app was tested from the internet, with no account and with two accounts. The dated report, with what was tried and what worked, is attached to the register. Open findings of high severity block publication.
The policy: changes, retirement and incidents
5. Review after each change
- After every publish that changes the database, the sign-in or an API route, lines 4.2 to 4.5 are checked again.
- Every app is tested from outside at least once a MONTH, even if it did not change.
- A finding is closed when the same test fails on the live app. "The agent says it is fixed" does not close a finding.
- The register is reviewed every QUARTER: each app still has an owner, a purpose and a recent test.
6. Retiring an app
- An app is retired when it has no owner, no user for NINETY days, or when its owner leaves and nobody takes it over.
- Export the data that must be kept, to the place the data owner names.
- Delete the hosting project, the database and the storage buckets. Unpublishing the page is not enough: the backend keeps answering.
- Revoke every API key the app used, at each provider.
- Remove the DNS records that pointed at the app.
- Mark the app as retired in the register, with the date.
7. Exceptions and incidents
- An exception to this policy is given in writing by SECURITY CONTACT, for one app and a fixed period.
- Anyone who finds that an app exposes data, or that a key leaked, reports it to CONTACT the same day. Reporting your own mistake is never punished.
- Apps built before this policy are declared within THIRTY days. Declared apps get help to meet section 4. Undeclared apps found later are retired.
How to verify each rule on the live app
A rule that cannot be checked becomes an opinion. Each line of section 4 has a test that takes minutes and needs no code review.
| Rule | How to check | Guide |
|---|---|---|
| 4.2 Sign-in on | Open the app in a private window and request its pages and API routes with no session. Try to sign up with a personal email address | Supabase Auth |
| 4.3 A rule on every table | On Supabase, run the query below. On Firebase, read the rules of each database and bucket. The Supabase RLS checker reads the result of one query and lists open tables and policies | Supabase RLS, Firebase security rules |
| 4.4 No secret in the frontend | Open the live app, copy the JavaScript it loads and paste it into the API key leak checker, or search it for sk_, service_role and -----BEGIN | API key exposed in frontend |
| 4.5 Outside test | Two accounts: note a record id as the first, request it as the second. Keep the request and the answer | IDOR |
select schemaname, tablename
from pg_tables
where schemaname = 'public'
and rowsecurity = false;
-- policies that let everyone through
select tablename, policyname, cmd, qual
from pg_policies
where schemaname = 'public'
and qual = 'true';Rule 4.4 depends on how the framework sends values to the browser. In a Next.js app, any variable whose name starts with NEXT_PUBLIC_ is written into the JavaScript at build time. In a Vite app, the same holds for VITE_. Vite's documentation says such variables "should not contain sensitive information such as API keys". A secret under one of those names is public, whatever the agent said.
Mistakes that make a policy fail
- A ban. People keep building, on personal accounts, and the company loses sight of the apps. See what that costs in the shadow AI guide.
- Rules about code. "All generated code must be reviewed by a developer" stops every non-engineer or gets ignored. Rules about the deployed app can be met by anyone with the right test.
- No retest. An app that passed once is changed by a prompt the next day. Section 5 matters as much as section 4.
- No end of life. Most policies describe how an app is born. Old apps with live keys and forgotten data are where the next leak waits.
- Punishing declarations. If declaring an old app gets it deleted, nobody declares. Rule 7.3 gives a month and help.
Where Keybrum fits in this policy, and where it does not
Keybrum is the automated attack test we build for apps made with AI tools. It produces the proof that rules 4.5 and 5 ask for. It attacks the deployed app from the internet with what any visitor gets, plus accounts it creates where sign-up is open. In plain words, it tries to read tables, storage and database functions with the public key (rule 4.3), looks for provider keys in everything the app serves and checks each with a harmless call (rule 4.4), requests pages, API routes and AI routes with no session (rule 4.2), and reads or changes one account's records from a second account. Each finding carries the request that worked. It closes only when the same attack fails, which is rule 5.3.
Plans attack on every deploy and again every week or month, which covers rules 5.1 and 5.2. The Team plan, €99 a month excluding VAT for 25 apps, also finds every app deployed in the Vercel, Netlify and Supabase accounts you connect. That is a good start for the register of rule 4.1. The report can carry your brand, and each app can have a public trust page showing what was tested and when. A one-time report on one app is €49. Above 25 apps, contact us.
What it does not do: it does not classify your data (section 3), choose your tools (section 2) or retire an app for you (section 6). It only attacks apps whose owner proved ownership, it never tests delete access, and the hosted service does not reach apps inside a private network.
Questions
What should a vibe coding policy include?
Seven things: scope, allowed tools and accounts, data classes, a publication checklist, review after changes, a retirement procedure, and how exceptions and incidents are handled. The publication checklist is the core: owner named, sign-in on, a rule on every table, no secret in the frontend, an outside test with proof.
Is a vibe coding policy the same as an AI acceptable use policy?
No. An AI acceptable use policy covers what employees may type into AI assistants. A vibe coding policy covers what they may publish with AI builders: apps with their own database, users and keys. A company that allows both needs both, and the second can be a two-page annex of the first.
Who should own the vibe coding policy?
IT or security owns the text, the tool list and the app register. Data owners approve the data classes for their own data. Builders own their apps. Keep the approval for a new tool fast, or people will route around it.
Does the policy apply to professional developers using Cursor or Claude Code?
The data rules and the publication checklist apply to everyone, because they describe the deployed app. Engineering teams usually meet them through their existing release process, with code review and automated tests on top. The Cursor app security guide covers what those tools leave to you.
How do you enforce a vibe coding policy?
By checking the apps, since you cannot watch the prompts. Keep a register, find undeclared apps through your hosting accounts and domains, and test each live app on a schedule. A rule tied to a test that runs by itself is enforced. A rule tied to a promise is hoped for.
How often should the policy be reviewed?
Review the tool list every quarter, because the builders change their defaults and features often. Review the rules once a year, or after any incident. Date each version so that an auditor or a customer can see which rules applied when.
Sources
- 1.Security overview, Lovable Documentation
- 2.CVE-2025-48757, NIST National Vulnerability Database
- 3.Statement on CVE-2025-48757, Matt Palmer
- 4.Row Level Security, Supabase Docs
- 5.How to use environment variables in Next.js, Next.js Docs
- 6.Env variables and modes, Vite Docs