Permissions
Simien runs your app, and every package program it starts, with only the access simien.json grants. Nothing is allowed by default.
The app's permissions
{
"security": {
"allow": {
"db": ["postgres"],
"net": ["api.stripe.com"],
"read": ["./content"],
"env": ["STRIPE_KEY"]
},
"deny": { "run": true, "wasm": true }
}
}
| key | grants |
|---|---|
read, write |
files and folders |
net |
hosts the app may reach |
env |
environment variables it may read |
run |
programs it may start |
db |
its database (simien:db) |
wasm |
WebAssembly |
dynamic |
code built from strings (eval, new Function) |
dangerouslyUseNode |
Node's own APIs (below) |
A misspelled key is an error that names the key you most likely meant. When something is refused, the message says what was asked for and how to grant it.
Packages and Node's APIs
Simien implements web standards. A package that needs Node's own APIs (node:fs, node:child_process, …), such as a build tool, runs only when it's granted them:
{ "packagePermissions": { "some-tool": { "dangerouslyUseNode": true } } }
Some packages are granted this by Simien itself because the framework needs them (Vite, and kebele for the local stack); the list is public, at simienapp/permissions.
The sandbox
A package program (simien x, a package.json script, Vite in simien dev) runs in a sandbox:
- it reads your files, but not your secrets: SSH keys, cloud and registry credentials, and the like are hidden;
- it writes only the project and its own temporary folder;
- it sees no credentials in its environment;
- the network is on (it is off for install scripts).
When a program fails, Simien says what its sandbox allowed and how to grant more.