Security Policy • AI Agent SDK
SecurityPolicy: Security policy for sandbox execution.
SecurityPolicy
Defined in the config module.
AI Agent
Security policy for sandbox execution.
Attributes: allow_network: Whether to allow network access allow_file_write: Whether to allow file writes allow_subprocess: Whether to allow subprocess creation allowed_paths: List of paths that can be accessed blocked_paths: List of paths that are blocked allowed_commands: List of allowed shell commands (empty = all) blocked_commands: List of blocked shell commands allowed_imports: List of allowed Python imports (empty = all) blocked_imports: List of blocked Python imports max_output_size: Maximum output size in bytes
Properties
boolNo description available.
boolNo description available.
boolNo description available.
List[str]No description available.
List[str]No description available.
List[str]No description available.
List[str]No description available.
List[str]No description available.
List[str]No description available.
intNo description available.
Methods
Create a strict security policy for untrusted code.
standard()Create a standard security policy.
permissive()Create a permissive security policy for trusted code.
Internal & Generic Methods
- to_dict: Convert to dictionary.
Source
View on GitHubpraisonaiagents/sandbox/config.py at line 14