Skip to main content
~/.praison/security.yaml decides which template sources PraisonAI may load — and now fails closed if that file cannot be parsed.
The template-loading side of that request is governed by the file below — a bad 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 to praisonai.templates.security.SecurityConfig.
Class defaults stay permissive (allow_local=True, allow_any_github=True). A config file that exists and parses cleanly but omits those keys still gets True. Set them explicitly to harden.

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:
This file governs template source loading. 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

Version security.yaml for your ops team so allow_any_github: false and the allowlist are auditable.
A single bad line now aborts startup rather than silently reopening permissive defaults. Lint the file in CI before it ships.
An existing config that omits allow_local / allow_any_github still gets True. Set both keys explicitly.
security.yaml controls template sources; keep PRAISONAI_ALLOW_LOCAL_TOOLS unset to keep tool-code execution off.

Security Environment Variables

Control tool-code execution with PRAISONAI_ALLOW_LOCAL_TOOLS

Templates

Load and render agent recipe templates

Tools Override

Load custom tools from files and modules

tools add

Install a tool package from the CLI