|
| 1 | +# Security Model |
| 2 | + |
| 3 | +The runtime treats several categories of input as trusted by design and does not sandbox them further. If you |
| 4 | +load a config, manifest, or exported policy you did not author or fully review, you are running that content |
| 5 | +with the same privileges as the `physicalai` process itself. The sections below describe each trust boundary. |
| 6 | + |
| 7 | +## Configs and manifests can execute arbitrary code |
| 8 | + |
| 9 | +YAML/JSON configs passed via `--config` flag and an exported policy's `manifest.json` both use `class_path` values to |
| 10 | +dynamically import and construct Python objects - robots, cameras, preprocessors, postprocessors, action |
| 11 | +sources, callbacks. Currently, nothing restricts which class a `class_path` may name. |
| 12 | + |
| 13 | +Only load configs, exported policies, and manifests from sources you trust. See also the `class_path` note in |
| 14 | +[Config Schema Reference](../reference/config-schema.md#security). |
| 15 | + |
| 16 | +## Use only trusted, reviewed policies |
| 17 | + |
| 18 | +An exported policy package (`manifest.json` plus artifacts) runs with the same privileges as the |
| 19 | +`physicalai` process. |
| 20 | + |
| 21 | +**Loading via `InferenceModel.from_pretrained()`:** pin `revision` to the commit SHA of a version you have |
| 22 | +reviewed and trust, rather than a mutable branch or tag, so the content you reviewed is exactly what gets |
| 23 | +loaded on every run. |
| 24 | + |
| 25 | +**Loading via `export_dir`:** `physicalai run` and direct `InferenceModel(export_dir=...)` construction both |
| 26 | +load whatever package is already in that local directory. Only place a reviewed, trusted export there. |
| 27 | +Treat populating that directory (downloading, copying, extracting) as the point where you decide to trust |
| 28 | +its contents. |
| 29 | + |
| 30 | +## Remote robot sharing has no built-in security controls |
| 31 | + |
| 32 | +The `SharedRobot` network transport (used to share one robot connection across processes) has no |
| 33 | +authentication, access control or encryption of its own. |
| 34 | + |
| 35 | +If you enable `allow_remote=True` (`--allow_remote` on `physicalai robot serve`/`discover`), use it only on |
| 36 | +an isolated, firewalled robot-cell network (VLAN/firewall) or with Zenoh ACL/TLS configured yourself — the |
| 37 | +same requirement documented in [CLI Reference](../reference/cli.md#physicalai-robot-serve). Without one of |
| 38 | +those, anyone who can reach that network can observe robot state and, if nothing else restricts it, send |
| 39 | +actions to the robot. |
| 40 | + |
| 41 | +## Runtime callbacks run with full trust |
| 42 | + |
| 43 | +Callbacks registered with `RobotRuntime` (see |
| 44 | +[Add Runtime Callbacks](../how-to/runtime/add-runtime-callbacks.md)) can inspect and modify the |
| 45 | +action sent to the robot on every control tick. Currently, the runtime does not validate a callback's output before |
| 46 | +sending it to hardware. |
| 47 | + |
| 48 | +Only register callbacks you wrote or have reviewed, especially any callback that can transform the outgoing |
| 49 | +action. |
| 50 | + |
| 51 | +## CLI subcommands load from the active Python environment |
| 52 | + |
| 53 | +`physicalai <subcommand>` discovers third-party subcommands via Python entry points registered by packages |
| 54 | +installed in the current environment. There is no allow-list of which packages may register a subcommand. |
| 55 | + |
| 56 | +Treat installing a package into the same environment as granting it the ability to run as a `physicalai` |
| 57 | +subcommand and apply the same security review you would to any other dependency. |
0 commit comments