Loading ...
Sorry, an error occurred while loading the content.

[jslint] Re: ANN: JSLint Reporter (Node.js wrapper)

Expand Messages
  • Douglas Crockford
    ... A digital signature does not make things less worse. It is false security.
    Message 1 of 11 , Feb 2, 2011
    • 0 Attachment
      --- In jslint_com@yahoogroups.com, mathew <meta404@...> wrote:
      > Seriously, though, you could provide a digital signature which could be
      > checked.

      A digital signature does not make things less worse.
      It is false security.
    • Frederik Dohr
      ... I agree that this would be the ideal solution - and looking at your LintServer*, it appears you ve already solved this issue (I must have misunderstood you
      Message 2 of 11 , Feb 2, 2011
      • 0 Attachment
        > Node.js has a built-in feature for running scripts “sandboxed” [...]
        > The Node.js feature I mentioned is in the VM module. [...] If you use
        > those features (and use them correctly, which is not trivial), it
        > becomes completely safe to download and run any script

        I agree that this would be the ideal solution - and looking at your
        LintServer*, it appears you've already solved this issue (I must have
        misunderstood you before):
        vm.runInNewContext(fs.readFileSync('./fulljslint.js', 'utf8'),
        sandbox, 'fulljslint.js');

        This appears to work just fine:
        https://gist.github.com/809174
        (untrusted.js throws exceptions since it doesn't have access to require)

        It should be rather straightforward to add this to JSLint Reporter then.


        -- F.


        * https://github.com/jkruse/LintServer/blob/master/lintserver.js
      Your message has been successfully submitted and would be delivered to recipients shortly.