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

# Security Policy • Rust AI Agent SDK

> SecurityPolicy: Security policy for sandbox execution

# SecurityPolicy

> Defined in the [**extras**](../modules/extras) module.

<Badge color="orange">Rust AI Agent SDK</Badge>

Security policy for sandbox execution

## Fields

| Name                 | Type                | Description                         |
| -------------------- | ------------------- | ----------------------------------- |
| `allow_network`      | `bool`              | Allow network access                |
| `allow_filesystem`   | `bool`              | Allow file system access            |
| `allow_subprocess`   | `bool`              | Allow subprocess execution          |
| `allowed_domains`    | `Vec&lt;String&gt;` | Allowed domains for network access  |
| `allowed_paths`      | `Vec&lt;String&gt;` | Allowed paths for filesystem access |
| `max_execution_time` | `u64`               | Maximum execution time in seconds   |
| `max_memory`         | `u64`               | Maximum memory in bytes             |

## Methods

### `restrictive`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn restrictive() -> Self
```

Create a restrictive security policy

### `permissive`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn permissive() -> Self
```

Create a permissive security policy

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/parity/extras.rs#L397">
  `praisonai/src/parity/extras.rs` at line 397
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Security" icon="lock" href="/docs/rust/security" />

  <Card title="Rust Sandbox" icon="box" href="/docs/rust/sandbox" />

  <Card title="Rust Policy" icon="file-shield" href="/docs/rust/policy" />
</CardGroup>
