Lovable Sovereign Runtime: Vibe Coding Needs a Boundary Before the First Prompt

The prior design had five surfaces. It missed the sixth, and the sixth was the one that mattered. Lovable subagents read all of your project files, including .env, and report their findings back to the main Lovable agent. A subagent briefed to explore the project structure will read .env.production if it exists. Those contents appear in subagent findings. Those findings go to the main agent. The main agent includes them in responses. That is a credential exfiltration path that bypasses the normal agent access patterns and does not require any malicious instruction, just a file that should not be in the repo root. The Lovable Sovereign Runtime, released July 19, 2026, closes it. It reports 21 of 21 tests passing.

The problem: the subagent reads everything, and the main agent repeats it

Before defending Lovable, the release insists on understanding what Lovable actually does, and it quotes Lovable’s own documentation to do it. The query_database function, the release quotes, runs SQL with your full database permissions: read, write, and schema changes. Workspace knowledge is always included in context for every future message, across every project in your workspace, 10,000 characters of persistent context shared workspace-wide. Lovable MCP tokens are full-account scoped, not one project, so whatever client you connect can list, read, and edit every project you have access to. Subagents can search your project, inspect files, and report their findings back to the main Lovable agent.

Those are features. They are also the attack surface. The database function carries full permissions, so a destructive or exfiltrating query is a single call away. Workspace knowledge persists across every project, so an instruction planted in one project’s knowledge follows the operator everywhere. MCP tokens span the whole account, so one connected client reaches every project. And the subagent surface, which the release names LV-SUBAGENT, is the one the prior design missed entirely.

The exfiltration path needs no attacker instruction. A subagent asked to explore the project structure reads files, and it reads all of them, including credential files. The contents land in the subagent’s findings. The findings go to the main agent. The main agent includes them in its responses. Credentials leave the project through the normal reporting path, with no injection, no exploit, and no anomaly to detect. The file only had to exist in the repo root.

The other surfaces the release covers are the ones the prior design did catch: instruction override in workspace knowledge, an API key in project knowledge, a destructive database step in a plan, a DROP TABLE or TRUNCATE TABLE in query_database, a high-privilege database write scope over MCP, and eval() in generated code.

What the release changes

The fix for the subagent surface is a gate called scan_subagent_file_access(). It intercepts file path lists before subagents read them and blocks access to credential files by path pattern. The interception point matters: the gate runs before the read, not after the findings come back, because once the subagent has read the file, the contents are already in its findings and already on their way to the main agent.

The highest-impact action in the release requires no code at all. Drop the file workspace-knowledge/ai-safe2-workspace-knowledge.md into Lovable, under Settings, then Knowledge, then Workspace knowledge. Every future agent session in the workspace then operates under AI SAFE2 trust boundary rules, with no integration required.

The release is candid about its own testing, and the candor is worth recording. The initial run was 18 of 21, not 21 of 21. Three real gaps were caught and fixed before shipping: a sk-live-* key format with a hyphen in the key body that the prior engine pattern did not match, a natural-language instruction to delete all existing user records that the SQL-only plan scanner did not catch, and a Response.json(process.env) call using the Web API that the res.json() pattern did not match. The final run reports 21 of 21 passing. The release calls that the methodology working, with gaps caught in testing rather than production, and the three named gaps are the evidence for the claim.

What to do with it

Get the package from examples/lovable-sovereign-runtime in the ai-safe2-framework repository. First, drop the workspace knowledge file into Lovable settings, because that one action covers every future session in the workspace and takes minutes. Then check the repo root of every project for credential files, because the gate blocks subagent access by path pattern, and a credential file that should not be in the repo root should not be there at all. Then test the subagent path yourself: brief a subagent to explore the project structure and confirm it cannot read credential files. A blocked read is evidence for the case tested. It is not a general safety claim, and it should not be recorded as one.

Where it sits in the program

This release was the last of the July sequence, closing the program’s summer run. The sovereign runtime program began with the Hermes runtime in May 2026, followed by Anti-Gravity v2 on June 9. LangChain came next on June 19, then LangGraph on June 22, Langflow on June 24, AutoGen on June 26, CrewAI and Make.com on June 30, Grok on July 2 with a v3.1 update on July 8, Cursor on July 8, and Lovable on July 19. Lovable matters in that sequence because it found a gap the program’s own prior design had missed. The five-surface design was already shipping, and the subagent surface was live in production the whole time. The release that caught it is the one that proves the program tests its own assumptions instead of defending them.

The controls, in one place

The runtime enforces 17 controls from AI SAFE2 v3.0: P1.T1.2, P1.T1.10, P1.T1.4_ADV, P1.T1.1, P1.T2.5, P1.T2.6, S1.3, S1.5, S1.6, P2.T3.1, A2.5, P3.T5.5, P4.T7.1, M4.5, E5.1, CP.4, and CP.10. The release states that all controls were verified against the live AI SAFE2 v3.0 framework, with zero fabricated controls. If a control ID in a future version does not map, that is the first thing to check.

What this does not establish

The 21 of 21 test result is the release’s own smoke test, and the release body does not describe any independent validation. Treat the number as the release’s claim about its own tests, not as outside proof. The Lovable platform behaviors quoted in this draft come from Lovable’s own documentation as presented in the release body, and they were not independently re-verified for this draft. The gate blocks subagent access to credential files by path pattern. It does not remove credential files from repo roots, and it does not govern what the model does with clean input. A gate that blocks a read is not a substitute for removing the secret from the repository.

Sources

  • Lovable Sovereign Runtime release, ai-safe2-framework, tag 2026-07-18_lovable-sovereign-runtime, published 2026-07-19: https://github.com/CyberStrategyInstitute/ai-safe2-framework/releases/tag/2026-07-18_lovable-sovereign-runtime
  • Lovable Sovereign Runtime package: https://github.com/CyberStrategyInstitute/ai-safe2-framework/tree/main/examples/lovable-sovereign-runtime
  • AI SAFE2 framework repository: https://github.com/CyberStrategyInstitute/ai-safe2-framework
  • Release-notes audit, 2026-11-17: ~/workspace/seo-review/release-notes-audit-2026-11-17.md

Recent Posts

Tag Cloud

Stop Threats Before They Execute

Your free Kernel-Level Defense Buyer’s Guide is ready to download.

By providing my email address, I consent to receive emails and text messages—including newsletters and marketing communications—from creators of Warden Secure, Cyber Strategy Institute, our flagship zero-trust platform for ransomware prevention, and agree to the Terms and Privacy Policy. You may unsubscribe at any time.