Comparing version 0.0.1 to 0.1.2
{ | ||
"name": "ses", | ||
"version": "0.0.1", | ||
"dependencies": { | ||
"optimist": "~0.3.5" | ||
"version": "0.1.2", | ||
"description": "Secure ECMAScript", | ||
"main": "src/index.js", | ||
"scripts": { | ||
"test": "node scripts/build-intermediate.js && tape -r esm test/**/*.js", | ||
"just-test": "tape -r esm test/**/*.js", | ||
"build-intermediate": "node scripts/build-intermediate.js", | ||
"build": "node scripts/build-intermediate.js && rollup --format=iife --output.name=SES --sourcemap --file=dist/ses-shim.js -- src/index.js" | ||
}, | ||
"preferGlobal": true, | ||
"bin": { | ||
"ses": "bin/ses" | ||
} | ||
"devDependencies": { | ||
"esm": "^3.0.37", | ||
"rollup": "^0.63.4", | ||
"rollup-plugin-node-resolve": "^3.3.0", | ||
"tape": "^4.9.0" | ||
}, | ||
"dependencies": {}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Agoric/SES.git" | ||
}, | ||
"author": "Agoric", | ||
"license": "Apache-2.0", | ||
"bugs": { | ||
"url": "https://github.com/Agoric/SES/issues" | ||
}, | ||
"homepage": "https://github.com/Agoric/SES#readme" | ||
} |
@@ -0,68 +1,57 @@ | ||
# Secure EcmaScript (SES) | ||
# Secure EcmaScript | ||
[![Build Status][travis-svg]][travis-url] | ||
[![dependency status][deps-svg]][deps-url] | ||
[![dev dependency status][dev-deps-svg]][dev-deps-url] | ||
[![License][license-image]][license-url] | ||
**:warning: This is not an official, working packaging of Google | ||
Caja’s SES. This is a project attempting to bring SES to Node.js but | ||
will probably not be viable until Node.js 0.12 at least.** | ||
Secure EcmaScript (SES) is a frozen environment for running EcmaScript | ||
(Javascript) 'strict' mode programs with no ambient authority in their global | ||
scope, and with the addition of a safe two-argument evaluator | ||
(`SES.confine(code, endowments)`). By freezing everything accessible from the | ||
global scope, it removes programs abilities to interfere with each other, and | ||
thus enables isolated evaluation of arbitrary code. | ||
SES is a tool that allows mutually suspicious programs to share a single | ||
EcmaScript 5 compliant JavaScript context without interfering with each | ||
other. It does this by freezing everything that is accessible in global | ||
scope, removing interfaces that would allow programs to interfe with | ||
each-other, and providing the ability to evaluate arbitrary code in | ||
isolation. | ||
It runs atop an ES6-compliant platform, enabling safe interaction of | ||
mutually-suspicious code, using object-capability -style programming. | ||
SES is a part of the Google Caja project. For JavaScript contexts that | ||
do not support EcmaScript 5, Caja depends on compiling JavaScript to a | ||
JavaScript subset with static verification and run-time assertions to | ||
maintain isolation. With EcmaScript 5, it is possible to run isolated | ||
code without a compilation step or run-time checks. | ||
See https://github.com/Agoric/Jessie to see how SES fits into the various | ||
flavors of confined EcmaScript execution. And visit | ||
https://cdn.rawgit.com/Agoric/SES/0.1.0/demo/ for a demo. | ||
Initialize SES by executing these scripts in order. | ||
Derived from the Caja project, https://github.com/google/caja/wiki/SES . | ||
- `logger.js` | ||
- `repairES5.js` | ||
- `WeakMap.js` | ||
- `debug.js` | ||
- `StringMap.js` | ||
- `whitelist.js` | ||
- `atLeastFreeVarNames.js` | ||
- `startSES.js` | ||
- `ejectorsGuardsTrademarks.js` | ||
- `hookupSESPlus.js` | ||
Still under development: do not use for production systems yet, there are | ||
known security holes that need to be closed. | ||
This is an example of initializing SES in a web page. | ||
Incorporates (as a git submodule) the Realms shim from | ||
https://github.com/tc39/proposal-realms . | ||
```html | ||
<script src="logger.js"></script> | ||
<script src="repairES5.js"></script> | ||
<script src="WeakMap.js"></script> | ||
<script src="debug.js"></script> | ||
<script src="StringMap.js"></script> | ||
<script src="whitelist.js"></script> | ||
<script src="atLeastFreeVarNames.js"></script> | ||
<script src="startSES.js"></script> | ||
<script src="ejectorsGuardsTrademarks.js"></script> | ||
<script src="hookupSESPlus.js"></script> | ||
``` | ||
### Bug Disclosure | ||
This is an example of initializing SES in Node. | ||
Despite this not being ready for production use, we'd like to get into the | ||
practice of responsible disclosure. If you find a security-sensitive bug that | ||
should not be revealed publically until a fix is available, please send email | ||
to `security` at (@) `agoric.com`. To encrypt, please use my (@warner) | ||
personal GPG key [A476E2E6 11880C98 5B3C3A39 0386E81B | ||
11CAA07A](http://www.lothar.com/warner-gpg.html) . Keybase users can also | ||
send messages to `@agoric_security`, or share code and other log files via | ||
the Keybase encrypted file system | ||
(`/keybase/private/agoric_security,$YOURNAME`). | ||
```javascript | ||
var FS = require("fs"); | ||
var VM = require("vm"); | ||
var source = FS.readFileSync("initSes.js"); | ||
var script = new VM.Script(source); | ||
script.runInThisContext(); | ||
var f = cajaVM.compileExpr("console.log('hi')"); | ||
f({console: console}); | ||
``` | ||
For non-security bugs, use the | ||
[regular Issues page](https://github.com/Agoric/SES/issues). | ||
Included is a binary runner under the name `ses` | ||
```bash | ||
ses example/code.js | ||
``` | ||
<!-- [![Coverage Status][coveralls-svg]][coveralls-url] --> | ||
[travis-svg]: https://travis-ci.com/Agoric/SES.svg?branch=master | ||
[travis-url]: https://travis-ci.com/Agoric/SES | ||
[coveralls-svg]: https://coveralls.io/repos/github/Agoric/SES/badge.svg | ||
[coveralls-url]: https://coveralls.io/github/Agoric/SES | ||
[deps-svg]: https://david-dm.org/Agoric/SES.svg | ||
[deps-url]: https://david-dm.org/Agoric/SES | ||
[dev-deps-svg]: https://david-dm.org/Agoric/SES/dev-status.svg | ||
[dev-deps-url]: https://david-dm.org/Agoric/SES?type=dev | ||
[license-image]: https://img.shields.io/badge/License-Apache%202.0-blue.svg | ||
[license-url]: shim/LICENSE |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
982708
0
126
0
4
10294
58
9
26
- Removedoptimist@~0.3.5
- Removedoptimist@0.3.7(transitive)
- Removedwordwrap@0.0.3(transitive)