-
-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
introduce eslint for DOM XSS linting #620
Conversation
Can't this be configured through |
For info have just raised #621 re removing the use of innerHtml |
xo seems to use eslint underneath, so theoretically yes. I haven't ever used or looked at xo before though. |
OK, |
dd84429
to
63d2bea
Compare
OK. Waiting for #621 then :-) |
63d2bea
to
da5c8fa
Compare
Can we whitelist the remaining 2 uses of innerHtml so that we can merge this PR? |
da5c8fa
to
dc71e37
Compare
imho it'd be easier to add DOMPurify than to whitelist. Especially since those whitelists are often forgotten and might introduce vulnerabilities long-term (as we've seen with others whitelisting existing and secure uses of innerHTML) |
dc71e37
to
8bcfa3a
Compare
Fine for display.js but I dont want to apply DOMPurify to the alertify.js library - no idea what impact that could have. |
it seems alertify.js is already opted out of the linter. probably because it's minified? |
And because its an external lib :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mozfreddyb
For this to be immediately useful, one needs to:
in package.json, add "script" to run eslint on all relevant source filesExisting violations: