~/.praison/security.yaml decides which template sources PraisonAI may load — and now fails closed if that file cannot be parsed.
security.yaml aborts startup instead of silently reopening permissive defaults.
Quick Start
1
Write a hardened config
2
Construct TemplateSecurity
File Location
TemplateSecurity reads its config from a fixed path relative to your home directory.
Configuration Options
Every field maps topraisonai.templates.security.SecurityConfig.
File-Parse Behaviour
_load_config fails closed — a broken file aborts startup rather than silently reverting to permissive defaults.
Quote these verbatim so operators can grep for them:
Common Patterns
Harden every field explicitly so an omitted key never re-opens a default:PRAISONAI_ALLOW_LOCAL_TOOLS governs tool code execution. They are complementary, not redundant — a hardened security.yaml still needs PRAISONAI_ALLOW_LOCAL_TOOLS left unset to keep tools.py autoload off.
Best Practices
Keep the file under source control
Keep the file under source control
Version
security.yaml for your ops team so allow_any_github: false and the allowlist are auditable.Validate YAML before deploying
Validate YAML before deploying
A single bad line now aborts startup rather than silently reopening permissive defaults. Lint the file in CI before it ships.
Do not rely on restrictive class defaults
Do not rely on restrictive class defaults
An existing config that omits
allow_local / allow_any_github still gets True. Set both keys explicitly.Pair with the tool-execution gate
Pair with the tool-execution gate
security.yaml controls template sources; keep PRAISONAI_ALLOW_LOCAL_TOOLS unset to keep tool-code execution off.Related
Security Environment Variables
Control tool-code execution with
PRAISONAI_ALLOW_LOCAL_TOOLSTemplates
Load and render agent recipe templates
Tools Override
Load custom tools from files and modules
tools add
Install a tool package from the CLI

