Security environment variables control opt-in access to potentially dangerous operations, ensuring secure defaults for RCE and session hijacking prevention.Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
Quick Start
How It Works
| Phase | Action | Default Behavior |
|---|---|---|
| Startup | Check environment variables | Block dangerous features |
| Request | Validate security permissions | Allow only safe operations |
| Execute | Run with appropriate restrictions | Fail-safe mode active |
Environment Variables
PRAISONAI_ALLOW_LOCAL_TOOLS
Controls automatic loading oftools.py files from the current working directory.
Security Risk: Remote Code Execution (RCE) via malicious tools.py files
12eb019b):
praisonaiagentsagent generator (load_tools_from_tools_py,generate_crew_and_kickoff)praisonai runYAML workflows (recipetools.pyunder_run_yaml_workflow)praisonai research --tools <file.py>praisonai chat --rewrite-tools <file.py>and--expand-tools <file.py>- Generic CLI
_load_tools(tools_path) - HTTP API:
praisonai.api.call.import_tools_from_file(raisesValueErrorif disabled) - Path-traversal guard: files outside the current working directory are refused even when
PRAISONAI_ALLOW_LOCAL_TOOLS=true
Even when
PRAISONAI_ALLOW_LOCAL_TOOLS=true, the loader refuses any path outside the current working directory. This is a deliberate defence-in-depth layer for HTTP-API callers (praisonai.api.call.import_tools_from_file) where the path can come from network input. Move the tools.py you want to load into your CWD if you hit Refusing to exec ... outside working directory. in the logs.PRAISONAI_ALLOW_LOCAL_TOOLS accepts only true (case-insensitive). Values like 1, yes, or on are not truthy for this variable (unlike PRAISONAI_ALLOW_TEMPLATE_TOOLS).
Usage Example:
| When | Where it appears | Message |
|---|---|---|
| Env var unset, CLI tool loader (research/rewrite/expand/recipe) | stdout (rich [yellow]) | Warning: Tools loading disabled. Set PRAISONAI_ALLOW_LOCAL_TOOLS=true to enable. |
| Env var unset, agent generator | logger.warning | Refusing to exec tools.py: set PRAISONAI_ALLOW_LOCAL_TOOLS=true to enable. |
Env var unset, HTTP API (api/call.py) | raised exception | ValueError("Local tools loading disabled. Set PRAISONAI_ALLOW_LOCAL_TOOLS=true to enable.") |
| Path outside CWD, env var set | logger.warning | Refusing to exec <path>: outside working directory. |
| Path outside CWD via HTTP API, env var set | raised exception | LocalToolsDisabled("Refusing to exec <path>: outside working directory.") |
PRAISONAI_ALLOW_TEMPLATE_TOOLS
Controls implicittools.py autoload by the template tool-override system, both from the current working directory and from a recipeβs template directory.
Security Risk: Remote Code Execution (RCE) when loading recipes/templates from untrusted sources (e.g. recipes fetched from a remote registry)
Accepted truthy values:
1, true, yes, on (case-insensitive, whitespace-stripped)
Affected Components:
praisonai.templates.tool_override.create_tool_registry_with_overridespraisonai.templates.tool_override.resolve_tools
override_files, override_dirs, and tools_sources continue to work without this opt-in and are the recommended way to load custom tools.
Usage Example:
PRAISONAI_ALLOW_JOB_WORKFLOWS
Controls execution of job and hybrid workflow types that can run shell commands and scripts. Security Risk: Remote Code Execution (RCE) via malicious YAML workflows- Job workflows: Direct shell, Python, and script execution
- Hybrid workflows: Combined agent + job execution
PRAISONAI_BROWSER_ALLOW_REMOTE
Controls browser server binding to non-loopback interfaces (0.0.0.0, remote IPs). Security Risk: WebSocket session hijacking and unauthorized browser access- Binds to
127.0.0.1(localhost only) - Blocks attempts to bind to
0.0.0.0or remote interfaces
PRAISONAI_RUN_SYNC_TIMEOUT
Default maximum seconds the wrapperβs sync-to-async bridge will wait for a coroutine to complete. Default:300 (5 minutes)
praisonai CLI entry and wrapper-based server (gateway, a2u, mcp_server, scheduler). The SDK (praisonaiagents) uses a separate bridge β see Async Bridge.
Common Patterns
- Development Mode
- Production Mode
- Docker Deployment
Migration Guide
Upgrading from Vulnerable Versions
Identify Usage
Check if you use any of these features:
- Local
tools.pyfiles - Recipes / templates that ship a
tools.pyand rely on it being implicitly loaded - Job or hybrid workflows with shell/script execution
- Browser server binding to
0.0.0.0 - HTTP API callers that pass a
file_pathtopraisonai.api.call.import_tools_from_fileβ these now raiseValueErroruntil you opt in
Best Practices
π Principle of Least Privilege
π Principle of Least Privilege
Only enable environment variables for features you actively use. Each variable increases your attack surface.
π’ Production Environment Isolation
π’ Production Environment Isolation
Never enable dangerous variables in production unless absolutely necessary. Use staging environments for testing.
π File System Security
π File System Security
When
PRAISONAI_ALLOW_LOCAL_TOOLS=true or PRAISONAI_ALLOW_TEMPLATE_TOOLS=1 is set, ensure your working directory doesnβt contain untrusted tools.py files. This is especially risky for recipes fetched from remote registries.π Network Security
π Network Security
When
PRAISONAI_BROWSER_ALLOW_REMOTE=true, use firewalls and authentication to protect browser endpoints.Security Advisories
These environment variables address the following security vulnerabilities:| Advisory | Severity | Description | Environment Variable |
|---|---|---|---|
| GHSA-g985-wjh9-qxxc | High | RCE via Automatic tools.py Import | PRAISONAI_ALLOW_LOCAL_TOOLS |
| GHSA-xcmw-grxf-wjhj | High | Implicit RCE via template/CWD tools.py autoload | PRAISONAI_ALLOW_TEMPLATE_TOOLS |
| GHSA-vc46-vw85-3wvm | Critical | RCE via job workflow YAML | PRAISONAI_ALLOW_JOB_WORKFLOWS |
| GHSA-8x8f-54wf-vv92 | Critical | WebSocket session hijacking | PRAISONAI_BROWSER_ALLOW_REMOTE |
- praisonai:
>=0.0.57 - praisonaiagents:
>=0.0.23
PRAISONAI_ALLOW_LOCAL_TOOLS enforcement to research/rewrite/expand/recipe tool-loading paths and the HTTP API, and added a CWD-only path constraint as defence-in-depth. No new advisory was filed; the threat model is unchanged from GHSA-g985-wjh9-qxxc.
Related
Guardrails
Content filtering and safety controls
Permissions
Agent permission management system

