Executive summary: AI app builders give generated apps owner-level access
The Orca Research Pod found the same architectural mistake in multiple independent AI app builder platforms. Code the platform generates inherits the authority of the build environment.
These platforms build the app inside their own trust boundary and never take it back out. As a result, the generated app gets owner-level authority over the developer’s connected accounts and backend. The developer never granted that authority, can’t see it and can’t revoke it.
Key findings
Across several platforms, we confirmed that generated applications could do the following. In some cases, so could anonymous visitors to those apps.
- Act as the account owner on connected third-party services
- Read live database credentials belonging to other customers
- Call privileged backend functions that bypass row-level security entirely
- Reach platform secrets from inside the build sandbox
In none of these cases did the developer misconfigure anything. The authority is there by default, in the environment, before the first line of application code is written.
What is ambient authority in AI app builders?
Ambient authority is privilege that sits in the surrounding environment instead of being granted to a specific caller for a specific purpose.
An AI app builder has to be powerful to be useful. To scaffold a working application, it needs to write files, install dependencies, provision a database, commit to your repository and read the services you connected. So the platform gives its build environment broad authority over your accounts.
Then it puts your application in that same environment. Nothing separates the two. The credential the agent used to build the app is still there when the app runs, and the app can read it just as easily as the agent could.
The pattern isn’t one vendor’s bug. It keeps showing up because every builder faces the same design pressure:
| Platform | What the generated app is handed |
| A major AI app builder | A plaintext environment variable that acts as a bearer credential for the account owner on every connected third-party service |
| A major AI app builder | A live platform session token in the agent’s environment, plus an unauthenticated internal LLM proxy billing the vendor’s own account |
| A generated backend | Supabase edge functions holding a service-role key, with the JWT gateway defaulted off |
| A build sandbox | Platform secrets readable by any process running inside it |
Three ways AI app builders leak credentials in the wild
One environment variable exposes every connected service
On a major AI app builder, a single plaintext environment variable is present in every project. It authorizes the caller as the account owner across the account’s connected services: GitHub, Gmail, Slack and Drive. The GitHub connector’s scope is full repository access, read and write, private repositories included.
The platform’s AI agent isn’t involved at any point, and that matters more than it first appears. Undocumented endpoints return each connector’s raw OAuth access token, which then works directly against GitHub or Google. No request passes through the platform, so the platform’s logging, rate limiting and revocation never see the traffic.
Three properties make this worse than a typical leaked secret:
- Collaborators inherit it. Any project collaborator gets the token through the shared shell, with no planted code and no remix. Revoking the invitation doesn’t revoke tokens they’ve already taken.
- The token is portable and long-lived. It’s signed, not encrypted, so anyone holding it can read its claims. Replayed from an unrelated laptop, it still returned the account’s data.
- The platform’s scanner misses it. The platform’s own security scanner reports code that exfiltrates the variable as clean. The control users trust to tell them a project is safe says it’s safe.
An unprotected API endpoint leaks database credentials across tenants
At another builder, which we’re not naming, a single API endpoint returned any project’s database integration to any logged-in user of the platform. That included a live database key and the full project configuration. Nothing checked that the caller owned the project, and project IDs were small sequential integers.
Counting through one ID range returned live credentials for thousands of projects across dozens of organizations. That included projects hosted in customers’ own third-party database accounts. The keys are genuine and long-lived. We confirmed cross-tenant reads against multiple unrelated tenants. We also reproduced the issue on a project created during testing, so new projects were affected too.
Where row-level security wasn’t configured, the credentials led straight to the data behind them. Most sampled databases also had email auto-confirm and open signup turned on. An attacker with a leaked key could register a confirmed account and reach everything the authenticated role can see, which is usually far more than the anonymous role.
AI-generated Supabase edge functions bypass row-level security
The third instance involves no platform defect at all. Nothing is broken on the platform’s side. The AI wrote the vulnerability and shipped it.
Ask a builder for an app with a database, and it generates Supabase edge functions to do the work. Many of those functions hold a service_role key, Supabase’s administrative credential, which bypasses row-level security entirely. One builder also ships them with the JWT gateway turned off, so the function answers anyone who calls it. The result is an unauthenticated endpoint holding a key that ignores every access control you configured.
Those defaults come from the generator, not Supabase. The pattern lasts because developers have no reason to suspect it. One developer recorded the belief in a source comment: “The Publishable Key is the successor to the anon key: it is public and safe for client-side code (Row-Level Security protects the data).”
That’s correct, and it matches Supabase’s own guidance. It’s also beside the point, because the app’s own service_role function goes straight around row-level security. The developer secured the front door of a house with no back wall.
This is why teams need to catch risky code before it reaches production, including code an AI agent wrote.
Why prompt injection defenses don’t stop AI app builder credential leaks
The obvious reading of any AI platform vulnerability is prompt injection. Here, it’s the wrong one.
We tried it. On a major AI app builder, the agent resisted every prompt injection attempt we made. Plain application code then walked straight past it, because the code didn’t need to persuade the agent of anything. It just read a variable.
Injection is one delivery route among many. The real defect is that the authority is ambient in the first place. It sits in the environment, where any code and any collaborator can reach it, and in one case any anonymous visitor too. Defenses placed at the agent don’t protect a credential that lives next to it.
That distinction decides where the fix has to go. Guardrails on the model aren’t a control over the environment.
How to secure apps built with AI app builders
Several of these issues were still unfixed when we wrote this. These steps don’t depend on a vendor fix:
- Assume the generated app can reach every connected integration. Connect only the services a project needs, at the narrowest scope the builder will accept, and disconnect the rest. Identities with too much access are where this risk starts, so reduce identity-based cloud risk across these connections.
- Rotate keys for any project built on these platforms. Treat platform-issued tokens as compromised if a project was ever shared, remixed or made public.
- Turn on row-level security for every table, then check it. A table with RLS enabled but no policy isn’t a protected table.
- Audit generated backend functions for service-role keys. Confirm each function authenticates its caller, and turn the JWT gateway on. Unauthenticated functions are effectively exposed APIs, so find and secure unmanaged APIs as part of the audit.
- Inventory the pair, not just the app. The risk object is the generated application plus the managed database behind it. Neither half alone tells you what’s exposed, so find and protect sensitive data across your cloud behind every generated app.
Frequently asked questions about AI app builder security
Are AI app builders safe to use?
They can be. But this research shows that generated apps can inherit owner-level access to connected accounts by default, so scope integrations narrowly and audit what gets generated.
Does Supabase row-level security protect AI-generated apps?
Not if a generated edge function uses the service_role key, because that key bypasses RLS entirely.
Is this a prompt injection problem?
No. In our testing, plain application code read the credential directly without involving the agent.
How can Orca help secure AI-generated applications?
Orca’s unified cloud security platform brings the full AI footprint into a single risk model alongside your cloud context: the models and MCP servers teams connect, the code AI agents write and the applications AppGen platforms generate.
Orca also helps security teams uncover apps built with AI tools, so generated applications and the data behind them don’t sit outside security’s view. Because Orca sees those connections together, it can surface the issues that turn a generated app into a breach path: overprivileged identities and integrations, exposed secrets in code, unauthenticated APIs and sensitive data without the right protections. Orca then prioritizes them by what an attacker could actually reach. Teams can keep building with AI at full speed while security keeps pace, without adding agents or slowing developers down.
