The problem #
A downloaded script starts with your whole environment: every token, your network, your home directory. You learn what it used afterwards, if at all.
The fix #
A step declares what it needs. You grant it, per step, in the pipeline. A runner that cannot enforce a grant refuses to run the step.
yaml
nodes:
enrich:
pipe: ./pipes/enrich
inputs:
records: {from: inputs.records}
grants:
network: ["api.example.com:443"]
remoteData: ["api.example.com"]The precise terms #
- Permission kinds:
network,filesystem,subprocess,environment,secretsandremoteData(record data leaves the machine). - Steps that run inside the runner (built-ins, Starlark) need no grants. An
executableneedssubprocess; anhttppipe needsnetworkandremoteDatafor its host. - A subprocess gets a minimal environment plus what was granted, never your ambient secrets. Secrets are references delivered out of band, never parameters.
- A nested pipeline cannot give its children more than it was given.
--trustedgrants everything a pipe declares, and says plainly that this is not a sandbox. A subprocess alone does not isolate untrusted code.