Skip to content

Security Permissions

Inspired by Deno, Orbita is secure by default: no script can read files, write to disk, access the network, read environment variables, or spawn subprocesses unless explicitly allowed.

Available Flags

Flag Capability Granted Granular Example
--allow-read Read files and directories --allow-read=./data,ob.toml
--allow-write Write, create, and remove files --allow-write=./dist
--allow-net HTTP requests (fetch) and servers (serve) --allow-net=api.github.com,127.0.0.1:3000
--allow-env Read environment variables --allow-env=PORT,APP_ENV
--allow-run Execute external processes (ob:process.exec) --allow-run=git,ls
-A, --allow-all Grant all permissions above ob run -A src/main.tyl

Use = for granular allow-lists

To scope a permission to specific paths, hosts, or variables, pass values with =:

ob run --allow-read=./config --allow-net=api.github.com src/app.tyl
Without =, the flag grants unrestricted access for that capability (ob run --allow-read src/app.tyl).

Default Behavior (Permission Denied)

ob eval 'print(require("ob:fs").read_file("ob.toml"))'

If --allow-read is omitted, Orbita blocks the call and tells you the exact flag needed to allow it.

Always-Safe Operations

  • ob:sqlite.open(":memory:") — pure in-memory databases require no filesystem permissions.
  • ob:embed.read(...) in compiled binaries — reads only assets bundled inside the executable itself.
  • ob:json, ob:html, ob:crypto, ob:path — pure operations with no OS side effects.