Skip to main content
Lovable helps keep your app safe in two ways. While you build, it avoids common security mistakes. It also runs security checks that look for weaknesses an attacker could use. You are still responsible for your app’s security. This matters most if your app handles sensitive data or does something critical.
Lovable’s checks find common security problems, but they can’t guarantee that your app is secure or replace a full security review. For apps that handle sensitive data or critical tasks, consider a review by a security professional.

Where to find security tools

Lovable has security tools in three places: one for each project, one for the whole workspace, and one for your customers.

Project security

Use the Security view while you build or maintain a project. Go to More → Security in the project toolbar. There you run Lovable’s security checks and review and fix what they find, including findings from connected tools such as Wiz and Aikido.

Workspace security

Workspace admins and owners on Business and Enterprise plans can use the Security center to watch security across every project in a workspace. There you can:
  • View security status across all projects, including projects never checked
  • Run security checks for any project without opening it
  • Schedule recurring security scans (Enterprise only)
  • Review vulnerable packages by project or by vulnerability
  • View all project secrets without exposing their values, and spot duplicates or old secrets
  • Export security, package, and secrets data for audits
The Security center also includes Security insights. Security insights ranks projects by how urgently they need review. The ranking looks at security findings, who owns each project, how active it is, and whether it is published. Use it to spot projects that are published externally, inactive, without an owner, or with open findings. On Enterprise plans, it also uses findings about personal data (personally identifiable information, PII), so you can spot externally published projects that contain personal data. The Security center shows information across the workspace, but you still fix problems in each project.

Trust center

To show customers, security reviewers, and investors how your app is protected, enable a Trust center for your externally published app. The Trust center is a page at /.well-known/trust.html on your app’s own domain. There, Lovable publishes security facts it observes about the live app, which others can verify. Your app’s code can’t change the results, and the page is informational, not a certification.

Security checks

Lovable runs two groups of security checks. Both appear on the Security check card in the project Security view, where you can run them. A check reports each possible problem it finds as a finding.

Automatic checks

Automatic checks run on their own before you publish. They look at:
  • Database security: Your database’s access rules and settings. For example, a table without per-row rules (row-level security), a rule that lets everyone in, or leaked-password protection disabled.
  • Public tool access: An MCP server that your app offers without sign-in. An MCP server lets AI assistants, such as ChatGPT or Claude, use your app’s tools.
  • Vulnerable dependencies: Packages your app uses that have known security problems.

Advanced checks

Advanced checks read all of your app’s code. They look for problems in how your app works, who can do what, and how it handles data. They also rerun any automatic checks that are out of date. If your workspace has connected Wiz, they also run Wiz, a security scanner that adds its own findings. The advanced checks report findings in seven categories: Sign-in and accounts, Access permissions, Private data, Keys and passwords, User input, App actions, and Payments and paid features. In the Security view, findings from both groups are sorted into categories, and each one is labeled Critical, Warning, or Info. See How findings are grouped for what each category covers, and Severity labels.

When security checks run

A check runs only when it applies to your project and something has changed since its last run. For example, database checks run only if your project has a database. The dependency check also runs when your list of packages changes, whether you change it in Lovable or push the change to your synced Git repository. To run it yourself, click Run checks on the Dependencies page of the Security view.
The advanced checks run when you start them or on a schedule. If your app’s MCP integration lets people in without sign-in, Lovable also starts them when that integration changes or when you publish it, at most once a day.

Before publishing

When you open the publish dialog, Lovable runs the automatic checks in the background, plus any security scanner your workspace has connected, such as Wiz. The dialog shows the result on one line. If the checks find problems, click the line to open the Security view. There you can review the findings and run the advanced checks before you publish. If your project uses the built-in backend and has unresolved critical findings, Lovable opens the Review security findings dialog when you click Publish. From there, you can send the findings to Lovable to fix, or publish anyway. See Publish step by step. Fix critical problems before you make your app public. Your workspace’s publishing controls decide whether you can publish while findings are open.
Publishing controlsWorkspace admins and owners can enable Block publishing with critical issues in Workspace settings → Security → Privacy & security → Publishing. The setting stops anyone from publishing while critical findings are unresolved. New Enterprise workspaces that Lovable creates have it enabled from the start. See Block publishing with critical issues.

On demand

You can run the checks yourself from three places:
  • In the project Security view, click Run checks on the Security check card. Lovable runs every check, automatic and advanced, that is out of date for the latest version of your project. The button is unavailable when the results are already current.
  • In the workspace Security center, click Run security checks on a project’s row. Lovable runs the advanced checks for that project in the background, plus any automatic checks that are out of date.
  • In the project chat, ask Lovable to scan your app or review its security. Lovable checks your database and any public tools, and replies with what it found. Lovable also starts the advanced checks in the background, and you can follow their progress in the Security view. When they finish, Lovable continues the chat and explains the findings. You need edit access to the project to start the advanced checks this way.
