# Fix common security issues in AI-built apps

> Short answer: Use these guides to move from a finding to a reviewed change. Each one explains the likely boundary, gives a conservative repair pattern, and shows how to verify the live result without reading private user data.

## Make the smallest safe change

Confirm the affected provider, route, table, and deployment before applying a snippet. Replace example names with the real schema and user identity claim; a syntactically valid policy can still grant the wrong people access.

If a private credential appeared in browser output, revoke it with the provider. Removing the text from the current source does not invalidate copies already deployed or downloaded.

## Verify before calling it fixed

After deployment, re-check the public URL and test the intended user flow. For data rules, include an anonymous user, the owner, and an unrelated user. A screenshot or source diff alone does not prove the live boundary changed.

## Related pages

- [Supabase RLS disabled: fix it safely](https://proofforge.live/fix/supabase-rls-disabled) — Understand Supabase Row Level Security disabl in an AI-built app. Learn what a public check proves, how to apply a safe fix, and what to verify before you ship.
- [Supabase RLS USING true: replace it safely](https://proofforge.live/fix/supabase-rls-using-true) — Understand a Supabase RLS policy using true in an AI-built app. Learn what a public check proves, how to apply a safe fix, and what to verify before you ship.
- [Exposed Supabase service_role key: fix it](https://proofforge.live/fix/service-role-key-exposed) — Understand an exposed Supabase service_role k in an AI-built app. Learn what a public check proves, how to apply a safe fix, and what to verify before you ship.
- [Exposed OpenAI API key: rotate and fix](https://proofforge.live/fix/openai-key-exposed) — Understand an exposed OpenAI API key in an AI-built app. Learn what a public check proves, how to apply a safe fix, and what to verify before you ship.
- [Exposed Anthropic API key: rotate and fix](https://proofforge.live/fix/anthropic-key-exposed) — Understand an exposed Anthropic API key in an AI-built app. Learn what a public check proves, how to apply a safe fix, and what to verify before you ship.
- [Exposed Stripe secret key: rotate and fix](https://proofforge.live/fix/stripe-secret-key-exposed) — Understand an exposed Stripe secret key in an AI-built app. Learn what a public check proves, how to apply a safe fix, and what to verify before you ship.
- [Secrets in VITE_ or NEXT_PUBLIC_ variables](https://proofforge.live/fix/vite-env-secrets) — Understand secrets in VITE_ or NEXT_PUBLIC_ v in an AI-built app. Learn what a public check proves, how to apply a safe fix, and what to verify before you ship.
- [Public .env file: close the exposure](https://proofforge.live/fix/env-file-exposed) — Understand a publicly exposed .env file in an AI-built app. Learn what a public check proves, how to apply a safe fix, and what to verify before you ship.
- [Exposed .git folder: block repository access](https://proofforge.live/fix/git-folder-exposed) — Understand a publicly exposed .git folder in an AI-built app. Learn what a public check proves, how to apply a safe fix, and what to verify before you ship.
- [Public source maps: reduce code exposure](https://proofforge.live/fix/source-maps-exposed) — Understand public production source maps in an AI-built app. Learn what a public check proves, how to apply a safe fix, and what to verify before you ship.
- [Missing security headers: safe baseline](https://proofforge.live/fix/missing-security-headers) — Understand missing security headers in an AI-built app. Learn what a public check proves, how to apply a safe fix, and what to verify before you ship.
- [Wildcard CORS: restrict allowed origins](https://proofforge.live/fix/cors-wildcard) — Understand wildcard CORS configuration in an AI-built app. Learn what a public check proves, how to apply a safe fix, and what to verify before you ship.
- [Open Firebase rules: restore least privilege](https://proofforge.live/fix/firebase-open-rules) — Understand open Firebase Security Rules in an AI-built app. Learn what a public check proves, how to apply a safe fix, and what to verify before you ship.
- [Public Supabase storage: review bucket access](https://proofforge.live/fix/supabase-storage-public) — Understand a public Supabase Storage bucket in an AI-built app. Learn what a public check proves, how to apply a safe fix, and what to verify before you ship.
- [Missing HTTPS redirect: secure the route](https://proofforge.live/fix/missing-https-redirect) — Understand an app without an HTTP to HTTPS re in an AI-built app. Learn what a public check proves, how to apply a safe fix, and what to verify before you ship.
- [Exposed admin route: add server authorization](https://proofforge.live/fix/admin-route-exposed) — Understand an admin route reachable without a in an AI-built app. Learn what a public check proves, how to apply a safe fix, and what to verify before you ship.

## Frequently asked questions

**Should I paste a finding into an AI agent?**

Share the masked finding and relevant code context, not a live key, token, private row, or full report URL.

**Can I copy the SQL directly?**

Treat it as a pattern. Confirm the table, owner column, roles, and required operations before applying a migration.

**What if the scan is inconclusive?**

Resolve the blocked or ambiguous request using the provider's own tools; do not interpret missing evidence as a pass.

---
Last updated 2026-11-25 · Reviewed by ProofForge. Methodology: https://proofforge.live/methodology
