All Articles
Security Coding Guideline
Use simple data binding in JSX.
Only use
dangerouslySetInnerHTML
in combination with sanitization:
https://www.npmjs.com/package/dompurify
Do not rely on parsers for security. For instance:
https://www.npmjs.com/package/url-parse
https://www.npmjs.com/package/react-html-parser
Do not put data in the DOM directly:
domElement.innerHTML = 'Malicious code'
Use
yarn audit/npm audit
to scan the node module dependencies.
Keep node modules up to date.