Run the checks after big changes to your code, when you look into a finding, or whenever you want up-to-date results.

Scheduled scans (Enterprise only)

On Enterprise plans, workspace admins and owners can schedule security scans. A scheduled scan runs the advanced checks on the projects you choose, so they stay covered without anyone starting the checks. See Schedule security scans for setup, schedule options, and credits.

Fix security findings

Lovable can fix findings when you ask, or on its own while you build if you enable auto-fix.

Fix findings in the Security view

The project Security view is the main place to work through findings, while you build, before you publish, and after launch. There you can:
  • See findings by category and severity, with the evidence for each one
  • Run the checks again
  • Fix one finding, a group, or all of them with Fix all
  • Ignore findings that don’t apply, with a reason
  • Review your app’s packages and their known problems, and fix vulnerable packages in bulk
  • Export your package list, or a software bill of materials (SBOM)
When your project has open critical findings or warnings, a notice above the project chat input also lets you fix them all at once. See Fix findings.

Let Lovable automatically fix eligible findings

With auto-fix enabled, Lovable fixes some findings for you while you build. Each time you send a build request in the project chat, Lovable looks at up to three of the latest findings from the automatic checks: critical database findings and vulnerable packages. Lovable then tries to fix them in the same response. This is treated as standard build usage and consumes credits. Auto-fix only handles findings that are safe to fix automatically, such as common RLS mistakes, database access problems, and packages with known vulnerabilities. Auto-fix doesn’t handle findings from the advanced checks. You can set auto-fix in two places:
  • For the whole workspace: Workspace admins and owners set the default with Auto-fix security issues in Workspace settings → Security → Privacy & security → Security.
  • For one project: Anyone with edit access can change it in Project settings → Auto-fix security issues, unless the workspace default requires auto-fix for that project.
The workspace options depend on your plan:

Ask Lovable to review your app’s security

You can ask Lovable to review your app’s security in the project chat at any time. This conversational security review is treated as standard build usage and consumes credits. Lovable also checks your database and any public tools, and starts the advanced checks in the background. When they finish, Lovable explains what they found in the project chat. See On demand. For example:
Lovable replies with a detailed assessment, which usually covers:
  • Possible weaknesses in your app’s code
  • Common problems such as cross-site scripting (XSS), unchecked user input, and sign-in flaws
  • Your database structure and row-level security (RLS) policies
  • Your app’s overall security, with specific recommendations
Your project decides how far the review goes. You can also ask Lovable to focus on one area, for example:
or
A review is most useful after big changes or before a major release. For live apps, ask for one now and then, even when nothing looks wrong.

Add more coverage with security connectors

Your workspace can connect other security tools to cover more than Lovable’s built-in checks.

Wiz scanning

Connect Wiz to add Wiz’s security scanning to every project in your workspace. Wiz checks two things:
  • Software composition analysis (SCA): Finds vulnerable packages, including the packages your packages depend on, using Wiz’s continuously updated security database
  • Static application security testing (SAST): Reads your source code for risky patterns, secrets written into the code, and unsafe API calls
When your workspace connects Wiz, Wiz runs with the advanced checks, whether they start from the Security view, the Security center, or a scheduled scan. Wiz also runs when the publish dialog opens. Its findings appear in each project’s Security view, in a group named Wiz. See Scan your projects for vulnerabilities with Wiz for setup.

AI penetration testing with Aikido

Lovable’s checks and Wiz read your code and settings to spot risky patterns. This is called static analysis. A penetration test (pentest) goes further. AI agents attack your running app with real requests, the way a real attacker would. They try to break sign-in, permissions, and your app’s API. This is called dynamic analysis. Connect Aikido to run AI pentests on individual projects. A pentest confirms each problem with a real attack, so every finding it reports can actually be used against your app. You start pentests from the Aikido pentest card in the project’s Security view. Their findings sync into the Findings page, in a group named Aikido. Aikido also creates a report you can share, set up for SOC 2, ISO 27001, and security questionnaires. Run Lovable’s security checks first and fix what they find. Then confirm with a pentest before a major release. See Run AI-powered penetration tests with Aikido for setup, requirements, and how to run a pentest. Some security settings protect your app’s user accounts and sign-in, rather than checking your code. They help stop attackers from taking over accounts with stolen passwords. Review them when you set up sign-in, or before you launch an app that lets users sign in.

Leaked password protection

If your app lets users sign in with an email and password, you can stop them from choosing passwords that have leaked online. This protection checks each password against the HIBP (Have I Been Pwned) database and rejects passwords that have leaked or are easy to guess. That makes it harder to take over an account with a password reused from another site.

Costs and usage

