Allowed by default
The current working directory is allowed. When a script file is executed, its own directory is also added to the allowed set.
Sesi enables safe mode by default, blocks shell execution, and restricts filesystem access to approved workspace paths unless you explicitly opt out.
exec and spawn is blocked.Every normal CLI run starts with safe mode enabled unless the operator deliberately disables it. Safe mode controls process execution, host-integrated runtimes, server creation, browser automation, media processes, and filesystem reach.
Default postureSESI_SAFE_MODE is treated as enabled unless explicitly set to false.
exec / run / spawnBlockedPrevents direct host command and subprocess execution.python / jsBlockedPrevents arbitrary code execution through external runtimes.std/browserBlockedBrowser automation can interact with external pages and the host.std/apiBlockedNative HTTP and WebSocket servers cannot be opened in safe mode.ffmpeg / gif / videoBlockedCommand-line media processing launches native processes.open / open_fileBlockedPrevents a script from launching host applications or viewers.file operationsScopedPermitted only when the resolved path remains inside an allowed directory.normal language logicAllowedValues, functions, loops, transformations, and ordinary computation remain available.Safe mode is a runtime policy, not a claim that every permitted operation is risk-free. Programs still need input validation, sensible timeouts, and careful credential handling.
Sesi resolves a requested path to an absolute location, compares it with the allowed directory set, and rejects escapes before the filesystem operation runs.
try { let data = read_file("../outside_file.txt") show data} catch (err) { show "Blocked:" err}The current working directory is allowed. When a script file is executed, its own directory is also added to the allowed set.
Use -a "./data,./logs" to add explicit directories without disabling the rest of the sandbox.
Relative .. segments and absolute paths are normalized first. A spelling trick cannot bypass the directory comparison.
When a model requests a function through tool_call, the interpreter applies a separate sensitive-tool denylist. This check is independent of normal function lookup.
The runtime rejects both a sensitive builtin named directly and a custom tool that resolves back to one of those builtins.
Enforced even if normal lookup finds the function
execrunspawnpythonjsffmpeggifvideoImportant: this denylist protects automated tool execution. Application-defined tools still need narrow inputs, validation, and minimal side effects.
Sesi can load credentials from the environment and encrypt scripts, strings, or embedded database files. These are separate controls with different scopes.
Use environment variables for provider keys and passwords. SESI_PASSWORD lets the CLI encrypt or decrypt without placing a password in shell history.
sesi -enc private.sesiCLI file encryption and the encrypt() builtin use an AES-256-CBC iv:ciphertext envelope with a random IV.
encrypt("private notes", password)Passing a password to db_open encrypts the JSON database on disk and decrypts it during reads.
db_open("data.db", password)The current AES-CBC envelope provides confidentiality but is not an authenticated-encryption format. Treat encrypted files as sensitive, protect backups and passwords, and use an external secret manager or authenticated storage when tamper detection is required.
The allow form makes imported names visible in source. Safe mode also limits where non-standard modules may be resolved from.
Selective imports show which exported names enter the file. Namespaced imports keep a module behind an alias.
allow "std/db" in with {db_open}The package manager downloads GitHub repositories into sesi_modules. Review dependencies and pin a trusted tag or commit reference.
sesi install owner/repo#refWhat the sandbox does not prove: installation from GitHub is not a signature or provenance guarantee. Safe mode limits runtime authority; it does not certify that dependency logic is correct or benign.
Prefer the narrowest control that makes the program work. Add a directory before disabling the sandbox; add a deadline before trusting a long-running task.
defaultSafe mode onUse for ordinary scripts and unfamiliar code.-a, --allowed-pathsAdds directoriesGrant only the extra filesystem roots a script requires.--timeout <ms>Adds deadlineStop execution after a positive caller-selected duration.-l, localDisables sandboxRequired for raw system commands and unrestricted local filesystem access. Use only with trusted code.SESI_SAFE_MODE=falseDisables safe modePersistent environment override; avoid setting it globally.Security depends on the runtime configuration and the program around it. Review both before moving from a local example to automation or a service.
Escalate only when a reviewed operation specifically requires it.
Grant dedicated data directories instead of broad parent folders.
Bound unattended jobs and model-assisted workflows.
Check paths, arguments, parsed data, and tool parameters before use.
Do not commit provider keys, database passwords, or SESI_PASSWORD.
Inspect third-party modules and pin the Git reference you intend to run.
Expose narrowly scoped custom tools rather than generic system operations.
Catch filesystem and permission errors without leaking credentials into logs.
Sesi reduces default authority and blocks common escape paths. It does not replace operating-system isolation, dependency review, network policy, secret management, backups, or application-level authorization.
Review the implementation and current security-reporting guidance in the project repository.
Project repository