> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flintai.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Unsafe code generation

> Agent-generated code or patches applied directly without human preview or sandboxed testing

Agent-generated code or patches applied directly without human preview or sandboxed testing

## How to resolve

Review all agent-generated code before execution. Run generated code in a sandboxed environment with restricted filesystem and network access.

## Risk

**Governance/Compliance**

This vulnerability falls under [ASI05:2026 — Unexpected Code Execution](https://genai.owasp.org/resource/owasp-top-10-for-agentic-applications-for-2026/) in the OWASP Top 10 for Agentic Applications. Agent generates or runs code, commands, or scripts without safe sandboxing or review.

**Security**

Agent-generated code or patches applied directly without human preview or sandboxed testing. If exploited, this can compromise the agent's integrity, confidentiality, or availability, potentially affecting downstream systems and data.

## Explanation

Agent-generated code or patches applied directly without human preview or sandboxed testing. This falls under ASI05 (Unexpected Code Execution): Agent generates or runs code, commands, or scripts without safe sandboxing or review.

## Specifications

**Trigger**

* Agent scan detects agent-generated code or patches applied directly without human preview or sandboxed testing

The scanner looks for patterns such as:

* code generation tool with auto-apply flag
* generated patches run without review step
* no human\_input=True before code execution task

**Severity**

* HIGH

**Applies to**: Agent
