17
|
1 About Spidermonkey Playground
|
|
2 -----------------------------
|
|
3
|
|
4 This is a simple C/C++ command-line program that embeds SpiderMonkey
|
|
5 and exposes a number of the JSAPI's functions [1] to a Trusted Code
|
|
6 Base written in JS. The goal here is to provide developers with an
|
|
7 easy way to explore and experiment with JavaScript security models in
|
|
8 a high-level language before actually implementing one in C/C++.
|
|
9
|
|
10 The playground currently includes a highly experimental implementation
|
|
11 of SecurableModules [2] that allows for the exportation of
|
|
12 functionality to a module via require(). It also includes a "membrane"
|
|
13 or "wrapper" [3] implementation that allows secure membranes to be
|
|
14 implemented entirely in JavaScript. It's really just an exposing of
|
|
15 SpiderMonkey's JSClass/JSExtendedClass [4] to JavaScript, but it
|
|
16 should allow for pretty flexible enforcement of any kind of desired
|
|
17 security characteristic, from an Object-Capability Model like that of
|
|
18 Google Caja [5] to a read-only representation of a DOM structure.
|
|
19
|
|
20 [1] https://developer.mozilla.org/en/SpiderMonkey
|
|
21 [2] https://wiki.mozilla.org/ServerJS/Modules/SecurableModules
|
|
22 [3] https://developer.mozilla.org/en/XPConnect_wrappers
|
|
23 [4] https://developer.mozilla.org/en/SpiderMonkey/JSAPI_Reference/JSClass
|
|
24 [5] http://code.google.com/p/google-caja/
|