Most security features are free, and some security actions consume credits. Use the security checks to keep an eye on your app and fix specific problems. Use a conversational review when you want a deeper look at your app’s overall security.

Free security actions

These actions don’t count as standard build usage:
  • Running security checks: Free wherever you start them: the Security view, the Security center, the publish dialog, or the project chat.
  • Fixing findings: Fixes from the Security view, or with Fix all in the project chat, use your free fixes. Your account includes 10 free fixes, counted across all your workspaces and projects. Each free fix becomes available again 24 hours after you use it. Security fixes share these free fixes with Try to fix on build errors. When all 10 are in use, further fixes are treated as standard build usage and consume credits. Your workspace needs at least one credit to start any fix.

Security actions that use credits

These actions are treated as standard build usage and consume credits:
  • Conversational security review: Asking Lovable to “review my app’s security” in the project chat. The checks Lovable runs for the review are free, but your request and Lovable’s explanation consume credits.
  • Security questions in the project chat: Any other security question you ask Lovable in the project chat.
  • Adding a finding to the project chat: Using Add to chat to ask Lovable to explain or fix a finding.
  • Auto-fix while you build: See Let Lovable automatically fix eligible findings.
Unlike fixes from the Security view or with Fix all, asking Lovable in Build mode to fix or change findings is treated as standard build usage and consumes credits. Discussing findings in Chat mode is chat usage.

Costs from other providers

Security connectors have their own costs for scanning or testing, separate from Lovable credits:
  • Wiz scanning runs with Lovable’s security checks and doesn’t consume Lovable credits. Your Wiz deployment’s quotas, limits, and charges still apply.
  • AI pentests with Aikido are billed by Aikido and don’t consume Lovable credits.

Common security risks and how Lovable helps

These sections explain the main risks for an app and how Lovable helps with each. For tips on building secure apps, see Security best practices for Lovable apps.

Protecting API keys

Part of your app runs in your visitors’ browsers, and anyone can read the code there. So API keys and other secrets must never go into that code. A leaked key can expose data or let someone use your accounts. When you paste an API key into the project chat, Lovable detects it and helps you store it in Secrets instead of in your code. If Lovable recognizes which tool the key belongs to, it also offers to set up a connector for that tool. See Secrets for how the key is stored in each case. You don’t need to paste keys at all. Describe what you want to build, and Lovable helps you set it up safely, with the key in Secrets and the call made on the server. For example:
Lovable then helps you:
  1. Store your API key in Secrets
  2. Call the API from server-side code instead of the browser
  3. Call that server-side code from your app’s pages
This keeps your keys out of the browser and follows standard web security practice.

Protecting data access with row-level security (RLS)

Row-level security (RLS) policies are rules in your database that decide which users can see or change each row of data. Wrong rules are a common cause of data leaks. To see every policy in your project, go to More → Database → Manage → Policies. See Row level security (RLS) policies. Lovable helps you check that users can only see and change the data they’re allowed to. The automatic Database security check flags common mistakes, such as a table without per-row rules, or a rule that lets everyone in. When you run the advanced checks, Lovable also reruns this check if it is out of date. Review your RLS policies often, especially before you publish, or after you change sign-in or your database structure.

Identifying database security risks

Your table structure and the rules on it work together. A risky mix can expose data even when each rule looks fine on its own. The Database security check also looks at related settings, such as file storage rules and leaked-password protection. The advanced checks go further. They check whether your server code follows the same ownership rules as your database. They also check whether actions only some users should take, such as admin actions, check the user’s role, not just that they signed in.

Identifying vulnerabilities in dependencies

Your app is built on packages, also called dependencies: code that other people wrote. Even popular packages can have security weaknesses that are found later, called vulnerabilities. The automatic Vulnerable dependencies check finds packages with known vulnerabilities and tells you how to fix them. You see these findings in the project’s Security view, where you fix them. Workspace admins and owners also see them across all projects in the Security center. Each finding names the package, its version, and the public report about the problem, called the advisory. Only critical vulnerabilities become findings. The Security center’s Supply chain security tab also shows the version that fixes the problem, when there is one. Some critical vulnerabilities don’t become findings. Either Lovable has confirmed they can’t affect Lovable apps, or their EPSS score is low. EPSS is an industry estimate of how likely attackers are to take advantage of a vulnerability. These packages still appear in the project’s dependency list, with a marker that explains why. See Review project dependencies. Keep your packages up to date. When a new critical vulnerability is announced, the Security center shows which projects it affects, so you can fix them quickly.

Identifying vulnerabilities in application code

Your app’s own code can create risks too. Examples are trusting what users type without checking it, weak checks on who can do what, and keys left in the code. The automatic checks don’t cover these. The advanced checks read your code for these problems and explain what could happen if someone found them. That way you can fix them before anyone can use them against your live app.