Notes /
SandboxIt would be helpful to run Composite Accessors in a sandbox to prevent malicious code from being executed. AttacksSee Security -> Attacks. HostsBelow is a list of the hosts and the status of their sand boxes: Browser HostStatus:
The Browser Host already runs in a sandbox, though there are plenty of JavaScript attacks like Cross-site request forgery etc. Part of the Life Cycle Management effort is to get Composite Accessor life cycle management to work in the Browser Host.
Cape Code Host & Nashorn HostStatus:
The Cape Code Host uses Java, and Java can be run in a sandbox that can be configured to only allow access to certain resources. Cape Code runs each Composite Accessor in its own JavaScript engine. This makes it easier to kill a non-cooperative composite accessor, in principle, and provides more rigorous isolation between accessors. But it may be a resource hog.
Running Nashorn from jar files represents a special challenge because we need to be able to look in the classpath for resources, yet we want to be careful about exposing other data. For example, if a user can invoke Class.getResource(), and $PTII is in the path, then they could read any file in $PTII. The Nashorn host restricts access to certain prefixes, but this should be reviewed. Duktape HostStatus:
The Duktape Host is written in C and supports a subset of JavaScript. The Node module system is not used, though Node HostStatus:
The Node Host does have a vm module: "APIs for compiling and running code within V8 Virtual Machine contexts." One possibility would be to run the Node process in a Sandboxing JavaScriptInfinite Loop
See Also |