eslint-plugin-express-security 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  ## [1.2.3] - 2026-02-08
2
2
 
3
+ ## 1.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#213](https://github.com/ofri-peretz/eslint/pull/213) [`391dbe6`](https://github.com/ofri-peretz/eslint/commit/391dbe6b39f78d549379218567cb959649f8c614) Thanks [@ofri-peretz](https://github.com/ofri-peretz)! - Align every security rule's `meta.docs.cvss` to the CVSS its finding actually
8
+ emits. The emitted machine-readable message sources its `CVSS:x` from
9
+ `CWE_MAPPING` via `formatLLMMessage` → `enrichFromCWE`, but the static
10
+ `meta.docs.cvss` documentation field had drifted on 45 rules across these 7
11
+ plugins — e.g. `no-hardcoded-credentials` documented `9.5` while emitting
12
+ `CVSS:9.8` (the value the published article and SARIF/LLM consumers already
13
+ read).
14
+
15
+ This corrects the **documentation metadata only** — no emitted finding changes.
16
+ Locked by `security-cvss-docs-consistency.lock.test.ts` (cross-plugin: every
17
+ security rule's `meta.docs.cvss` must equal the CVSS it emits), the
18
+ `no-hardcoded-credentials` rule lock (real ESLint `Linter` emission), and a
19
+ devkit `enrichFromCWE` contract test pinning `CWE-798 → 9.8`.
20
+
21
+ Follow-up (not in scope): 50 security rules document a CVSS that never appears
22
+ in any emitted message (their messages carry no CWE), and several rules emit the
23
+ generic CWE score where a rule-specific score may be warranted — both change
24
+ emitted output and are separate decisions.
25
+
3
26
  ## 1.3.0
4
27
 
5
28
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-express-security",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Security-focused ESLint plugin for Express.js applications. Detects insecure cookies, missing security headers, CORS misconfigurations, CSRF vulnerabilities, GraphQL security issues, and more.",
5
5
  "type": "commonjs",
6
6
  "main": "./src/index.js",
package/src/index.js CHANGED
@@ -59,7 +59,7 @@ exports.rules = {
59
59
  exports.plugin = {
60
60
  meta: {
61
61
  name: 'eslint-plugin-express-security',
62
- version: '1.3.0',
62
+ version: '1.3.1',
63
63
  },
64
64
  rules: exports.rules,
65
65
  };
@@ -74,7 +74,7 @@ exports.noCorsCredentialsWildcard = (0, eslint_devkit_1.createRule)({
74
74
  url: 'https://github.com/ofri-peretz/eslint/blob/main/packages/eslint-plugin-express-security/docs/rules/no-cors-credentials-wildcard.md',
75
75
  description: 'Disallow credentials: true with wildcard CORS origin (CVE-2024-25124)',
76
76
  cwe: 'CWE-942',
77
- cvss: 9.5,
77
+ cvss: 7.5,
78
78
  },
79
79
  hasSuggestions: true,
80
80
  messages: {
@@ -45,7 +45,7 @@ exports.noInsecureCookieOptions = (0, eslint_devkit_1.createRule)({
45
45
  url: 'https://github.com/ofri-peretz/eslint/blob/main/packages/eslint-plugin-express-security/docs/rules/no-insecure-cookie-options.md',
46
46
  description: 'Require secure cookie flags (httpOnly, secure, sameSite) in Express.js',
47
47
  cwe: 'CWE-614',
48
- cvss: 7.5,
48
+ cvss: 5.3,
49
49
  },
50
50
  hasSuggestions: true,
51
51
  messages: {
@@ -49,7 +49,7 @@ exports.noMissingCsrfProtection = (0, eslint_devkit_2.createRule)({
49
49
  url: 'https://github.com/ofri-peretz/eslint/blob/main/packages/eslint-plugin-browser-security/docs/rules/no-missing-csrf-protection.md',
50
50
  description: 'Detects missing CSRF token validation in POST/PUT/DELETE requests',
51
51
  cwe: 'CWE-352',
52
- cvss: 7.5,
52
+ cvss: 8.8,
53
53
  },
54
54
  hasSuggestions: true,
55
55
  messages: {
@@ -96,7 +96,7 @@ exports.requireCsrfProtection = (0, eslint_devkit_1.createRule)({
96
96
  url: 'https://github.com/ofri-peretz/eslint/blob/main/packages/eslint-plugin-express-security/docs/rules/require-csrf-protection.md',
97
97
  description: 'Require CSRF protection middleware for state-changing HTTP methods',
98
98
  cwe: 'CWE-352',
99
- cvss: 7.5,
99
+ cvss: 8.8,
100
100
  },
101
101
  hasSuggestions: true,
102
102
  messages: {