signal-desktop/ts/util/lint/rules.json
2023-01-02 13:34:41 -08:00

87 lines
2.3 KiB
JSON

[
{
"name": "eval",
"expression": "\\beval\\(",
"reason": "Arbitrary code execution"
},
{
"name": "DOM-innerHTML",
"expression": "\\binnerHTML\\b",
"reason": "Potential XSS"
},
{
"name": "DOM-outerHTML",
"expression": "\\bouterHTML\\b",
"reason": "Potential XSS"
},
{
"name": "DOM-document.write(",
"expression": "\\bdocument.write(ln)?\\(",
"reason": "Potential XSS"
},
{
"name": "React-ref",
"expression": "\\bref(\\s)*=\\b",
"reason": "Potential XSS",
"excludedModules": [
"node_modules/react-dom",
"node_modules/tslint-microsoft-contrib",
"node_modules/react-error-overlay"
]
},
{
"name": "React-createRef",
"expression": "\\bcreateRef\\(",
"reason": "Potential XSS",
"excludedModules": [
"node_modules/react/",
"node_modules/react-dom",
"node_modules/tslint-microsoft-contrib",
"node_modules/react-error-overlay"
]
},
{
"name": "React-useRef",
"expression": "\\buseRef(\\(|<)",
"reason": "Potential XSS",
"excludedModules": ["node_modules/react/", "node_modules/react-dom"]
},
{
"name": "React-findDOMNode",
"expression": "\\bfindDOMNode\\(",
"reason": "Potential XSS",
"excludedModules": [
"node_modules/react-dom",
"node_modules/tslint-microsoft-contrib",
"node_modules/react-error-overlay"
]
},
{
"name": "React-dangerouslySetInnerHTML",
"expression": "\\bdangerouslySetInnerHTML\\b",
"reason": "Potential XSS",
"excludedModules": [
"node_modules/react-dom",
"node_modules/tslint-microsoft-contrib",
"node_modules/react-error-overlay"
]
},
{
"name": "fbjs-createNodesFromMarkup",
"expression": "\\bcreateNodesFromMarkup\\b",
"reason": "Potential XSS, pipes input to innerHTML",
"excludedModules": ["node_modules/react-dom", "node_modules/fbjs"]
},
{
"name": "thenify-multiArgs",
"expression": "\\bmultiArgs\\b",
"reason": "Potential arbitrary code execution, piped to eval",
"excludedModules": ["node_modules/thenify"]
},
{
"name": "bluebird-toFastProperties",
"expression": "\\btoFastProperties\\b",
"reason": "Whatever is provided is sent straight to eval()",
"excludedModules": []
}
]