KlegoBuild

Security

Guardrails for
generated apps.

Klego treats generated code as untrusted output. The builder relies on authenticated ownership, sanitized files, isolated previews, and observable runtime behavior.

Secure Klego interface

Defense in depth

Three boundaries around every preview.

Sandbox isolation

Generated apps run in isolated preview containers with readiness checks and bounded runtime access.

Ownership checks

Project, version, sandbox, and file operations are gated by authenticated user ownership.

Observable previews

Build, console, and network logs are collected so failures are visible without exposing host internals.

Practical controls built into the flow.

AI-emitted file paths are sanitized before they can touch disk.
Version files remain the source of truth for generated app state.
Provider keys are handled by the server and are not written into generated apps.
Idle preview containers are stopped by heartbeat and reaper logic.
Preview readiness requires an actual HTTP response from the mapped port.
Sandbox state reconciliation can recover a still-running preview container.