-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduces XSS sink detecting eslint rules
These eslint rules attempt to surface XSS sinks from eslint. This commit is a first pass on #8398 Change-Id: I142bbba9785c4567dfbea1380f5a980560cf7413 Signed-off-by: LukeWood <lukewoodcs@gmail.com>
- Loading branch information
Showing
4 changed files
with
160 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"extends": ["plugin:no-unsanitized/DOM"], | ||
"plugins": ["no-unsanitized", "react"], | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"jsx": true | ||
} | ||
}, | ||
"rules": { | ||
"no-unsanitized/method": [ | ||
"warn", { | ||
"escape": { | ||
"methods": ["DOMPurify.sanitize"] | ||
} | ||
} | ||
], | ||
"no-unsanitized/property": [ | ||
"warn", { | ||
"escape": { | ||
"methods": ["DOMPurify.sanitize"] | ||
} | ||
} | ||
], | ||
"no-eval": "warn", | ||
"no-implied-eval": "warn", | ||
"react/no-danger-with-children": "warn", | ||
"react/no-danger": "warn" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters