The permissions Simien grants to
well-known packages by default, as one file: permissions.json.
The rules behind it are APS 3.
Everything Simien runs (install scripts, s x) runs in an OS sandbox. With
no grants, a program:
- can read everything except secrets (
~/.ssh, cloud credentials, other tools' tokens); - can write only its own package folder (install scripts) or the project
(
s x), plus a temporary folder; - has no network during install, and network for
s x; - doesn't see environment variables that look like credentials.
A package can declare what more it needs in its own package.json
("permissions"); the user approves that. This list is the other way in:
grants Simien approves on everyone's behalf, so it is kept small, and
every entry says why it is there.
"puppeteer": {
"reason": "postinstall downloads Chrome for Testing into the user's cache",
"install": {
"net": ["storage.googleapis.com"],
"write": ["$CACHE/puppeteer"],
"env": ["PUPPETEER_CACHE_DIR"]
}
}installapplies to the package's install scripts,xtos x <package>.dangerouslyUseNode: truegives the package's programs Node's APIs (APS 2): Simien runs them itself, still in the sandbox and under every other rule here. Only packages whose programs are Node programs people need belong here.net: hosts (optionallyhost:port). Until Simien filters by host, anynetgrant turns the network on; the hosts are recorded so the grant narrows automatically when it does.write,read: paths under$PACKAGE,$PROJECT,$CACHEor$TEMP.$HOMEpaths are not accepted here: this list can never grant secrets.env: variable names to keep in the environment.
schema.json is checked in CI.
Open a pull request: people and agents both welcome. Say what the package does that needs the grant, with a link to the code that does it. Keep the grant as narrow as the code needs.
Simien pins a commit of this repository; a change reaches users when the runtime bumps the pin.