Gathering detailed insights and metrics for @rushstack/eslint-plugin-security
Gathering detailed insights and metrics for @rushstack/eslint-plugin-security
Gathering detailed insights and metrics for @rushstack/eslint-plugin-security
Gathering detailed insights and metrics for @rushstack/eslint-plugin-security
Monorepo for tools developed by the Rush Stack community
npm install @rushstack/eslint-plugin-security
Typescript
Module System
Node Version
NPM Version
TypeScript (95.75%)
JavaScript (3.94%)
SCSS (0.15%)
Shell (0.05%)
HTML (0.04%)
CSS (0.03%)
Sass (0.03%)
Batchfile (0.01%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
NOASSERTION License
6,232 Stars
22,499 Commits
636 Forks
53 Watchers
103 Branches
286 Contributors
Updated on Jul 15, 2025
Latest Version
0.11.0
Package Id
@rushstack/eslint-plugin-security@0.11.0
Unpacked Size
26.98 kB
Size
7.11 kB
File Count
16
NPM Version
10.8.2
Node Version
20.19.2
Published on
Jun 26, 2025
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
This plugin implements a collection of security rules for ESLint.
Our ambition is to eventually provide a comprehensive set of recommended security rules for:
If you would like to request or contribute a new security rule, you are encouraged to create a GitHub issue in the Rush Stack monorepo where this project is developed. Thanks!
@rushstack/security/no-unsafe-regexp
Require regular expressions to be constructed from string constants rather than dynamically building strings at runtime.
Regular expressions should be constructed from string constants. Dynamically building strings at runtime may introduce security vulnerabilities, performance concerns, and bugs involving incorrect escaping of special characters.
The following patterns are considered problems when @rushstack/security/no-unsafe-regexp
is enabled:
1function parseRestResponse(request: ICatalogRequest, 2 items: ICatalogItem[]): ICatalogItem[] { 3 4 // Security vulnerability: A malicious user could invoke the REST service using a 5 // "searchPattern" with a complex RegExp that causes a denial of service. 6 const regexp: RegExp = new RegExp(request.searchPattern); 7 return items.filter(item => regexp.test(item.title)); 8}
1function hasExtension(filePath: string, extension: string): boolean { 2 // Escaping mistake: If the "extension" string contains a special character such as ".", 3 // it will be interpreted as a regular expression operator. Correctly escaping an arbitrary 4 // string is a nontrivial problem due to RegExp implementation differences, as well as contextual 5 // issues (since which characters are special changes inside RegExp nesting constructs). 6 // In most cases, this problem is better solved without regular expressions. 7 const regexp: RegExp = new RegExp(`\.${extension}$`); 8 return regexp.test(filePath); 9}
The following patterns are NOT considered problems:
1function isInteger(s: string): boolean { 2 return /[0-9]+/.test(s); 3}
1function isInteger(s: string): boolean { 2 return new RegExp('[0-9]+').test(s); 3}
@rushstack/eslint-plugin-security
is part of the Rush Stack family of projects.
No vulnerabilities found.
Reason
30 commit(s) and 10 issue activity found in the last 90 days -- score normalized to 10
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
Found 13/30 approved changesets -- score normalized to 4
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
37 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