Gathering detailed insights and metrics for eslint-plugin-risxss
Gathering detailed insights and metrics for eslint-plugin-risxss
Gathering detailed insights and metrics for eslint-plugin-risxss
Gathering detailed insights and metrics for eslint-plugin-risxss
npm install eslint-plugin-risxss
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
127 Stars
133 Commits
3 Forks
17 Watchers
14 Branches
11 Contributors
Updated on May 20, 2025
Latest Version
2.1.0
Package Id
eslint-plugin-risxss@2.1.0
Unpacked Size
24.04 kB
Size
5.46 kB
File Count
6
NPM Version
6.14.11
Node Version
14.16.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Eradicate all XSS flaws of your React or Vue application using a single ESLint rule.
yarn add eslint-plugin-risxss --dev
Then, you just have to add the tailored rule for your projet (React or Vue) :
To do so, add these lines in your eslint config, for instance if you use .eslintrc.js
config file :
If your project uses React/Javascript :
1module.exports = { 2 env: { 3 browser: true, 4 es6: true 5 }, 6 extends: 'eslint:recommended', 7 parserOptions: { 8 ecmaFeatures: { 9 jsx: true 10 }, 11 ecmaVersion: 2018, 12 sourceType: 'module' 13 }, 14 plugins: ['react', 'risxss'], // <<< add risxss in plugins 15 rules: { 16 'risxss/catch-potential-xss-react': 'error' // <<< add this in rules 17 } 18};
If your project uses React/TypeScript :
1module.exports = { 2 env: { 3 browser: true, 4 es6: true 5 }, 6 parser: '@typescript-eslint/parser', 7 extends: 'eslint:recommended', 8 parserOptions: { 9 project: './tsconfig.json', 10 ecmaFeatures: { 11 jsx: true 12 }, 13 ecmaVersion: 2018, 14 sourceType: 'module' 15 }, 16 plugins: ['risxss'], // <<< add risxss in plugins 17 rules: { 18 'risxss/catch-potential-xss-react': 'error' // <<< add this in rules 19 } 20};
If your project uses Vue.js
1module.exports = { 2 env: { 3 browser: true 4 }, 5 extends: ['plugin:vue/essential'], 6 parserOptions: { 7 parser: 'babel-eslint' 8 }, 9 plugins: ['vue', 'risxss'], // <<< add risxss in plugins 10 rules: { 11 'risxss/catch-potential-xss-vue': 'error' // <<< add this in rules 12 } 13};
Sometimes you have your own rules to prevent XSS and you don't use DOMPurify.sanitize on your inputs. You can add your own function name to the RisXSS whitelist by passing them as options.
:warning: We still recommend using DOMPurify to sanitize your inputs :warning:
1module.exports = { 2 env: { 3 browser: true 4 }, 5 extends: ['plugin:vue/essential'], 6 parserOptions: { 7 parser: 'babel-eslint' 8 }, 9 plugins: ['vue', 'risxss'], // <<< add risxss in plugins 10 rules: { 11 'risxss/catch-potential-xss-vue': ['error', { 12 trustedLibraries: ['xss'] // <<< define your anti XSS function here. 13 }] 14 } 15};
1// in your file 2import { sanitize } from 'xss'; 3 4export const DesktopPostCard = ({ post }) => ( 5 <div dangerouslySetInnerHTML={{ __html: sanitize(post.content) }} /> 6);
MIT
No vulnerabilities found.
Reason
security policy file detected
Details
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 5/21 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
32 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More