mozilla / scanjs

[DEPRECATED] Static analysis tool for javascript code.
Other
429 stars 39 forks source link

Added parser exception handlers #171

Closed dpnishant closed 9 years ago

dpnishant commented 9 years ago

Added exception handlers while parsing/scanning to skip files with syntax errors while scanning .js files in bulk.

mozfreddyb commented 9 years ago

Sweet! How would this look like in the Web UI, @dpnishant?

mozfreddyb commented 9 years ago

(I am concerned that if I merge this pull request, that it might be removed in @zombie's upcoming big merge & split of all things in #158 )

dpnishant commented 9 years ago

Hi @mozfreddyb here is another change that I have done for myself (https://github.com/dpnishant/raptor/blob/master/backend/scanjs/scanner.js#L31-L49) i.e. skipping known JS library files while scanning.

mozfreddyb commented 9 years ago

That's a nice idea! If you are a security researcher, I totally get that you want to skip well-known files.

If you are a code reviewer that decides whether to publish on Firefox Marketplace or addons.mozilla.org, you don't want to give the code authors a backdoor to avoid all checks though.

Maybe this should be a commandline (and webui) option). What do you think?

dpnishant commented 9 years ago

Yes, agreed. We can make it optional via a command-line switch. If you are OK, I can send the combined PR in sometime.

mozfreddyb commented 9 years ago

Yeah, please do! (but not in this one :))