flow runs workflows as Python code. Treat workflow scripts as trusted code unless you place them inside your own OS-level sandbox.
flow run workflow.pyexecutes that file with normal Python process privileges.flow run --nl ...validates the model-authored script before execution, but validation is a guardrail against accidental unsafe output, not a hostile-code sandbox.wf.localruns arbitrary Python callables.shell_cmdruns configured argv lists withshell=False, but the called CLI still interprets its own arguments and may have side effects.
- Keep API keys in environment variables or credential files.
flow doctormust not print secret values.- Journals and reports can contain prompts, model outputs, labels, and tool results. Do not place secrets in prompts unless you are comfortable storing them in the run directory.
A tool grant is per leaf. Backends without a native tool loop fail closed when tools are requested. Side-effecting tools should require an approval callback or be exposed only in trusted workflows.
Use an external sandbox:
- container or VM
- restricted working directory
- no mounted secrets
- no wallet/key files
- constrained network access
- throwaway
FLOW_DATA_DIR
See SECURITY.md.