@sun-asterisk/sunlint 1.3.1 → 1.3.3

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.
Files changed (120) hide show
  1. package/CHANGELOG.md +85 -0
  2. package/CONTRIBUTING.md +210 -1691
  3. package/README.md +5 -3
  4. package/config/rule-analysis-strategies.js +17 -1
  5. package/config/rules/enhanced-rules-registry.json +506 -1161
  6. package/config/rules/rules-registry-generated.json +1 -1
  7. package/core/analysis-orchestrator.js +167 -42
  8. package/core/auto-performance-manager.js +243 -0
  9. package/core/cli-action-handler.js +9 -1
  10. package/core/cli-program.js +19 -5
  11. package/core/constants/defaults.js +56 -0
  12. package/core/enhanced-rules-registry.js +2 -1
  13. package/core/performance-optimizer.js +271 -0
  14. package/core/semantic-engine.js +15 -3
  15. package/core/semantic-rule-base.js +4 -2
  16. package/docs/FILE_LIMITS_COMPLETION_REPORT.md +151 -0
  17. package/docs/FILE_LIMITS_EXPLANATION.md +190 -0
  18. package/docs/PERFORMANCE.md +311 -0
  19. package/docs/PERFORMANCE_MIGRATION_GUIDE.md +368 -0
  20. package/docs/PERFORMANCE_OPTIMIZATION_PLAN.md +255 -0
  21. package/docs/QUICK_FILE_LIMITS.md +64 -0
  22. package/docs/SIMPLIFIED_USAGE_GUIDE.md +208 -0
  23. package/engines/heuristic-engine.js +247 -9
  24. package/integrations/eslint/plugin/rules/common/c003-no-vague-abbreviations.js +59 -1
  25. package/integrations/eslint/plugin/rules/common/c006-function-name-verb-noun.js +26 -1
  26. package/integrations/eslint/plugin/rules/common/c030-use-custom-error-classes.js +54 -19
  27. package/origin-rules/common-en.md +11 -7
  28. package/package.json +2 -1
  29. package/rules/common/C002_no_duplicate_code/analyzer.js +334 -36
  30. package/rules/common/C003_no_vague_abbreviations/analyzer.js +220 -35
  31. package/rules/common/C006_function_naming/analyzer.js +29 -3
  32. package/rules/common/C010_limit_block_nesting/analyzer.js +181 -337
  33. package/rules/common/C010_limit_block_nesting/config.json +64 -0
  34. package/rules/common/C010_limit_block_nesting/regex-based-analyzer.js +379 -0
  35. package/rules/common/C010_limit_block_nesting/symbol-based-analyzer.js +231 -0
  36. package/rules/common/C013_no_dead_code/analyzer.js +75 -177
  37. package/rules/common/C013_no_dead_code/config.json +61 -0
  38. package/rules/common/C013_no_dead_code/regex-based-analyzer.js +345 -0
  39. package/rules/common/C013_no_dead_code/symbol-based-analyzer.js +640 -0
  40. package/rules/common/C014_dependency_injection/analyzer.js +48 -313
  41. package/rules/common/C014_dependency_injection/config.json +26 -0
  42. package/rules/common/C014_dependency_injection/symbol-based-analyzer.js +751 -0
  43. package/rules/common/C018_no_throw_generic_error/analyzer.js +232 -0
  44. package/rules/common/C018_no_throw_generic_error/config.json +50 -0
  45. package/rules/common/C018_no_throw_generic_error/regex-based-analyzer.js +387 -0
  46. package/rules/common/C018_no_throw_generic_error/symbol-based-analyzer.js +314 -0
  47. package/rules/common/C019_log_level_usage/analyzer.js +110 -317
  48. package/rules/common/C019_log_level_usage/pattern-analyzer.js +88 -0
  49. package/rules/common/C019_log_level_usage/system-log-analyzer.js +1267 -0
  50. package/rules/common/C023_no_duplicate_variable/analyzer.js +180 -0
  51. package/rules/common/C023_no_duplicate_variable/config.json +50 -0
  52. package/rules/common/C023_no_duplicate_variable/symbol-based-analyzer.js +158 -0
  53. package/rules/common/C024_no_scatter_hardcoded_constants/analyzer.js +180 -0
  54. package/rules/common/C024_no_scatter_hardcoded_constants/config.json +50 -0
  55. package/rules/common/C024_no_scatter_hardcoded_constants/symbol-based-analyzer.js +181 -0
  56. package/rules/common/C030_use_custom_error_classes/analyzer.js +200 -0
  57. package/rules/common/C035_error_logging_context/analyzer.js +3 -1
  58. package/rules/common/C048_no_bypass_architectural_layers/analyzer.js +180 -0
  59. package/rules/common/C048_no_bypass_architectural_layers/config.json +50 -0
  60. package/rules/common/C048_no_bypass_architectural_layers/symbol-based-analyzer.js +235 -0
  61. package/rules/common/C052_parsing_or_data_transformation/analyzer.js +180 -0
  62. package/rules/common/C052_parsing_or_data_transformation/config.json +50 -0
  63. package/rules/common/C052_parsing_or_data_transformation/symbol-based-analyzer.js +132 -0
  64. package/rules/index.js +7 -1
  65. package/rules/security/S009_no_insecure_encryption/README.md +158 -0
  66. package/rules/security/S009_no_insecure_encryption/analyzer.js +319 -0
  67. package/rules/security/S009_no_insecure_encryption/config.json +55 -0
  68. package/rules/security/S010_no_insecure_encryption/README.md +224 -0
  69. package/rules/security/S010_no_insecure_encryption/analyzer.js +493 -0
  70. package/rules/security/S010_no_insecure_encryption/config.json +48 -0
  71. package/rules/security/S016_no_sensitive_querystring/STRATEGY.md +149 -0
  72. package/rules/security/S016_no_sensitive_querystring/analyzer.js +276 -0
  73. package/rules/security/S016_no_sensitive_querystring/config.json +127 -0
  74. package/rules/security/S016_no_sensitive_querystring/regex-based-analyzer.js +258 -0
  75. package/rules/security/S016_no_sensitive_querystring/symbol-based-analyzer.js +495 -0
  76. package/rules/security/S017_use_parameterized_queries/README.md +128 -0
  77. package/rules/security/S017_use_parameterized_queries/analyzer.js +286 -0
  78. package/rules/security/S017_use_parameterized_queries/config.json +109 -0
  79. package/rules/security/S017_use_parameterized_queries/regex-based-analyzer.js +541 -0
  80. package/rules/security/S017_use_parameterized_queries/symbol-based-analyzer.js +777 -0
  81. package/rules/security/S031_secure_session_cookies/README.md +127 -0
  82. package/rules/security/S031_secure_session_cookies/analyzer.js +245 -0
  83. package/rules/security/S031_secure_session_cookies/config.json +86 -0
  84. package/rules/security/S031_secure_session_cookies/regex-based-analyzer.js +196 -0
  85. package/rules/security/S031_secure_session_cookies/symbol-based-analyzer.js +1084 -0
  86. package/rules/security/S032_httponly_session_cookies/FRAMEWORK_SUPPORT.md +209 -0
  87. package/rules/security/S032_httponly_session_cookies/README.md +184 -0
  88. package/rules/security/S032_httponly_session_cookies/analyzer.js +282 -0
  89. package/rules/security/S032_httponly_session_cookies/config.json +96 -0
  90. package/rules/security/S032_httponly_session_cookies/regex-based-analyzer.js +715 -0
  91. package/rules/security/S032_httponly_session_cookies/symbol-based-analyzer.js +1348 -0
  92. package/rules/security/S033_samesite_session_cookies/README.md +227 -0
  93. package/rules/security/S033_samesite_session_cookies/analyzer.js +242 -0
  94. package/rules/security/S033_samesite_session_cookies/config.json +87 -0
  95. package/rules/security/S033_samesite_session_cookies/regex-based-analyzer.js +703 -0
  96. package/rules/security/S033_samesite_session_cookies/symbol-based-analyzer.js +732 -0
  97. package/rules/security/S034_host_prefix_session_cookies/README.md +204 -0
  98. package/rules/security/S034_host_prefix_session_cookies/analyzer.js +290 -0
  99. package/rules/security/S034_host_prefix_session_cookies/config.json +62 -0
  100. package/rules/security/S034_host_prefix_session_cookies/regex-based-analyzer.js +478 -0
  101. package/rules/security/S034_host_prefix_session_cookies/symbol-based-analyzer.js +277 -0
  102. package/rules/security/S035_path_session_cookies/README.md +257 -0
  103. package/rules/security/S035_path_session_cookies/analyzer.js +316 -0
  104. package/rules/security/S035_path_session_cookies/config.json +99 -0
  105. package/rules/security/S035_path_session_cookies/regex-based-analyzer.js +724 -0
  106. package/rules/security/S035_path_session_cookies/symbol-based-analyzer.js +373 -0
  107. package/rules/security/S048_no_current_password_in_reset/README.md +222 -0
  108. package/rules/security/S048_no_current_password_in_reset/analyzer.js +366 -0
  109. package/rules/security/S048_no_current_password_in_reset/config.json +48 -0
  110. package/rules/security/S055_content_type_validation/README.md +176 -0
  111. package/rules/security/S055_content_type_validation/analyzer.js +312 -0
  112. package/rules/security/S055_content_type_validation/config.json +48 -0
  113. package/rules/utils/rule-helpers.js +140 -1
  114. package/scripts/batch-processing-demo.js +334 -0
  115. package/scripts/consolidate-config.js +116 -0
  116. package/scripts/performance-test.js +541 -0
  117. package/scripts/quick-performance-test.js +108 -0
  118. package/config/rules/S027-categories.json +0 -122
  119. package/config/rules/rules-registry.json +0 -777
  120. package/rules/common/C006_function_naming/smart-analyzer.js +0 -503
@@ -5,26 +5,14 @@
5
5
  "description": "Each function should do one thing only",
6
6
  "category": "design",
7
7
  "severity": "warning",
8
- "languages": [
9
- "typescript",
10
- "javascript",
11
- "dart",
12
- "kotlin"
13
- ],
8
+ "languages": ["typescript", "javascript", "dart", "kotlin"],
14
9
  "analyzer": "./rules/common/C005_single_responsibility/analyzer.js",
15
10
  "config": "./rules/common/C005_single_responsibility/config.json",
16
11
  "version": "1.0.0",
17
12
  "status": "stable",
18
- "tags": [
19
- "design",
20
- "responsibility",
21
- "maintainability"
22
- ],
13
+ "tags": ["design", "responsibility", "maintainability"],
23
14
  "engineMappings": {
24
- "eslint": [
25
- "max-statements-per-line",
26
- "complexity"
27
- ]
15
+ "eslint": ["max-statements-per-line", "complexity"]
28
16
  }
29
17
  },
30
18
  "C019": {
@@ -32,27 +20,15 @@
32
20
  "description": "Không sử dụng log mức error cho lỗi không nghiêm trọng",
33
21
  "category": "logging",
34
22
  "severity": "warning",
35
- "languages": [
36
- "typescript",
37
- "dart",
38
- "kotlin",
39
- "javascript"
40
- ],
41
- "analyzer": "./rules/C019_log_level_usage/analyzer.js",
42
- "config": "./rules/C019_log_level_usage/config.json",
23
+ "languages": ["typescript", "dart", "kotlin", "javascript"],
24
+ "analyzer": "./rules/common/C019_log_level_usage/analyzer.js",
25
+ "config": "./rules/common/C019_log_level_usage/config.json",
43
26
  "version": "1.0.0",
44
27
  "status": "stable",
45
- "tags": [
46
- "logging",
47
- "error-handling",
48
- "severity"
49
- ],
28
+ "tags": ["logging", "error-handling", "severity"],
50
29
  "engineMappings": {
51
- "eslint": [
52
- "no-console",
53
- "no-alert",
54
- "no-debugger"
55
- ]
30
+ "eslint": ["no-console", "no-alert", "no-debugger"],
31
+ "heuristic": ["rules/common/C019_log_level_usage/analyzer.js"]
56
32
  }
57
33
  },
58
34
  "C006": {
@@ -60,21 +36,12 @@
60
36
  "description": "Tên hàm phải là động từ/verb-noun pattern",
61
37
  "category": "naming",
62
38
  "severity": "warning",
63
- "languages": [
64
- "typescript",
65
- "dart",
66
- "kotlin",
67
- "javascript"
68
- ],
39
+ "languages": ["typescript", "dart", "kotlin", "javascript"],
69
40
  "analyzer": "./rules/C006_function_naming/analyzer.js",
70
41
  "config": "./rules/C006_function_naming/config.json",
71
42
  "version": "1.0.0",
72
43
  "status": "activated",
73
- "tags": [
74
- "naming",
75
- "convention",
76
- "readability"
77
- ],
44
+ "tags": ["naming", "convention", "readability"],
78
45
  "engineMappings": {
79
46
  "eslint": [
80
47
  "func-names",
@@ -88,21 +55,12 @@
88
55
  "description": "Avoid comments that just describe the code",
89
56
  "category": "documentation",
90
57
  "severity": "info",
91
- "languages": [
92
- "typescript",
93
- "javascript",
94
- "dart",
95
- "kotlin"
96
- ],
58
+ "languages": ["typescript", "javascript", "dart", "kotlin"],
97
59
  "analyzer": "./rules/common/C007_meaningful_comments/analyzer.js",
98
60
  "config": "./rules/common/C007_meaningful_comments/config.json",
99
61
  "version": "1.0.0",
100
62
  "status": "stable",
101
- "tags": [
102
- "documentation",
103
- "comments",
104
- "maintainability"
105
- ],
63
+ "tags": ["documentation", "comments", "maintainability"],
106
64
  "engineMappings": {
107
65
  "eslint": [
108
66
  "spaced-comment",
@@ -116,31 +74,48 @@
116
74
  "description": "Limit nested blocks (if/for/while/switch) to maximum 3 levels for readability",
117
75
  "category": "complexity",
118
76
  "severity": "warning",
119
- "languages": [
120
- "typescript",
121
- "javascript",
122
- "dart",
123
- "kotlin"
124
- ],
77
+ "languages": ["typescript", "javascript", "dart", "kotlin"],
125
78
  "analyzer": "./rules/common/C010_limit_block_nesting/analyzer.js",
79
+ "config": "./rules/common/C010_limit_block_nesting/config.json",
80
+ "version": "1.0.0",
81
+ "status": "stable",
82
+ "tags": ["complexity", "readability", "nesting", "maintainability"],
83
+ "strategy": {
84
+ "preferred": "ast",
85
+ "fallbacks": ["ast", "regex"],
86
+ "accuracy": {
87
+ "ast": 95,
88
+ "regex": 75
89
+ }
90
+ }
91
+ },
92
+ "C013": {
93
+ "name": "No Dead Code",
94
+ "description": "Detect and remove commented out code, unused variables/functions, and unreachable code",
95
+ "category": "maintainability",
96
+ "severity": "warning",
97
+ "languages": ["typescript", "javascript", "dart", "kotlin"],
98
+ "analyzer": "./rules/common/C013_no_dead_code/analyzer.js",
99
+ "config": "./rules/common/C013_no_dead_code/config.json",
126
100
  "version": "1.0.0",
127
101
  "status": "stable",
128
102
  "tags": [
129
- "complexity",
130
- "readability",
131
- "nesting",
103
+ "dead-code",
104
+ "commented-code",
105
+ "unreachable-code",
106
+ "cleanup",
132
107
  "maintainability"
133
108
  ],
134
109
  "strategy": {
135
110
  "preferred": "ast",
136
- "fallbacks": [
137
- "ast",
138
- "regex"
139
- ],
111
+ "fallbacks": ["ast", "regex"],
140
112
  "accuracy": {
141
- "ast": 95,
142
- "regex": 75
113
+ "ast": 90,
114
+ "regex": 70
143
115
  }
116
+ },
117
+ "engineMappings": {
118
+ "eslint": ["no-unreachable", "no-unused-vars", "no-unused-expressions"]
144
119
  }
145
120
  },
146
121
  "C012": {
@@ -148,21 +123,12 @@
148
123
  "description": "Separate Command and Query operations (CQS principle)",
149
124
  "category": "design",
150
125
  "severity": "warning",
151
- "languages": [
152
- "typescript",
153
- "javascript",
154
- "dart",
155
- "kotlin"
156
- ],
126
+ "languages": ["typescript", "javascript", "dart", "kotlin"],
157
127
  "analyzer": "./rules/common/C012_command_query_separation/analyzer.js",
158
128
  "config": "./rules/common/C012_command_query_separation/config.json",
159
129
  "version": "1.0.0",
160
130
  "status": "stable",
161
- "tags": [
162
- "design",
163
- "separation",
164
- "maintainability"
165
- ],
131
+ "tags": ["design", "separation", "maintainability"],
166
132
  "engineMappings": {
167
133
  "eslint": [
168
134
  "consistent-return",
@@ -176,26 +142,59 @@
176
142
  "description": "Use domain language in class/function names",
177
143
  "category": "naming",
178
144
  "severity": "warning",
179
- "languages": [
180
- "typescript",
181
- "javascript",
182
- "dart",
183
- "kotlin"
184
- ],
145
+ "languages": ["typescript", "javascript", "dart", "kotlin"],
185
146
  "analyzer": "./rules/common/C015_domain_language/analyzer.js",
186
147
  "config": "./rules/common/C015_domain_language/config.json",
187
148
  "version": "1.0.0",
188
149
  "status": "stable",
189
- "tags": [
190
- "naming",
191
- "domain",
192
- "readability"
193
- ],
150
+ "tags": ["naming", "domain", "readability"],
194
151
  "engineMappings": {
195
- "eslint": [
196
- "@typescript-eslint/naming-convention",
197
- "camelcase"
198
- ]
152
+ "eslint": ["@typescript-eslint/naming-convention", "camelcase"]
153
+ }
154
+ },
155
+ "C018": {
156
+ "name": "Do not throw generic errors",
157
+ "description": "Always provide detailed messages and context.",
158
+ "category": "naming",
159
+ "severity": "warning",
160
+ "languages": ["typescript", "javascript", "dart", "kotlin"],
161
+ "analyzer": "./rules/common/C018_no_throw_generic_error/analyzer.js",
162
+ "config": "./rules/common/C018_no_throw_generic_error/config.json",
163
+ "version": "1.0.0",
164
+ "status": "stable",
165
+ "tags": ["naming", "domain", "readability"],
166
+ "engineMappings": {
167
+ "eslint": ["@typescript-eslint/naming-convention", "camelcase"]
168
+ }
169
+ },
170
+ "C023": {
171
+ "name": "Do not declare duplicate variable",
172
+ "description": "Do not declare duplicate variable names in the same scope",
173
+ "category": "naming",
174
+ "severity": "warning",
175
+ "languages": ["typescript", "javascript", "dart", "kotlin"],
176
+ "analyzer": "./rules/common/C023_no_duplicate_variable/analyzer.js",
177
+ "config": "./rules/common/C023_no_duplicate_variable/config.json",
178
+ "version": "1.0.0",
179
+ "status": "stable",
180
+ "tags": ["naming", "domain", "readability"],
181
+ "engineMappings": {
182
+ "eslint": ["@typescript-eslint/naming-convention", "camelcase"]
183
+ }
184
+ },
185
+ "C024": {
186
+ "name": "Do not scatter hardcoded constants throughout the logic",
187
+ "description": "The rule prevents scattering hardcoded constants throughout the logic. Instead, constants should be defined in a single place to improve maintainability and readability.",
188
+ "category": "naming",
189
+ "severity": "warning",
190
+ "languages": ["typescript", "javascript", "dart", "kotlin"],
191
+ "analyzer": "./rules/common/C024_no_scatter_hardcoded_constants/analyzer.js",
192
+ "config": "./rules/common/C024_no_scatter_hardcoded_constants/config.json",
193
+ "version": "1.0.0",
194
+ "status": "stable",
195
+ "tags": ["naming", "domain", "readability"],
196
+ "engineMappings": {
197
+ "eslint": ["@typescript-eslint/naming-convention", "camelcase"]
199
198
  }
200
199
  },
201
200
  "C029": {
@@ -203,43 +202,24 @@
203
202
  "description": "Mọi catch block phải log nguyên nhân lỗi đầy đủ",
204
203
  "category": "error-handling",
205
204
  "severity": "error",
206
- "languages": [
207
- "typescript",
208
- "dart",
209
- "kotlin",
210
- "javascript"
211
- ],
205
+ "languages": ["typescript", "dart", "kotlin", "javascript"],
212
206
  "analyzer": "./rules/C029_catch_block_logging/analyzer.js",
213
207
  "config": "./rules/C029_catch_block_logging/config.json",
214
208
  "version": "1.0.0",
215
209
  "status": "activated",
216
- "tags": [
217
- "error-handling",
218
- "logging",
219
- "debugging",
220
- "monitoring"
221
- ]
210
+ "tags": ["error-handling", "logging", "debugging", "monitoring"]
222
211
  },
223
212
  "C031": {
224
213
  "name": "Validation Logic Separation",
225
214
  "description": "Logic kiểm tra dữ liệu (validate) phải nằm riêng biệt",
226
215
  "category": "validation",
227
216
  "severity": "error",
228
- "languages": [
229
- "typescript",
230
- "dart",
231
- "kotlin",
232
- "javascript"
233
- ],
217
+ "languages": ["typescript", "dart", "kotlin", "javascript"],
234
218
  "analyzer": "./rules/C031_validation_separation/analyzer.js",
235
219
  "config": "./rules/C031_validation_separation/config.json",
236
220
  "version": "1.0.0",
237
221
  "status": "experimental",
238
- "tags": [
239
- "validation",
240
- "separation",
241
- "architecture"
242
- ],
222
+ "tags": ["validation", "separation", "architecture"],
243
223
  "engineMappings": {
244
224
  "eslint": [
245
225
  "no-implicit-coercion",
@@ -253,21 +233,12 @@
253
233
  "description": "Don't call external APIs in constructors or static blocks",
254
234
  "category": "design",
255
235
  "severity": "error",
256
- "languages": [
257
- "typescript",
258
- "javascript",
259
- "dart",
260
- "kotlin"
261
- ],
236
+ "languages": ["typescript", "javascript", "dart", "kotlin"],
262
237
  "analyzer": "./rules/common/C032_no_constructor_api/analyzer.js",
263
238
  "config": "./rules/common/C032_no_constructor_api/config.json",
264
239
  "version": "1.0.0",
265
240
  "status": "stable",
266
- "tags": [
267
- "design",
268
- "constructor",
269
- "initialization"
270
- ],
241
+ "tags": ["design", "constructor", "initialization"],
271
242
  "engineMappings": {
272
243
  "eslint": [
273
244
  "no-new",
@@ -281,21 +252,12 @@
281
252
  "description": "Separate processing logic and data queries in service layer",
282
253
  "category": "architecture",
283
254
  "severity": "warning",
284
- "languages": [
285
- "typescript",
286
- "javascript",
287
- "dart",
288
- "kotlin"
289
- ],
255
+ "languages": ["typescript", "javascript", "dart", "kotlin"],
290
256
  "analyzer": "./rules/common/C033_separate_logic_data/analyzer.js",
291
257
  "config": "./rules/common/C033_separate_logic_data/config.json",
292
258
  "version": "1.0.0",
293
259
  "status": "stable",
294
- "tags": [
295
- "architecture",
296
- "separation",
297
- "service"
298
- ],
260
+ "tags": ["architecture", "separation", "service"],
299
261
  "engineMappings": {
300
262
  "eslint": [
301
263
  "prefer-const",
@@ -309,21 +271,12 @@
309
271
  "description": "Limit direct access to global state in domain logic",
310
272
  "category": "architecture",
311
273
  "severity": "warning",
312
- "languages": [
313
- "typescript",
314
- "javascript",
315
- "dart",
316
- "kotlin"
317
- ],
274
+ "languages": ["typescript", "javascript", "dart", "kotlin"],
318
275
  "analyzer": "./rules/common/C034_limit_global_state/analyzer.js",
319
276
  "config": "./rules/common/C034_limit_global_state/config.json",
320
277
  "version": "1.0.0",
321
278
  "status": "stable",
322
- "tags": [
323
- "architecture",
324
- "global-state",
325
- "design"
326
- ],
279
+ "tags": ["architecture", "global-state", "design"],
327
280
  "engineMappings": {
328
281
  "eslint": [
329
282
  "no-global-assign",
@@ -337,27 +290,14 @@
337
290
  "description": "When handling errors, must log full information related - structured logging with context",
338
291
  "category": "error-handling",
339
292
  "severity": "warning",
340
- "languages": [
341
- "typescript",
342
- "javascript",
343
- "dart",
344
- "kotlin"
345
- ],
293
+ "languages": ["typescript", "javascript", "dart", "kotlin"],
346
294
  "analyzer": "./rules/common/C035_error_logging_context/analyzer.js",
347
295
  "config": "./rules/common/C035_error_logging_context/config.json",
348
296
  "version": "1.0.0",
349
297
  "status": "stable",
350
- "tags": [
351
- "logging",
352
- "error-handling",
353
- "observability",
354
- "debugging"
355
- ],
298
+ "tags": ["logging", "error-handling", "observability", "debugging"],
356
299
  "engineMappings": {
357
- "eslint": [
358
- "no-empty-catch",
359
- "@typescript-eslint/no-unused-vars"
360
- ]
300
+ "eslint": ["no-empty-catch", "@typescript-eslint/no-unused-vars"]
361
301
  }
362
302
  },
363
303
  "C037": {
@@ -365,21 +305,12 @@
365
305
  "description": "API handlers should return standard response objects (not raw strings)",
366
306
  "category": "api",
367
307
  "severity": "warning",
368
- "languages": [
369
- "typescript",
370
- "javascript",
371
- "dart",
372
- "kotlin"
373
- ],
308
+ "languages": ["typescript", "javascript", "dart", "kotlin"],
374
309
  "analyzer": "./rules/common/C037_standard_response/analyzer.js",
375
310
  "config": "./rules/common/C037_standard_response/config.json",
376
311
  "version": "1.0.0",
377
312
  "status": "stable",
378
- "tags": [
379
- "api",
380
- "response",
381
- "standardization"
382
- ],
313
+ "tags": ["api", "response", "standardization"],
383
314
  "engineMappings": {
384
315
  "eslint": [
385
316
  "consistent-return",
@@ -393,21 +324,12 @@
393
324
  "description": "Avoid logic depending on file/module loading order",
394
325
  "category": "architecture",
395
326
  "severity": "warning",
396
- "languages": [
397
- "typescript",
398
- "javascript",
399
- "dart",
400
- "kotlin"
401
- ],
327
+ "languages": ["typescript", "javascript", "dart", "kotlin"],
402
328
  "analyzer": "./rules/common/C038_no_loading_order/analyzer.js",
403
329
  "config": "./rules/common/C038_no_loading_order/config.json",
404
330
  "version": "1.0.0",
405
331
  "status": "stable",
406
- "tags": [
407
- "architecture",
408
- "loading",
409
- "dependency"
410
- ],
332
+ "tags": ["architecture", "loading", "dependency"],
411
333
  "engineMappings": {
412
334
  "eslint": [
413
335
  "import/no-dynamic-require",
@@ -421,21 +343,12 @@
421
343
  "description": "Don't scatter validation logic across multiple classes",
422
344
  "category": "validation",
423
345
  "severity": "warning",
424
- "languages": [
425
- "typescript",
426
- "javascript",
427
- "dart",
428
- "kotlin"
429
- ],
346
+ "languages": ["typescript", "javascript", "dart", "kotlin"],
430
347
  "analyzer": "./rules/common/C040_centralized_validation/analyzer.js",
431
348
  "config": "./rules/common/C040_centralized_validation/config.json",
432
349
  "version": "1.0.0",
433
350
  "status": "stable",
434
- "tags": [
435
- "validation",
436
- "centralization",
437
- "architecture"
438
- ],
351
+ "tags": ["validation", "centralization", "architecture"],
439
352
  "engineMappings": {
440
353
  "eslint": [
441
354
  "no-duplicate-imports",
@@ -449,25 +362,14 @@
449
362
  "description": "Do not use console.log or print in production code",
450
363
  "category": "logging",
451
364
  "severity": "warning",
452
- "languages": [
453
- "typescript",
454
- "javascript",
455
- "dart"
456
- ],
365
+ "languages": ["typescript", "javascript", "dart"],
457
366
  "analyzer": "./rules/common/C043_no_console_or_print/analyzer.js",
458
367
  "version": "1.0.0",
459
368
  "status": "stable",
460
- "tags": [
461
- "logging",
462
- "production",
463
- "debugging",
464
- "console"
465
- ],
369
+ "tags": ["logging", "production", "debugging", "console"],
466
370
  "strategy": {
467
371
  "preferred": "regex",
468
- "fallbacks": [
469
- "regex"
470
- ],
372
+ "fallbacks": ["regex"],
471
373
  "accuracy": {
472
374
  "regex": 90
473
375
  }
@@ -478,25 +380,15 @@
478
380
  "description": "Verify that if there is an error in access control, the system fails securely",
479
381
  "category": "security",
480
382
  "severity": "error",
481
- "languages": [
482
- "typescript",
483
- "javascript"
484
- ],
383
+ "languages": ["typescript", "javascript"],
485
384
  "analyzer": "eslint",
486
385
  "eslintRule": "custom/typescript_s001",
487
386
  "version": "1.0.0",
488
387
  "status": "stable",
489
- "tags": [
490
- "security",
491
- "access-control",
492
- "fail-safe"
493
- ],
388
+ "tags": ["security", "access-control", "fail-safe"],
494
389
  "strategy": {
495
390
  "preferred": "regex",
496
- "fallbacks": [
497
- "regex",
498
- "ast"
499
- ],
391
+ "fallbacks": ["regex", "ast"],
500
392
  "accuracy": {
501
393
  "regex": 85,
502
394
  "ast": 90
@@ -508,71 +400,45 @@
508
400
  "description": "Insecure Direct Object Reference prevention",
509
401
  "category": "security",
510
402
  "severity": "error",
511
- "languages": [
512
- "typescript",
513
- "javascript"
514
- ],
403
+ "languages": ["typescript", "javascript"],
515
404
  "analyzer": "eslint",
516
405
  "eslintRule": "custom/typescript_s002",
517
406
  "version": "1.0.0",
518
407
  "status": "stable",
519
- "tags": [
520
- "security",
521
- "idor",
522
- "access-control"
523
- ]
408
+ "tags": ["security", "idor", "access-control"]
524
409
  },
525
410
  "S003": {
526
411
  "name": "No Unvalidated Redirect",
527
412
  "description": "Prevent unvalidated redirects and forwards",
528
413
  "category": "security",
529
414
  "severity": "error",
530
- "languages": [
531
- "typescript",
532
- "javascript"
533
- ],
415
+ "languages": ["typescript", "javascript"],
534
416
  "analyzer": "eslint",
535
417
  "eslintRule": "custom/typescript_s003",
536
418
  "version": "1.0.0",
537
419
  "status": "stable",
538
- "tags": [
539
- "security",
540
- "redirect",
541
- "validation"
542
- ]
420
+ "tags": ["security", "redirect", "validation"]
543
421
  },
544
422
  "S005": {
545
423
  "name": "No Origin Header Authentication",
546
424
  "description": "Do not use Origin header for authentication/access control",
547
425
  "category": "security",
548
426
  "severity": "error",
549
- "languages": [
550
- "typescript",
551
- "javascript"
552
- ],
427
+ "languages": ["typescript", "javascript"],
553
428
  "analyzer": "./rules/security/S005_no_origin_auth/analyzer.js",
554
429
  "version": "1.0.0",
555
430
  "status": "stable",
556
- "tags": [
557
- "security",
558
- "authentication",
559
- "headers"
560
- ],
431
+ "tags": ["security", "authentication", "headers"],
561
432
  "strategy": {
562
433
  "preferred": "ast",
563
- "fallbacks": [
564
- "ast",
565
- "regex"
566
- ],
434
+ "fallbacks": ["ast", "regex"],
567
435
  "accuracy": {
568
436
  "ast": 95,
569
437
  "regex": 85
570
438
  }
571
439
  },
572
440
  "engineMappings": {
573
- "eslint": [
574
- "custom/typescript_s005"
575
- ]
441
+ "eslint": ["custom/typescript_s005"]
576
442
  }
577
443
  },
578
444
  "S006": {
@@ -580,19 +446,12 @@
580
446
  "description": "Do not send recovery or activation codes in plaintext",
581
447
  "category": "security",
582
448
  "severity": "error",
583
- "languages": [
584
- "All languages"
585
- ],
449
+ "languages": ["All languages"],
586
450
  "analyzer": "./rules/security/S006_no_plaintext_recovery_codes/analyzer.js",
587
451
  "config": "./rules/security/S006_no_plaintext_recovery_codes/config.json",
588
452
  "version": "1.0.0",
589
453
  "status": "stable",
590
- "tags": [
591
- "security",
592
- "owasp",
593
- "cryptographic-failures",
594
- "authentication"
595
- ],
454
+ "tags": ["security", "owasp", "cryptographic-failures", "authentication"],
596
455
  "strategy": {
597
456
  "preferred": "regex",
598
457
  "fallback": "heuristic"
@@ -630,10 +489,7 @@
630
489
  ],
631
490
  "strategy": {
632
491
  "preferred": "heuristic",
633
- "fallbacks": [
634
- "heuristic",
635
- "regex"
636
- ],
492
+ "fallbacks": ["heuristic", "regex"],
637
493
  "accuracy": {
638
494
  "heuristic": 90,
639
495
  "regex": 75
@@ -648,158 +504,99 @@
648
504
  "description": "Ensure cryptographic agility and algorithm flexibility",
649
505
  "category": "security",
650
506
  "severity": "error",
651
- "languages": [
652
- "typescript",
653
- "javascript"
654
- ],
507
+ "languages": ["typescript", "javascript"],
655
508
  "analyzer": "eslint",
656
509
  "eslintRule": "custom/typescript_s008",
657
510
  "version": "1.0.0",
658
511
  "status": "stable",
659
- "tags": [
660
- "security",
661
- "cryptography",
662
- "agility"
663
- ]
512
+ "tags": ["security", "cryptography", "agility"]
664
513
  },
665
514
  "S009": {
666
515
  "name": "No Insecure Crypto",
667
516
  "description": "Prevent usage of insecure cryptographic methods",
668
517
  "category": "security",
669
518
  "severity": "error",
670
- "languages": [
671
- "typescript",
672
- "javascript"
673
- ],
519
+ "languages": ["typescript", "javascript"],
674
520
  "analyzer": "eslint",
675
521
  "eslintRule": "custom/typescript_s009",
676
522
  "version": "1.0.0",
677
523
  "status": "stable",
678
- "tags": [
679
- "security",
680
- "cryptography",
681
- "insecure"
682
- ]
524
+ "tags": ["security", "cryptography", "insecure"]
683
525
  },
684
526
  "S010": {
685
527
  "name": "No Insecure Random in Sensitive Context",
686
528
  "description": "Prevent insecure random generator usage in sensitive contexts",
687
529
  "category": "security",
688
530
  "severity": "error",
689
- "languages": [
690
- "typescript",
691
- "javascript"
692
- ],
531
+ "languages": ["typescript", "javascript"],
693
532
  "analyzer": "eslint",
694
533
  "eslintRule": "custom/typescript_s010",
695
534
  "version": "1.0.0",
696
535
  "status": "stable",
697
- "tags": [
698
- "security",
699
- "random",
700
- "sensitive"
701
- ]
536
+ "tags": ["security", "random", "sensitive"]
702
537
  },
703
538
  "S011": {
704
539
  "name": "No Insecure UUID",
705
540
  "description": "UUID must be version 4 and use CSPRNG",
706
541
  "category": "security",
707
542
  "severity": "error",
708
- "languages": [
709
- "typescript",
710
- "javascript"
711
- ],
543
+ "languages": ["typescript", "javascript"],
712
544
  "analyzer": "eslint",
713
545
  "eslintRule": "custom/typescript_s011",
714
546
  "version": "1.0.0",
715
547
  "status": "stable",
716
- "tags": [
717
- "security",
718
- "uuid",
719
- "random"
720
- ]
548
+ "tags": ["security", "uuid", "random"]
721
549
  },
722
550
  "S012": {
723
551
  "name": "No Hardcoded Secrets",
724
552
  "description": "Prevent hardcoded secrets in source code",
725
553
  "category": "security",
726
554
  "severity": "error",
727
- "languages": [
728
- "typescript",
729
- "javascript"
730
- ],
555
+ "languages": ["typescript", "javascript"],
731
556
  "analyzer": "eslint",
732
557
  "eslintRule": "custom/typescript_s012",
733
558
  "version": "1.0.0",
734
559
  "status": "stable",
735
- "tags": [
736
- "security",
737
- "secrets",
738
- "hardcoded"
739
- ]
560
+ "tags": ["security", "secrets", "hardcoded"]
740
561
  },
741
562
  "S013": {
742
563
  "name": "Verify TLS Connection",
743
564
  "description": "Verify that TLS connections are properly established and validated",
744
565
  "category": "security",
745
566
  "severity": "error",
746
- "languages": [
747
- "typescript",
748
- "javascript"
749
- ],
567
+ "languages": ["typescript", "javascript"],
750
568
  "analyzer": "eslint",
751
569
  "eslintRule": "custom/typescript_s013",
752
570
  "version": "1.0.0",
753
571
  "status": "stable",
754
- "tags": [
755
- "security",
756
- "tls",
757
- "connection"
758
- ]
572
+ "tags": ["security", "tls", "connection"]
759
573
  },
760
574
  "S014": {
761
575
  "name": "Insecure TLS Version",
762
576
  "description": "Prevent usage of insecure TLS versions",
763
577
  "category": "security",
764
578
  "severity": "error",
765
- "languages": [
766
- "typescript",
767
- "javascript"
768
- ],
579
+ "languages": ["typescript", "javascript"],
769
580
  "analyzer": "eslint",
770
581
  "eslintRule": "custom/typescript_s014",
771
582
  "version": "1.0.0",
772
583
  "status": "stable",
773
- "tags": [
774
- "security",
775
- "tls",
776
- "encryption"
777
- ]
584
+ "tags": ["security", "tls", "encryption"]
778
585
  },
779
586
  "S015": {
780
587
  "name": "Insecure TLS Certificate",
781
588
  "description": "Prevent usage of insecure TLS certificate configurations",
782
589
  "category": "security",
783
590
  "severity": "error",
784
- "languages": [
785
- "typescript",
786
- "javascript"
787
- ],
591
+ "languages": ["typescript", "javascript"],
788
592
  "analyzer": "eslint",
789
593
  "eslintRule": "custom/typescript_s015",
790
594
  "version": "1.0.0",
791
595
  "status": "stable",
792
- "tags": [
793
- "security",
794
- "tls",
795
- "certificates"
796
- ],
596
+ "tags": ["security", "tls", "certificates"],
797
597
  "strategy": {
798
598
  "preferred": "ast",
799
- "fallbacks": [
800
- "ast",
801
- "regex"
802
- ],
599
+ "fallbacks": ["ast", "regex"],
803
600
  "accuracy": {
804
601
  "ast": 95,
805
602
  "regex": 80
@@ -811,139 +608,95 @@
811
608
  "description": "Prevent sensitive data in URL query parameters",
812
609
  "category": "security",
813
610
  "severity": "error",
814
- "languages": [
815
- "typescript",
816
- "javascript"
817
- ],
818
- "analyzer": "eslint",
819
- "eslintRule": "custom/typescript_s016",
611
+ "languages": ["typescript", "javascript"],
612
+ "analyzer": "./rules/security/S016_no_sensitive_querystring/analyzer.js",
613
+ "config": "./rules/security/S016_no_sensitive_querystring/config.json",
820
614
  "version": "1.0.0",
821
615
  "status": "stable",
822
- "tags": [
823
- "security",
824
- "sensitive-data",
825
- "url"
826
- ]
616
+ "tags": ["security", "sensitive-data", "url"],
617
+ "strategy": {
618
+ "preferred": "ast",
619
+ "fallbacks": ["ast", "regex"],
620
+ "accuracy": {
621
+ "ast": 95,
622
+ "regex": 80
623
+ }
624
+ }
827
625
  },
828
626
  "S017": {
829
627
  "name": "No SQL Injection",
830
628
  "description": "Prevent SQL injection vulnerabilities",
831
629
  "category": "security",
832
630
  "severity": "error",
833
- "languages": [
834
- "typescript",
835
- "javascript"
836
- ],
837
- "analyzer": "eslint",
838
- "eslintRule": "custom/typescript_s017",
631
+ "languages": ["typescript", "javascript"],
632
+ "analyzer": "./rules/security/S017_use_parameterized_queries/analyzer.js",
633
+ "config": "./rules/security/S017_use_parameterized_queries/config.json",
839
634
  "version": "1.0.0",
840
635
  "status": "stable",
841
- "tags": [
842
- "security",
843
- "sql-injection",
844
- "database"
845
- ]
636
+ "tags": ["security", "sql-injection", "database"]
846
637
  },
847
638
  "S018": {
848
639
  "name": "Positive Input Validation",
849
640
  "description": "Ensure positive input validation patterns",
850
641
  "category": "security",
851
642
  "severity": "error",
852
- "languages": [
853
- "typescript",
854
- "javascript"
855
- ],
643
+ "languages": ["typescript", "javascript"],
856
644
  "analyzer": "eslint",
857
645
  "eslintRule": "custom/typescript_s018",
858
646
  "version": "1.0.0",
859
647
  "status": "stable",
860
- "tags": [
861
- "security",
862
- "validation",
863
- "input"
864
- ]
648
+ "tags": ["security", "validation", "input"]
865
649
  },
866
650
  "S019": {
867
651
  "name": "No Raw User Input in Email",
868
652
  "description": "Prevent raw user input in email content",
869
653
  "category": "security",
870
654
  "severity": "error",
871
- "languages": [
872
- "typescript",
873
- "javascript"
874
- ],
655
+ "languages": ["typescript", "javascript"],
875
656
  "analyzer": "eslint",
876
657
  "eslintRule": "custom/typescript_s019",
877
658
  "version": "1.0.0",
878
659
  "status": "stable",
879
- "tags": [
880
- "security",
881
- "email",
882
- "injection"
883
- ]
660
+ "tags": ["security", "email", "injection"]
884
661
  },
885
662
  "S020": {
886
663
  "name": "No Eval Dynamic Execution",
887
664
  "description": "Prevent eval and dynamic code execution",
888
665
  "category": "security",
889
666
  "severity": "error",
890
- "languages": [
891
- "typescript",
892
- "javascript"
893
- ],
667
+ "languages": ["typescript", "javascript"],
894
668
  "analyzer": "eslint",
895
669
  "eslintRule": "custom/typescript_s020",
896
670
  "version": "1.0.0",
897
671
  "status": "stable",
898
- "tags": [
899
- "security",
900
- "eval",
901
- "dynamic-execution"
902
- ]
672
+ "tags": ["security", "eval", "dynamic-execution"]
903
673
  },
904
674
  "S022": {
905
675
  "name": "Output Encoding Required",
906
676
  "description": "Require output encoding for user input",
907
677
  "category": "security",
908
678
  "severity": "error",
909
- "languages": [
910
- "typescript",
911
- "javascript"
912
- ],
679
+ "languages": ["typescript", "javascript"],
913
680
  "analyzer": "eslint",
914
681
  "eslintRule": "custom/typescript_s022",
915
682
  "version": "1.0.0",
916
683
  "status": "stable",
917
- "tags": [
918
- "security",
919
- "encoding",
920
- "xss"
921
- ]
684
+ "tags": ["security", "encoding", "xss"]
922
685
  },
923
686
  "S023": {
924
687
  "name": "No JSON Injection",
925
688
  "description": "Prevent JSON injection vulnerabilities",
926
689
  "category": "security",
927
690
  "severity": "error",
928
- "languages": [
929
- "typescript",
930
- "javascript"
931
- ],
691
+ "languages": ["typescript", "javascript"],
932
692
  "analyzer": "eslint",
933
693
  "eslintRule": "custom/typescript_s023",
934
694
  "version": "1.0.0",
935
695
  "status": "stable",
936
- "tags": [
937
- "security",
938
- "json",
939
- "injection"
940
- ],
696
+ "tags": ["security", "json", "injection"],
941
697
  "strategy": {
942
698
  "preferred": "ast",
943
- "fallbacks": [
944
- "ast",
945
- "regex"
946
- ],
699
+ "fallbacks": ["ast", "regex"],
947
700
  "accuracy": {
948
701
  "ast": 95,
949
702
  "regex": 60
@@ -955,494 +708,393 @@
955
708
  "description": "Require server-side input validation",
956
709
  "category": "security",
957
710
  "severity": "error",
958
- "languages": [
959
- "typescript",
960
- "javascript"
961
- ],
711
+ "languages": ["typescript", "javascript"],
962
712
  "analyzer": "eslint",
963
713
  "eslintRule": "custom/typescript_s025",
964
714
  "version": "1.0.0",
965
715
  "status": "stable",
966
- "tags": [
967
- "security",
968
- "validation",
969
- "server-side"
970
- ]
716
+ "tags": ["security", "validation", "server-side"]
971
717
  },
972
718
  "S026": {
973
719
  "name": "JSON Schema Validation",
974
720
  "description": "Require JSON schema validation",
975
721
  "category": "security",
976
722
  "severity": "warning",
977
- "languages": [
978
- "typescript",
979
- "javascript"
980
- ],
723
+ "languages": ["typescript", "javascript"],
981
724
  "analyzer": "eslint",
982
725
  "eslintRule": "custom/typescript_s026",
983
726
  "version": "1.0.0",
984
727
  "status": "stable",
985
- "tags": [
986
- "security",
987
- "validation",
988
- "json-schema"
989
- ]
728
+ "tags": ["security", "validation", "json-schema"]
990
729
  },
991
730
  "S027": {
992
731
  "name": "No Hardcoded Secrets Advanced",
993
732
  "description": "Advanced detection of hardcoded secrets",
994
733
  "category": "security",
995
734
  "severity": "error",
996
- "languages": [
997
- "typescript",
998
- "javascript"
999
- ],
735
+ "languages": ["typescript", "javascript"],
1000
736
  "analyzer": "eslint",
1001
737
  "eslintRule": "custom/typescript_s027",
1002
738
  "version": "1.0.0",
1003
739
  "status": "stable",
1004
- "tags": [
1005
- "security",
1006
- "secrets",
1007
- "hardcoded"
1008
- ]
740
+ "tags": ["security", "secrets", "hardcoded"]
1009
741
  },
1010
742
  "S029": {
1011
743
  "name": "Require CSRF Protection",
1012
744
  "description": "Require CSRF protection for state-changing operations",
1013
745
  "category": "security",
1014
746
  "severity": "error",
1015
- "languages": [
1016
- "typescript",
1017
- "javascript"
1018
- ],
747
+ "languages": ["typescript", "javascript"],
1019
748
  "analyzer": "eslint",
1020
749
  "eslintRule": "custom/typescript_s029",
1021
750
  "version": "1.0.0",
1022
751
  "status": "stable",
1023
- "tags": [
1024
- "security",
1025
- "csrf",
1026
- "protection"
1027
- ]
752
+ "tags": ["security", "csrf", "protection"]
1028
753
  },
1029
754
  "S030": {
1030
755
  "name": "No Directory Browsing",
1031
756
  "description": "Prevent directory browsing vulnerabilities",
1032
757
  "category": "security",
1033
758
  "severity": "error",
1034
- "languages": [
1035
- "typescript",
1036
- "javascript"
1037
- ],
759
+ "languages": ["typescript", "javascript"],
1038
760
  "analyzer": "eslint",
1039
761
  "eslintRule": "custom/typescript_s030",
1040
762
  "version": "1.0.0",
1041
763
  "status": "stable",
1042
- "tags": [
1043
- "security",
1044
- "directory-browsing",
1045
- "information-disclosure"
1046
- ]
764
+ "tags": ["security", "directory-browsing", "information-disclosure"]
765
+ },
766
+ "S031": {
767
+ "name": "Set Secure flag for Session Cookies",
768
+ "description": "Set Secure flag for Session Cookies to protect via HTTPS. This ensures cookies are only transmitted over secure connections, preventing interception.",
769
+ "category": "security",
770
+ "severity": "error",
771
+ "languages": ["typescript", "javascript"],
772
+ "analyzer": "./rules/security/S031_secure_session_cookies/analyzer.js",
773
+ "config": "./rules/security/S031_secure_session_cookies/config.json",
774
+ "version": "1.0.0",
775
+ "status": "stable",
776
+ "tags": ["security", "cookies", "session", "https", "secure"],
777
+ "strategy": {
778
+ "preferred": "ast",
779
+ "fallbacks": ["ast", "regex"],
780
+ "accuracy": {
781
+ "ast": 95,
782
+ "regex": 85
783
+ }
784
+ },
785
+ "engineMappings": {
786
+ "heuristic": ["rules/security/S031_secure_session_cookies/analyzer.js"]
787
+ }
788
+ },
789
+ "S032": {
790
+ "name": "Set HttpOnly attribute for Session Cookies",
791
+ "description": "Set HttpOnly attribute for Session Cookies to prevent JavaScript access. This protects against XSS attacks by preventing client-side script access to sensitive cookies.",
792
+ "category": "security",
793
+ "severity": "error",
794
+ "languages": ["typescript", "javascript"],
795
+ "analyzer": "./rules/security/S032_httponly_session_cookies/analyzer.js",
796
+ "config": "./rules/security/S032_httponly_session_cookies/config.json",
797
+ "version": "1.0.0",
798
+ "status": "stable",
799
+ "tags": ["security", "cookies", "session", "httponly", "xss"],
800
+ "strategy": {
801
+ "preferred": "ast",
802
+ "fallbacks": ["ast", "regex"],
803
+ "accuracy": {
804
+ "ast": 95,
805
+ "regex": 85
806
+ }
807
+ },
808
+ "engineMappings": {
809
+ "heuristic": [
810
+ "rules/security/S032_httponly_session_cookies/analyzer.js"
811
+ ]
812
+ }
1047
813
  },
1048
814
  "S033": {
1049
- "name": "Require SameSite Cookie",
1050
- "description": "Require SameSite attribute for cookies",
815
+ "name": "Set SameSite attribute for Session Cookies",
816
+ "description": "Set SameSite attribute for Session Cookies to reduce CSRF risk. This prevents the browser from sending cookies along with cross-site requests, mitigating CSRF attacks.",
1051
817
  "category": "security",
1052
818
  "severity": "error",
1053
- "languages": [
1054
- "typescript",
1055
- "javascript"
1056
- ],
1057
- "analyzer": "eslint",
1058
- "eslintRule": "custom/typescript_s033",
819
+ "languages": ["typescript", "javascript"],
820
+ "analyzer": "./rules/security/S033_samesite_session_cookies/analyzer.js",
821
+ "config": "./rules/security/S033_samesite_session_cookies/config.json",
1059
822
  "version": "1.0.0",
1060
823
  "status": "stable",
1061
- "tags": [
1062
- "security",
1063
- "cookies",
1064
- "samesite"
1065
- ]
824
+ "tags": ["security", "cookies", "session", "samesite", "csrf"],
825
+ "strategy": {
826
+ "preferred": "ast",
827
+ "fallbacks": ["ast", "regex"],
828
+ "accuracy": {
829
+ "ast": 95,
830
+ "regex": 85
831
+ }
832
+ },
833
+ "engineMappings": {
834
+ "heuristic": [
835
+ "rules/security/S033_samesite_session_cookies/analyzer.js"
836
+ ]
837
+ }
1066
838
  },
1067
839
  "S034": {
1068
- "name": "Require Host Cookie Prefix",
1069
- "description": "Require __Host- prefix for secure cookies",
840
+ "name": "Use __Host- prefix for Session Cookies",
841
+ "description": "Use __Host- prefix for Session Cookies to prevent subdomain sharing. The __Host- prefix ensures cookies are only sent to the exact domain that set them, preventing subdomain cookie sharing attacks.",
1070
842
  "category": "security",
1071
- "severity": "error",
1072
- "languages": [
1073
- "typescript",
1074
- "javascript"
1075
- ],
1076
- "analyzer": "eslint",
1077
- "eslintRule": "custom/typescript_s034",
843
+ "severity": "warning",
844
+ "languages": ["typescript", "javascript"],
845
+ "analyzer": "./rules/security/S034_host_prefix_session_cookies/analyzer.js",
846
+ "config": "./rules/security/S034_host_prefix_session_cookies/config.json",
1078
847
  "version": "1.0.0",
1079
848
  "status": "stable",
1080
- "tags": [
1081
- "security",
1082
- "cookies",
1083
- "host-prefix"
1084
- ]
849
+ "tags": ["security", "cookies", "session", "host-prefix", "subdomain"],
850
+ "strategy": {
851
+ "preferred": "ast",
852
+ "fallbacks": ["ast", "regex"],
853
+ "accuracy": {
854
+ "ast": 95,
855
+ "regex": 85
856
+ }
857
+ },
858
+ "engineMappings": {
859
+ "heuristic": [
860
+ "rules/security/S034_host_prefix_session_cookies/analyzer.js"
861
+ ]
862
+ }
1085
863
  },
1086
864
  "S035": {
1087
- "name": "Cookie Specific Path",
1088
- "description": "Require specific path for sensitive cookies",
865
+ "name": "Set Path attribute for Session Cookies",
866
+ "description": "Set Path attribute for Session Cookies to limit access scope",
1089
867
  "category": "security",
1090
- "severity": "error",
1091
- "languages": [
1092
- "typescript",
1093
- "javascript"
1094
- ],
1095
- "analyzer": "eslint",
1096
- "eslintRule": "custom/typescript_s035",
868
+ "severity": "warning",
869
+ "languages": ["typescript", "javascript"],
870
+ "analyzer": "heuristic",
1097
871
  "version": "1.0.0",
1098
872
  "status": "stable",
1099
- "tags": [
1100
- "security",
1101
- "cookies",
1102
- "path"
1103
- ]
873
+ "tags": ["security", "cookies", "path"],
874
+ "strategy": {
875
+ "defaultEngine": "heuristic",
876
+ "engineMappings": {
877
+ "heuristic": ["rules/security/S035_path_session_cookies/analyzer.js"]
878
+ }
879
+ },
880
+ "configPath": "rules/security/S035_path_session_cookies/config.json",
881
+ "analyzerPath": ["rules/security/S035_path_session_cookies/analyzer.js"]
1104
882
  },
1105
883
  "S036": {
1106
884
  "name": "No Unsafe File Include",
1107
885
  "description": "Prevent unsafe file inclusion vulnerabilities",
1108
886
  "category": "security",
1109
887
  "severity": "error",
1110
- "languages": [
1111
- "typescript",
1112
- "javascript"
1113
- ],
888
+ "languages": ["typescript", "javascript"],
1114
889
  "analyzer": "eslint",
1115
890
  "eslintRule": "custom/typescript_s036",
1116
891
  "version": "1.0.0",
1117
892
  "status": "stable",
1118
- "tags": [
1119
- "security",
1120
- "file-inclusion",
1121
- "path-traversal"
1122
- ]
893
+ "tags": ["security", "file-inclusion", "path-traversal"]
1123
894
  },
1124
895
  "S037": {
1125
896
  "name": "Require Anti Cache Headers",
1126
897
  "description": "Require anti-cache headers for sensitive content",
1127
898
  "category": "security",
1128
899
  "severity": "warning",
1129
- "languages": [
1130
- "typescript",
1131
- "javascript"
1132
- ],
900
+ "languages": ["typescript", "javascript"],
1133
901
  "analyzer": "eslint",
1134
902
  "eslintRule": "custom/typescript_s037",
1135
903
  "version": "1.0.0",
1136
904
  "status": "stable",
1137
- "tags": [
1138
- "security",
1139
- "caching",
1140
- "headers"
1141
- ]
905
+ "tags": ["security", "caching", "headers"]
1142
906
  },
1143
907
  "S038": {
1144
908
  "name": "No Version Disclosure",
1145
909
  "description": "Prevent version information disclosure",
1146
910
  "category": "security",
1147
911
  "severity": "warning",
1148
- "languages": [
1149
- "typescript",
1150
- "javascript"
1151
- ],
912
+ "languages": ["typescript", "javascript"],
1152
913
  "analyzer": "eslint",
1153
914
  "eslintRule": "custom/typescript_s038",
1154
915
  "version": "1.0.0",
1155
916
  "status": "stable",
1156
- "tags": [
1157
- "security",
1158
- "information-disclosure",
1159
- "version"
1160
- ]
917
+ "tags": ["security", "information-disclosure", "version"]
1161
918
  },
1162
919
  "S039": {
1163
920
  "name": "No Session Token in URL",
1164
921
  "description": "Prevent session tokens in URL parameters",
1165
922
  "category": "security",
1166
923
  "severity": "error",
1167
- "languages": [
1168
- "typescript",
1169
- "javascript"
1170
- ],
924
+ "languages": ["typescript", "javascript"],
1171
925
  "analyzer": "eslint",
1172
926
  "eslintRule": "custom/typescript_s039",
1173
927
  "version": "1.0.0",
1174
928
  "status": "stable",
1175
- "tags": [
1176
- "security",
1177
- "session",
1178
- "url"
1179
- ]
929
+ "tags": ["security", "session", "url"]
1180
930
  },
1181
931
  "S041": {
1182
932
  "name": "Require Session Invalidate on Logout",
1183
933
  "description": "Require session invalidation on logout",
1184
934
  "category": "security",
1185
935
  "severity": "error",
1186
- "languages": [
1187
- "typescript",
1188
- "javascript"
1189
- ],
936
+ "languages": ["typescript", "javascript"],
1190
937
  "analyzer": "eslint",
1191
938
  "eslintRule": "custom/typescript_s041",
1192
939
  "version": "1.0.0",
1193
940
  "status": "stable",
1194
- "tags": [
1195
- "security",
1196
- "session",
1197
- "logout"
1198
- ]
941
+ "tags": ["security", "session", "logout"]
1199
942
  },
1200
943
  "S042": {
1201
944
  "name": "Require Periodic Reauthentication",
1202
945
  "description": "Require periodic re-authentication for sensitive operations",
1203
946
  "category": "security",
1204
947
  "severity": "error",
1205
- "languages": [
1206
- "typescript",
1207
- "javascript"
1208
- ],
948
+ "languages": ["typescript", "javascript"],
1209
949
  "analyzer": "eslint",
1210
950
  "eslintRule": "custom/typescript_s042",
1211
951
  "version": "1.0.0",
1212
952
  "status": "stable",
1213
- "tags": [
1214
- "security",
1215
- "authentication",
1216
- "periodic"
1217
- ]
953
+ "tags": ["security", "authentication", "periodic"]
1218
954
  },
1219
955
  "S043": {
1220
956
  "name": "Terminate Sessions on Password Change",
1221
957
  "description": "Terminate all sessions when password changes",
1222
958
  "category": "security",
1223
959
  "severity": "error",
1224
- "languages": [
1225
- "typescript",
1226
- "javascript"
1227
- ],
960
+ "languages": ["typescript", "javascript"],
1228
961
  "analyzer": "eslint",
1229
962
  "eslintRule": "custom/typescript_s043",
1230
963
  "version": "1.0.0",
1231
964
  "status": "stable",
1232
- "tags": [
1233
- "security",
1234
- "session",
1235
- "password"
1236
- ]
965
+ "tags": ["security", "session", "password"]
1237
966
  },
1238
967
  "S044": {
1239
968
  "name": "Require Full Session for Sensitive Operations",
1240
969
  "description": "Require full session validation for sensitive operations",
1241
970
  "category": "security",
1242
971
  "severity": "error",
1243
- "languages": [
1244
- "typescript",
1245
- "javascript"
1246
- ],
972
+ "languages": ["typescript", "javascript"],
1247
973
  "analyzer": "eslint",
1248
974
  "eslintRule": "custom/typescript_s044",
1249
975
  "version": "1.0.0",
1250
976
  "status": "stable",
1251
- "tags": [
1252
- "security",
1253
- "session",
1254
- "validation"
1255
- ]
977
+ "tags": ["security", "session", "validation"]
1256
978
  },
1257
979
  "S045": {
1258
980
  "name": "Anti Automation Controls",
1259
981
  "description": "Implement anti-automation controls",
1260
982
  "category": "security",
1261
983
  "severity": "warning",
1262
- "languages": [
1263
- "typescript",
1264
- "javascript"
1265
- ],
984
+ "languages": ["typescript", "javascript"],
1266
985
  "analyzer": "eslint",
1267
986
  "eslintRule": "custom/typescript_s045",
1268
987
  "version": "1.0.0",
1269
988
  "status": "stable",
1270
- "tags": [
1271
- "security",
1272
- "automation",
1273
- "protection"
1274
- ]
989
+ "tags": ["security", "automation", "protection"]
1275
990
  },
1276
991
  "S046": {
1277
992
  "name": "Secure Notification on Auth Change",
1278
993
  "description": "Require secure notification on authentication changes",
1279
994
  "category": "security",
1280
995
  "severity": "warning",
1281
- "languages": [
1282
- "typescript",
1283
- "javascript"
1284
- ],
996
+ "languages": ["typescript", "javascript"],
1285
997
  "analyzer": "eslint",
1286
998
  "eslintRule": "custom/typescript_s046",
1287
999
  "version": "1.0.0",
1288
1000
  "status": "stable",
1289
- "tags": [
1290
- "security",
1291
- "notification",
1292
- "authentication"
1293
- ]
1001
+ "tags": ["security", "notification", "authentication"]
1294
1002
  },
1295
1003
  "S047": {
1296
1004
  "name": "Secure Random Password Generation",
1297
1005
  "description": "Require secure and random initial password generation",
1298
1006
  "category": "security",
1299
1007
  "severity": "error",
1300
- "languages": [
1301
- "typescript",
1302
- "javascript"
1303
- ],
1008
+ "languages": ["typescript", "javascript"],
1304
1009
  "analyzer": "eslint",
1305
1010
  "eslintRule": "custom/typescript_s047",
1306
1011
  "version": "1.0.0",
1307
1012
  "status": "stable",
1308
- "tags": [
1309
- "security",
1310
- "password",
1311
- "random"
1312
- ]
1013
+ "tags": ["security", "password", "random"]
1313
1014
  },
1314
1015
  "S048": {
1315
1016
  "name": "Password Credential Recovery",
1316
1017
  "description": "Secure password credential recovery process",
1317
1018
  "category": "security",
1318
1019
  "severity": "error",
1319
- "languages": [
1320
- "typescript",
1321
- "javascript"
1322
- ],
1020
+ "languages": ["typescript", "javascript"],
1323
1021
  "analyzer": "eslint",
1324
1022
  "eslintRule": "custom/typescript_s048",
1325
1023
  "version": "1.0.0",
1326
1024
  "status": "stable",
1327
- "tags": [
1328
- "security",
1329
- "password",
1330
- "recovery"
1331
- ]
1025
+ "tags": ["security", "password", "recovery"]
1332
1026
  },
1333
1027
  "S050": {
1334
1028
  "name": "Session Token Weak Hash",
1335
1029
  "description": "Prevent weak hashing for session tokens",
1336
1030
  "category": "security",
1337
1031
  "severity": "error",
1338
- "languages": [
1339
- "typescript",
1340
- "javascript"
1341
- ],
1032
+ "languages": ["typescript", "javascript"],
1342
1033
  "analyzer": "eslint",
1343
1034
  "eslintRule": "custom/typescript_s050",
1344
1035
  "version": "1.0.0",
1345
1036
  "status": "stable",
1346
- "tags": [
1347
- "security",
1348
- "session",
1349
- "hashing"
1350
- ]
1037
+ "tags": ["security", "session", "hashing"]
1351
1038
  },
1352
1039
  "S052": {
1353
1040
  "name": "Secure Random Authentication Code",
1354
1041
  "description": "Require secure random number generation for authentication codes",
1355
1042
  "category": "security",
1356
1043
  "severity": "error",
1357
- "languages": [
1358
- "typescript",
1359
- "javascript"
1360
- ],
1044
+ "languages": ["typescript", "javascript"],
1361
1045
  "analyzer": "eslint",
1362
1046
  "eslintRule": "custom/typescript_s052",
1363
1047
  "version": "1.0.0",
1364
1048
  "status": "stable",
1365
- "tags": [
1366
- "security",
1367
- "random",
1368
- "authentication"
1369
- ]
1049
+ "tags": ["security", "random", "authentication"]
1370
1050
  },
1371
1051
  "S054": {
1372
1052
  "name": "Verification Default Account",
1373
1053
  "description": "Verify and secure default accounts",
1374
1054
  "category": "security",
1375
1055
  "severity": "error",
1376
- "languages": [
1377
- "typescript",
1378
- "javascript"
1379
- ],
1056
+ "languages": ["typescript", "javascript"],
1380
1057
  "analyzer": "eslint",
1381
1058
  "eslintRule": "custom/typescript_s054",
1382
1059
  "version": "1.0.0",
1383
1060
  "status": "stable",
1384
- "tags": [
1385
- "security",
1386
- "accounts",
1387
- "default"
1388
- ]
1061
+ "tags": ["security", "accounts", "default"]
1389
1062
  },
1390
1063
  "S055": {
1391
1064
  "name": "REST Content-Type Verification",
1392
1065
  "description": "Verify incoming Content-Type in REST API endpoints",
1393
1066
  "category": "security",
1394
1067
  "severity": "error",
1395
- "languages": [
1396
- "typescript",
1397
- "javascript"
1398
- ],
1068
+ "languages": ["typescript", "javascript"],
1399
1069
  "analyzer": "eslint",
1400
1070
  "eslintRule": "custom/typescript_s055",
1401
1071
  "version": "1.0.0",
1402
1072
  "status": "stable",
1403
- "tags": [
1404
- "security",
1405
- "rest",
1406
- "content-type"
1407
- ]
1073
+ "tags": ["security", "rest", "content-type"]
1408
1074
  },
1409
1075
  "S057": {
1410
1076
  "name": "UTC Logging",
1411
1077
  "description": "Enforce UTC usage in time formatting and logging",
1412
1078
  "category": "security",
1413
1079
  "severity": "warning",
1414
- "languages": [
1415
- "typescript",
1416
- "javascript"
1417
- ],
1080
+ "languages": ["typescript", "javascript"],
1418
1081
  "analyzer": "eslint",
1419
1082
  "eslintRule": "custom/typescript_s057",
1420
1083
  "version": "1.0.0",
1421
1084
  "status": "stable",
1422
- "tags": [
1423
- "security",
1424
- "logging",
1425
- "timezone"
1426
- ]
1085
+ "tags": ["security", "logging", "timezone"]
1427
1086
  },
1428
1087
  "S058": {
1429
1088
  "name": "No SSRF",
1430
1089
  "description": "Detect SSRF vulnerabilities via unvalidated user-controlled URLs",
1431
1090
  "category": "security",
1432
1091
  "severity": "error",
1433
- "languages": [
1434
- "typescript",
1435
- "javascript"
1436
- ],
1092
+ "languages": ["typescript", "javascript"],
1437
1093
  "analyzer": "eslint",
1438
1094
  "eslintRule": "custom/typescript_s058",
1439
1095
  "version": "1.0.0",
1440
1096
  "status": "stable",
1441
- "tags": [
1442
- "security",
1443
- "ssrf",
1444
- "url-validation"
1445
- ]
1097
+ "tags": ["security", "ssrf", "url-validation"]
1446
1098
  },
1447
1099
  "C002": {
1448
1100
  "id": "C002",
@@ -1450,25 +1102,16 @@
1450
1102
  "description": "Auto-migrated rule C002 from ESLint mapping",
1451
1103
  "category": "general",
1452
1104
  "severity": "warning",
1453
- "languages": [
1454
- "typescript",
1455
- "javascript"
1456
- ],
1105
+ "languages": ["typescript", "javascript"],
1457
1106
  "version": "1.0.0",
1458
1107
  "status": "migrated",
1459
- "tags": [
1460
- "migrated"
1461
- ],
1108
+ "tags": ["migrated"],
1462
1109
  "engineMappings": {
1463
- "eslint": [
1464
- "custom/no-duplicate-code"
1465
- ]
1110
+ "eslint": ["custom/no-duplicate-code"]
1466
1111
  },
1467
1112
  "strategy": {
1468
1113
  "preferred": "regex",
1469
- "fallbacks": [
1470
- "regex"
1471
- ],
1114
+ "fallbacks": ["regex"],
1472
1115
  "accuracy": {}
1473
1116
  }
1474
1117
  },
@@ -1478,84 +1121,55 @@
1478
1121
  "description": "Auto-migrated rule C003 from ESLint mapping",
1479
1122
  "category": "general",
1480
1123
  "severity": "warning",
1481
- "languages": [
1482
- "typescript",
1483
- "javascript"
1484
- ],
1485
- "version": "1.0.0",
1486
- "status": "migrated",
1487
- "tags": [
1488
- "migrated"
1489
- ],
1490
- "engineMappings": {
1491
- "eslint": [
1492
- "custom/no-vague-abbreviations"
1493
- ]
1494
- },
1495
- "strategy": {
1496
- "preferred": "regex",
1497
- "fallbacks": [
1498
- "regex"
1499
- ],
1500
- "accuracy": {}
1501
- }
1502
- },
1503
- "C013": {
1504
- "id": "C013",
1505
- "name": "Rule C013",
1506
- "description": "Auto-migrated rule C013 from ESLint mapping",
1507
- "category": "general",
1508
- "severity": "warning",
1509
- "languages": [
1510
- "typescript",
1511
- "javascript"
1512
- ],
1124
+ "languages": ["typescript", "javascript"],
1513
1125
  "version": "1.0.0",
1514
- "status": "migrated",
1515
- "tags": [
1516
- "migrated"
1517
- ],
1126
+ "status": "migrated",
1127
+ "tags": ["migrated"],
1518
1128
  "engineMappings": {
1519
- "eslint": [
1520
- "custom/no-dead-code"
1521
- ]
1129
+ "eslint": ["custom/no-vague-abbreviations"]
1522
1130
  },
1523
1131
  "strategy": {
1524
1132
  "preferred": "regex",
1525
- "fallbacks": [
1526
- "regex"
1527
- ],
1133
+ "fallbacks": ["regex"],
1528
1134
  "accuracy": {}
1529
1135
  }
1530
1136
  },
1531
1137
  "C014": {
1532
- "id": "C014",
1533
- "name": "Rule C014",
1534
- "description": "Auto-migrated rule C014 from ESLint mapping",
1535
- "category": "general",
1138
+ "name": "Dependency Injection Pattern",
1139
+ "description": "Use Dependency Injection instead of direct instantiation in business logic. Increases testability and reduces coupling.",
1140
+ "category": "design",
1536
1141
  "severity": "warning",
1537
- "languages": [
1538
- "typescript",
1539
- "javascript"
1540
- ],
1142
+ "languages": ["typescript", "javascript"],
1143
+ "analyzer": "./rules/common/C014_dependency_injection/analyzer.js",
1144
+ "config": "./rules/common/C014_dependency_injection/config.json",
1541
1145
  "version": "1.0.0",
1542
- "status": "migrated",
1146
+ "status": "stable",
1543
1147
  "tags": [
1544
- "migrated"
1148
+ "design",
1149
+ "dependency-injection",
1150
+ "testability",
1151
+ "coupling",
1152
+ "SOLID"
1545
1153
  ],
1154
+ "strategy": {
1155
+ "preferred": "ast",
1156
+ "fallbacks": [],
1157
+ "accuracy": {
1158
+ "ast": 95
1159
+ },
1160
+ "requirements": {
1161
+ "ast": {
1162
+ "semanticEngine": true,
1163
+ "description": "C014 requires symbol-based analysis for accurate dependency injection pattern detection"
1164
+ }
1165
+ }
1166
+ },
1546
1167
  "engineMappings": {
1547
1168
  "eslint": [
1548
1169
  "no-new",
1549
1170
  "no-new-wrappers",
1550
1171
  "@typescript-eslint/no-unnecessary-constructor"
1551
1172
  ]
1552
- },
1553
- "strategy": {
1554
- "preferred": "regex",
1555
- "fallbacks": [
1556
- "regex"
1557
- ],
1558
- "accuracy": {}
1559
1173
  }
1560
1174
  },
1561
1175
  "C017": {
@@ -1564,27 +1178,16 @@
1564
1178
  "description": "Auto-migrated rule C017 from ESLint mapping",
1565
1179
  "category": "general",
1566
1180
  "severity": "warning",
1567
- "languages": [
1568
- "typescript",
1569
- "javascript"
1570
- ],
1181
+ "languages": ["typescript", "javascript"],
1571
1182
  "version": "1.0.0",
1572
1183
  "status": "migrated",
1573
- "tags": [
1574
- "migrated"
1575
- ],
1184
+ "tags": ["migrated"],
1576
1185
  "engineMappings": {
1577
- "eslint": [
1578
- "custom/limit-constructor-logic"
1579
- ]
1186
+ "eslint": ["custom/limit-constructor-logic"]
1580
1187
  },
1581
1188
  "strategy": {
1582
1189
  "preferred": "semantic",
1583
- "fallbacks": [
1584
- "semantic",
1585
- "ast",
1586
- "regex"
1587
- ],
1190
+ "fallbacks": ["semantic", "ast", "regex"],
1588
1191
  "accuracy": {
1589
1192
  "semantic": 95,
1590
1193
  "ast": 85,
@@ -1592,87 +1195,22 @@
1592
1195
  }
1593
1196
  }
1594
1197
  },
1595
- "C018": {
1596
- "id": "C018",
1597
- "name": "Rule C018",
1598
- "description": "Auto-migrated rule C018 from ESLint mapping",
1599
- "category": "general",
1600
- "severity": "warning",
1601
- "languages": [
1602
- "typescript",
1603
- "javascript"
1604
- ],
1605
- "version": "1.0.0",
1606
- "status": "migrated",
1607
- "tags": [
1608
- "migrated"
1609
- ],
1610
- "engineMappings": {
1611
- "eslint": [
1612
- "custom/no-generic-throw"
1613
- ]
1614
- },
1615
- "strategy": {
1616
- "preferred": "regex",
1617
- "fallbacks": [
1618
- "regex"
1619
- ],
1620
- "accuracy": {}
1621
- }
1622
- },
1623
- "C023": {
1624
- "id": "C023",
1625
- "name": "Rule C023",
1626
- "description": "Auto-migrated rule C023 from ESLint mapping",
1627
- "category": "general",
1628
- "severity": "warning",
1629
- "languages": [
1630
- "typescript",
1631
- "javascript"
1632
- ],
1633
- "version": "1.0.0",
1634
- "status": "migrated",
1635
- "tags": [
1636
- "migrated"
1637
- ],
1638
- "engineMappings": {
1639
- "eslint": [
1640
- "custom/no-duplicate-variable-name-in-scope"
1641
- ]
1642
- },
1643
- "strategy": {
1644
- "preferred": "regex",
1645
- "fallbacks": [
1646
- "regex"
1647
- ],
1648
- "accuracy": {}
1649
- }
1650
- },
1651
1198
  "C030": {
1652
1199
  "id": "C030",
1653
1200
  "name": "Rule C030",
1654
1201
  "description": "Auto-migrated rule C030 from ESLint mapping",
1655
1202
  "category": "general",
1656
1203
  "severity": "warning",
1657
- "languages": [
1658
- "typescript",
1659
- "javascript"
1660
- ],
1204
+ "languages": ["typescript", "javascript"],
1661
1205
  "version": "1.0.0",
1662
1206
  "status": "migrated",
1663
- "tags": [
1664
- "migrated"
1665
- ],
1207
+ "tags": ["migrated"],
1666
1208
  "engineMappings": {
1667
- "eslint": [
1668
- "custom/use-custom-error-classes"
1669
- ]
1209
+ "eslint": ["custom/use-custom-error-classes"]
1670
1210
  },
1671
1211
  "strategy": {
1672
1212
  "preferred": "regex",
1673
- "fallbacks": [
1674
- "regex"
1675
- ],
1213
+ "fallbacks": ["regex"],
1676
1214
  "accuracy": {}
1677
1215
  }
1678
1216
  },
@@ -1682,25 +1220,16 @@
1682
1220
  "description": "Auto-migrated rule C041 from ESLint mapping",
1683
1221
  "category": "general",
1684
1222
  "severity": "warning",
1685
- "languages": [
1686
- "typescript",
1687
- "javascript"
1688
- ],
1223
+ "languages": ["typescript", "javascript"],
1689
1224
  "version": "1.0.0",
1690
1225
  "status": "migrated",
1691
- "tags": [
1692
- "migrated"
1693
- ],
1226
+ "tags": ["migrated"],
1694
1227
  "engineMappings": {
1695
- "eslint": [
1696
- "custom/no-config-inline"
1697
- ]
1228
+ "eslint": ["custom/no-config-inline"]
1698
1229
  },
1699
1230
  "strategy": {
1700
1231
  "preferred": "regex",
1701
- "fallbacks": [
1702
- "regex"
1703
- ],
1232
+ "fallbacks": ["regex"],
1704
1233
  "accuracy": {}
1705
1234
  }
1706
1235
  },
@@ -1710,25 +1239,16 @@
1710
1239
  "description": "Auto-migrated rule C042 from ESLint mapping",
1711
1240
  "category": "general",
1712
1241
  "severity": "warning",
1713
- "languages": [
1714
- "typescript",
1715
- "javascript"
1716
- ],
1242
+ "languages": ["typescript", "javascript"],
1717
1243
  "version": "1.0.0",
1718
1244
  "status": "migrated",
1719
- "tags": [
1720
- "migrated"
1721
- ],
1245
+ "tags": ["migrated"],
1722
1246
  "engineMappings": {
1723
- "eslint": [
1724
- "custom/boolean-name-prefix"
1725
- ]
1247
+ "eslint": ["custom/boolean-name-prefix"]
1726
1248
  },
1727
1249
  "strategy": {
1728
1250
  "preferred": "regex",
1729
- "fallbacks": [
1730
- "regex"
1731
- ],
1251
+ "fallbacks": ["regex"],
1732
1252
  "accuracy": {}
1733
1253
  }
1734
1254
  },
@@ -1738,58 +1258,66 @@
1738
1258
  "description": "Auto-migrated rule C047 from ESLint mapping",
1739
1259
  "category": "general",
1740
1260
  "severity": "warning",
1741
- "languages": [
1742
- "typescript",
1743
- "javascript"
1744
- ],
1261
+ "languages": ["typescript", "javascript"],
1745
1262
  "version": "1.0.0",
1746
1263
  "status": "migrated",
1747
- "tags": [
1748
- "migrated"
1749
- ],
1264
+ "tags": ["migrated"],
1750
1265
  "engineMappings": {
1751
- "eslint": [
1752
- "custom/no-duplicate-retry-logic"
1753
- ]
1266
+ "eslint": ["custom/no-duplicate-retry-logic"]
1754
1267
  },
1755
1268
  "strategy": {
1756
1269
  "preferred": "regex",
1757
- "fallbacks": [
1758
- "regex"
1759
- ],
1270
+ "fallbacks": ["regex"],
1760
1271
  "accuracy": {}
1761
1272
  }
1762
1273
  },
1274
+ "C048": {
1275
+ "name": "Do not bypass architectural layers (controller/service/repository)",
1276
+ "description": "Maintain a clear layered architecture, ensuring logic and data flow are well-structured and maintainable.",
1277
+ "category": "naming",
1278
+ "severity": "warning",
1279
+ "languages": ["typescript", "javascript", "dart", "kotlin"],
1280
+ "analyzer": "./rules/common/C048_no_bypass_architectural_layers/analyzer.js",
1281
+ "config": "./rules/common/C048_no_bypass_architectural_layers/config.json",
1282
+ "version": "1.0.0",
1283
+ "status": "stable",
1284
+ "tags": ["naming", "domain", "readability"],
1285
+ "engineMappings": {
1286
+ "eslint": ["@typescript-eslint/naming-convention", "camelcase"]
1287
+ }
1288
+ },
1289
+ "C052": {
1290
+ "name": "Parsing or data transformation logic must be separated from controllers",
1291
+ "description": "Enforce separation of concerns — controllers should only handle requests and delegate processing, improving testability, maintainability, and reuse.",
1292
+ "category": "naming",
1293
+ "severity": "warning",
1294
+ "languages": ["typescript", "javascript", "dart", "kotlin"],
1295
+ "analyzer": "./rules/common/C052_parsing_or_data_transformation/analyzer.js",
1296
+ "config": "./rules/common/C052_parsing_or_data_transformation/config.json",
1297
+ "version": "1.0.0",
1298
+ "status": "stable",
1299
+ "tags": ["naming", "domain", "readability"],
1300
+ "engineMappings": {
1301
+ "eslint": ["@typescript-eslint/naming-convention", "camelcase"]
1302
+ }
1303
+ },
1763
1304
  "C072": {
1764
1305
  "id": "C072",
1765
1306
  "name": "Single Test Behavior",
1766
1307
  "description": "Each test should assert only one behavior",
1767
1308
  "category": "testing",
1768
1309
  "severity": "warning",
1769
- "languages": [
1770
- "typescript",
1771
- "javascript"
1772
- ],
1310
+ "languages": ["typescript", "javascript"],
1773
1311
  "version": "1.0.0",
1774
1312
  "status": "stable",
1775
- "tags": [
1776
- "testing",
1777
- "unit-test",
1778
- "single-behavior"
1779
- ],
1313
+ "tags": ["testing", "unit-test", "single-behavior"],
1780
1314
  "engineMappings": {
1781
- "eslint": [
1782
- "custom/c072-one-assert-per-test"
1783
- ],
1784
- "heuristic": [
1785
- "rules/common/C072_single_test_behavior/analyzer.js"
1786
- ]
1315
+ "eslint": ["custom/c072-one-assert-per-test"],
1316
+ "heuristic": ["rules/common/C072_single_test_behavior/analyzer.js"]
1787
1317
  },
1788
1318
  "strategy": {
1789
1319
  "preferred": "regex",
1790
- "fallbacks": [
1791
- "regex"
1792
- ],
1320
+ "fallbacks": ["regex"],
1793
1321
  "accuracy": {}
1794
1322
  }
1795
1323
  },
@@ -1799,25 +1327,16 @@
1799
1327
  "description": "Auto-migrated rule C075 from ESLint mapping",
1800
1328
  "category": "general",
1801
1329
  "severity": "warning",
1802
- "languages": [
1803
- "typescript",
1804
- "javascript"
1805
- ],
1330
+ "languages": ["typescript", "javascript"],
1806
1331
  "version": "1.0.0",
1807
1332
  "status": "migrated",
1808
- "tags": [
1809
- "migrated"
1810
- ],
1333
+ "tags": ["migrated"],
1811
1334
  "engineMappings": {
1812
- "eslint": [
1813
- "custom/explicit-function-return-types"
1814
- ]
1335
+ "eslint": ["custom/explicit-function-return-types"]
1815
1336
  },
1816
1337
  "strategy": {
1817
1338
  "preferred": "regex",
1818
- "fallbacks": [
1819
- "regex"
1820
- ],
1339
+ "fallbacks": ["regex"],
1821
1340
  "accuracy": {}
1822
1341
  }
1823
1342
  },
@@ -1827,17 +1346,10 @@
1827
1346
  "description": "All public functions must declare explicit types for arguments",
1828
1347
  "category": "type-safety",
1829
1348
  "severity": "error",
1830
- "languages": [
1831
- "typescript",
1832
- "javascript"
1833
- ],
1349
+ "languages": ["typescript", "javascript"],
1834
1350
  "version": "1.0.0",
1835
1351
  "status": "stable",
1836
- "tags": [
1837
- "type-safety",
1838
- "public-api",
1839
- "explicit-types"
1840
- ],
1352
+ "tags": ["type-safety", "public-api", "explicit-types"],
1841
1353
  "engineMappings": {
1842
1354
  "heuristic": [
1843
1355
  "rules/common/C076_explicit_function_types/semantic-analyzer.js"
@@ -1845,9 +1357,7 @@
1845
1357
  },
1846
1358
  "strategy": {
1847
1359
  "preferred": "symbol",
1848
- "fallbacks": [
1849
- "symbol"
1850
- ],
1360
+ "fallbacks": ["symbol"],
1851
1361
  "accuracy": {}
1852
1362
  }
1853
1363
  },
@@ -1857,25 +1367,16 @@
1857
1367
  "description": "Auto-migrated rule T002 from ESLint mapping",
1858
1368
  "category": "typescript",
1859
1369
  "severity": "warning",
1860
- "languages": [
1861
- "typescript",
1862
- "javascript"
1863
- ],
1370
+ "languages": ["typescript", "javascript"],
1864
1371
  "version": "1.0.0",
1865
1372
  "status": "migrated",
1866
- "tags": [
1867
- "migrated"
1868
- ],
1373
+ "tags": ["migrated"],
1869
1374
  "engineMappings": {
1870
- "eslint": [
1871
- "custom/interface-prefix-i"
1872
- ]
1375
+ "eslint": ["custom/interface-prefix-i"]
1873
1376
  },
1874
1377
  "strategy": {
1875
1378
  "preferred": "regex",
1876
- "fallbacks": [
1877
- "regex"
1878
- ],
1379
+ "fallbacks": ["regex"],
1879
1380
  "accuracy": {}
1880
1381
  }
1881
1382
  },
@@ -1885,25 +1386,16 @@
1885
1386
  "description": "Auto-migrated rule T003 from ESLint mapping",
1886
1387
  "category": "typescript",
1887
1388
  "severity": "warning",
1888
- "languages": [
1889
- "typescript",
1890
- "javascript"
1891
- ],
1389
+ "languages": ["typescript", "javascript"],
1892
1390
  "version": "1.0.0",
1893
1391
  "status": "migrated",
1894
- "tags": [
1895
- "migrated"
1896
- ],
1392
+ "tags": ["migrated"],
1897
1393
  "engineMappings": {
1898
- "eslint": [
1899
- "custom/ts-ignore-reason"
1900
- ]
1394
+ "eslint": ["custom/ts-ignore-reason"]
1901
1395
  },
1902
1396
  "strategy": {
1903
1397
  "preferred": "regex",
1904
- "fallbacks": [
1905
- "regex"
1906
- ],
1398
+ "fallbacks": ["regex"],
1907
1399
  "accuracy": {}
1908
1400
  }
1909
1401
  },
@@ -1913,25 +1405,16 @@
1913
1405
  "description": "Auto-migrated rule T004 from ESLint mapping",
1914
1406
  "category": "typescript",
1915
1407
  "severity": "warning",
1916
- "languages": [
1917
- "typescript",
1918
- "javascript"
1919
- ],
1408
+ "languages": ["typescript", "javascript"],
1920
1409
  "version": "1.0.0",
1921
1410
  "status": "migrated",
1922
- "tags": [
1923
- "migrated"
1924
- ],
1411
+ "tags": ["migrated"],
1925
1412
  "engineMappings": {
1926
- "eslint": [
1927
- "custom/no-empty-type"
1928
- ]
1413
+ "eslint": ["custom/no-empty-type"]
1929
1414
  },
1930
1415
  "strategy": {
1931
1416
  "preferred": "regex",
1932
- "fallbacks": [
1933
- "regex"
1934
- ],
1417
+ "fallbacks": ["regex"],
1935
1418
  "accuracy": {}
1936
1419
  }
1937
1420
  },
@@ -1941,25 +1424,16 @@
1941
1424
  "description": "Auto-migrated rule T007 from ESLint mapping",
1942
1425
  "category": "typescript",
1943
1426
  "severity": "warning",
1944
- "languages": [
1945
- "typescript",
1946
- "javascript"
1947
- ],
1427
+ "languages": ["typescript", "javascript"],
1948
1428
  "version": "1.0.0",
1949
1429
  "status": "migrated",
1950
- "tags": [
1951
- "migrated"
1952
- ],
1430
+ "tags": ["migrated"],
1953
1431
  "engineMappings": {
1954
- "eslint": [
1955
- "custom/no-fn-in-constructor"
1956
- ]
1432
+ "eslint": ["custom/no-fn-in-constructor"]
1957
1433
  },
1958
1434
  "strategy": {
1959
1435
  "preferred": "regex",
1960
- "fallbacks": [
1961
- "regex"
1962
- ],
1436
+ "fallbacks": ["regex"],
1963
1437
  "accuracy": {}
1964
1438
  }
1965
1439
  },
@@ -1969,25 +1443,16 @@
1969
1443
  "description": "Auto-migrated rule T010 from ESLint mapping",
1970
1444
  "category": "typescript",
1971
1445
  "severity": "warning",
1972
- "languages": [
1973
- "typescript",
1974
- "javascript"
1975
- ],
1446
+ "languages": ["typescript", "javascript"],
1976
1447
  "version": "1.0.0",
1977
1448
  "status": "migrated",
1978
- "tags": [
1979
- "migrated"
1980
- ],
1449
+ "tags": ["migrated"],
1981
1450
  "engineMappings": {
1982
- "eslint": [
1983
- "custom/no-nested-union-tuple"
1984
- ]
1451
+ "eslint": ["custom/no-nested-union-tuple"]
1985
1452
  },
1986
1453
  "strategy": {
1987
1454
  "preferred": "regex",
1988
- "fallbacks": [
1989
- "regex"
1990
- ],
1455
+ "fallbacks": ["regex"],
1991
1456
  "accuracy": {}
1992
1457
  }
1993
1458
  },
@@ -1997,25 +1462,16 @@
1997
1462
  "description": "Auto-migrated rule T019 from ESLint mapping",
1998
1463
  "category": "typescript",
1999
1464
  "severity": "warning",
2000
- "languages": [
2001
- "typescript",
2002
- "javascript"
2003
- ],
1465
+ "languages": ["typescript", "javascript"],
2004
1466
  "version": "1.0.0",
2005
1467
  "status": "migrated",
2006
- "tags": [
2007
- "migrated"
2008
- ],
1468
+ "tags": ["migrated"],
2009
1469
  "engineMappings": {
2010
- "eslint": [
2011
- "custom/no-this-assign"
2012
- ]
1470
+ "eslint": ["custom/no-this-assign"]
2013
1471
  },
2014
1472
  "strategy": {
2015
1473
  "preferred": "regex",
2016
- "fallbacks": [
2017
- "regex"
2018
- ],
1474
+ "fallbacks": ["regex"],
2019
1475
  "accuracy": {}
2020
1476
  }
2021
1477
  },
@@ -2025,25 +1481,16 @@
2025
1481
  "description": "Auto-migrated rule T020 from ESLint mapping",
2026
1482
  "category": "typescript",
2027
1483
  "severity": "warning",
2028
- "languages": [
2029
- "typescript",
2030
- "javascript"
2031
- ],
1484
+ "languages": ["typescript", "javascript"],
2032
1485
  "version": "1.0.0",
2033
1486
  "status": "migrated",
2034
- "tags": [
2035
- "migrated"
2036
- ],
1487
+ "tags": ["migrated"],
2037
1488
  "engineMappings": {
2038
- "eslint": [
2039
- "custom/no-default-multi-export"
2040
- ]
1489
+ "eslint": ["custom/no-default-multi-export"]
2041
1490
  },
2042
1491
  "strategy": {
2043
1492
  "preferred": "regex",
2044
- "fallbacks": [
2045
- "regex"
2046
- ],
1493
+ "fallbacks": ["regex"],
2047
1494
  "accuracy": {}
2048
1495
  }
2049
1496
  },
@@ -2053,25 +1500,16 @@
2053
1500
  "description": "Auto-migrated rule T021 from ESLint mapping",
2054
1501
  "category": "typescript",
2055
1502
  "severity": "warning",
2056
- "languages": [
2057
- "typescript",
2058
- "javascript"
2059
- ],
1503
+ "languages": ["typescript", "javascript"],
2060
1504
  "version": "1.0.0",
2061
1505
  "status": "migrated",
2062
- "tags": [
2063
- "migrated"
2064
- ],
1506
+ "tags": ["migrated"],
2065
1507
  "engineMappings": {
2066
- "eslint": [
2067
- "custom/limit-nested-generics"
2068
- ]
1508
+ "eslint": ["custom/limit-nested-generics"]
2069
1509
  },
2070
1510
  "strategy": {
2071
1511
  "preferred": "regex",
2072
- "fallbacks": [
2073
- "regex"
2074
- ],
1512
+ "fallbacks": ["regex"],
2075
1513
  "accuracy": {}
2076
1514
  }
2077
1515
  },
@@ -2081,15 +1519,10 @@
2081
1519
  "description": "Auto-migrated rule R001 from ESLint mapping",
2082
1520
  "category": "react",
2083
1521
  "severity": "warning",
2084
- "languages": [
2085
- "typescript",
2086
- "javascript"
2087
- ],
1522
+ "languages": ["typescript", "javascript"],
2088
1523
  "version": "1.0.0",
2089
1524
  "status": "migrated",
2090
- "tags": [
2091
- "migrated"
2092
- ],
1525
+ "tags": ["migrated"],
2093
1526
  "engineMappings": {
2094
1527
  "eslint": [
2095
1528
  "react/no-this-in-sfc",
@@ -2100,9 +1533,7 @@
2100
1533
  },
2101
1534
  "strategy": {
2102
1535
  "preferred": "regex",
2103
- "fallbacks": [
2104
- "regex"
2105
- ],
1536
+ "fallbacks": ["regex"],
2106
1537
  "accuracy": {}
2107
1538
  }
2108
1539
  },
@@ -2112,15 +1543,10 @@
2112
1543
  "description": "Auto-migrated rule R002 from ESLint mapping",
2113
1544
  "category": "react",
2114
1545
  "severity": "warning",
2115
- "languages": [
2116
- "typescript",
2117
- "javascript"
2118
- ],
1546
+ "languages": ["typescript", "javascript"],
2119
1547
  "version": "1.0.0",
2120
1548
  "status": "migrated",
2121
- "tags": [
2122
- "migrated"
2123
- ],
1549
+ "tags": ["migrated"],
2124
1550
  "engineMappings": {
2125
1551
  "eslint": [
2126
1552
  "react-hooks/rules-of-hooks",
@@ -2131,9 +1557,7 @@
2131
1557
  },
2132
1558
  "strategy": {
2133
1559
  "preferred": "regex",
2134
- "fallbacks": [
2135
- "regex"
2136
- ],
1560
+ "fallbacks": ["regex"],
2137
1561
  "accuracy": {}
2138
1562
  }
2139
1563
  },
@@ -2143,15 +1567,10 @@
2143
1567
  "description": "Auto-migrated rule R003 from ESLint mapping",
2144
1568
  "category": "react",
2145
1569
  "severity": "warning",
2146
- "languages": [
2147
- "typescript",
2148
- "javascript"
2149
- ],
1570
+ "languages": ["typescript", "javascript"],
2150
1571
  "version": "1.0.0",
2151
1572
  "status": "migrated",
2152
- "tags": [
2153
- "migrated"
2154
- ],
1573
+ "tags": ["migrated"],
2155
1574
  "engineMappings": {
2156
1575
  "eslint": [
2157
1576
  "react/no-direct-mutation-state",
@@ -2161,9 +1580,7 @@
2161
1580
  },
2162
1581
  "strategy": {
2163
1582
  "preferred": "regex",
2164
- "fallbacks": [
2165
- "regex"
2166
- ],
1583
+ "fallbacks": ["regex"],
2167
1584
  "accuracy": {}
2168
1585
  }
2169
1586
  },
@@ -2173,26 +1590,16 @@
2173
1590
  "description": "Auto-migrated rule R004 from ESLint mapping",
2174
1591
  "category": "react",
2175
1592
  "severity": "warning",
2176
- "languages": [
2177
- "typescript",
2178
- "javascript"
2179
- ],
1593
+ "languages": ["typescript", "javascript"],
2180
1594
  "version": "1.0.0",
2181
1595
  "status": "migrated",
2182
- "tags": [
2183
- "migrated"
2184
- ],
1596
+ "tags": ["migrated"],
2185
1597
  "engineMappings": {
2186
- "eslint": [
2187
- "no-param-reassign",
2188
- "react/forbid-foreign-prop-types"
2189
- ]
1598
+ "eslint": ["no-param-reassign", "react/forbid-foreign-prop-types"]
2190
1599
  },
2191
1600
  "strategy": {
2192
1601
  "preferred": "regex",
2193
- "fallbacks": [
2194
- "regex"
2195
- ],
1602
+ "fallbacks": ["regex"],
2196
1603
  "accuracy": {}
2197
1604
  }
2198
1605
  },
@@ -2202,25 +1609,16 @@
2202
1609
  "description": "Auto-migrated rule R005 from ESLint mapping",
2203
1610
  "category": "react",
2204
1611
  "severity": "warning",
2205
- "languages": [
2206
- "typescript",
2207
- "javascript"
2208
- ],
1612
+ "languages": ["typescript", "javascript"],
2209
1613
  "version": "1.0.0",
2210
1614
  "status": "migrated",
2211
- "tags": [
2212
- "migrated"
2213
- ],
1615
+ "tags": ["migrated"],
2214
1616
  "engineMappings": {
2215
- "eslint": [
2216
- "react/jsx-no-bind"
2217
- ]
1617
+ "eslint": ["react/jsx-no-bind"]
2218
1618
  },
2219
1619
  "strategy": {
2220
1620
  "preferred": "regex",
2221
- "fallbacks": [
2222
- "regex"
2223
- ],
1621
+ "fallbacks": ["regex"],
2224
1622
  "accuracy": {}
2225
1623
  }
2226
1624
  },
@@ -2230,15 +1628,10 @@
2230
1628
  "description": "Auto-migrated rule R006 from ESLint mapping",
2231
1629
  "category": "react",
2232
1630
  "severity": "warning",
2233
- "languages": [
2234
- "typescript",
2235
- "javascript"
2236
- ],
1631
+ "languages": ["typescript", "javascript"],
2237
1632
  "version": "1.0.0",
2238
1633
  "status": "migrated",
2239
- "tags": [
2240
- "migrated"
2241
- ],
1634
+ "tags": ["migrated"],
2242
1635
  "engineMappings": {
2243
1636
  "eslint": [
2244
1637
  "react/jsx-pascal-case",
@@ -2248,9 +1641,7 @@
2248
1641
  },
2249
1642
  "strategy": {
2250
1643
  "preferred": "regex",
2251
- "fallbacks": [
2252
- "regex"
2253
- ],
1644
+ "fallbacks": ["regex"],
2254
1645
  "accuracy": {}
2255
1646
  }
2256
1647
  },
@@ -2260,25 +1651,16 @@
2260
1651
  "description": "Auto-migrated rule R007 from ESLint mapping",
2261
1652
  "category": "react",
2262
1653
  "severity": "warning",
2263
- "languages": [
2264
- "typescript",
2265
- "javascript"
2266
- ],
1654
+ "languages": ["typescript", "javascript"],
2267
1655
  "version": "1.0.0",
2268
1656
  "status": "migrated",
2269
- "tags": [
2270
- "migrated"
2271
- ],
1657
+ "tags": ["migrated"],
2272
1658
  "engineMappings": {
2273
- "eslint": [
2274
- "react-hooks/rules-of-hooks"
2275
- ]
1659
+ "eslint": ["react-hooks/rules-of-hooks"]
2276
1660
  },
2277
1661
  "strategy": {
2278
1662
  "preferred": "regex",
2279
- "fallbacks": [
2280
- "regex"
2281
- ],
1663
+ "fallbacks": ["regex"],
2282
1664
  "accuracy": {}
2283
1665
  }
2284
1666
  },
@@ -2288,25 +1670,16 @@
2288
1670
  "description": "Auto-migrated rule R008 from ESLint mapping",
2289
1671
  "category": "react",
2290
1672
  "severity": "warning",
2291
- "languages": [
2292
- "typescript",
2293
- "javascript"
2294
- ],
1673
+ "languages": ["typescript", "javascript"],
2295
1674
  "version": "1.0.0",
2296
1675
  "status": "migrated",
2297
- "tags": [
2298
- "migrated"
2299
- ],
1676
+ "tags": ["migrated"],
2300
1677
  "engineMappings": {
2301
- "eslint": [
2302
- "react-hooks/rules-of-hooks"
2303
- ]
1678
+ "eslint": ["react-hooks/rules-of-hooks"]
2304
1679
  },
2305
1680
  "strategy": {
2306
1681
  "preferred": "regex",
2307
- "fallbacks": [
2308
- "regex"
2309
- ],
1682
+ "fallbacks": ["regex"],
2310
1683
  "accuracy": {}
2311
1684
  }
2312
1685
  },
@@ -2316,25 +1689,16 @@
2316
1689
  "description": "Auto-migrated rule R009 from ESLint mapping",
2317
1690
  "category": "react",
2318
1691
  "severity": "warning",
2319
- "languages": [
2320
- "typescript",
2321
- "javascript"
2322
- ],
1692
+ "languages": ["typescript", "javascript"],
2323
1693
  "version": "1.0.0",
2324
1694
  "status": "migrated",
2325
- "tags": [
2326
- "migrated"
2327
- ],
1695
+ "tags": ["migrated"],
2328
1696
  "engineMappings": {
2329
- "eslint": [
2330
- "react-hooks/rules-of-hooks"
2331
- ]
1697
+ "eslint": ["react-hooks/rules-of-hooks"]
2332
1698
  },
2333
1699
  "strategy": {
2334
1700
  "preferred": "regex",
2335
- "fallbacks": [
2336
- "regex"
2337
- ],
1701
+ "fallbacks": ["regex"],
2338
1702
  "accuracy": {}
2339
1703
  }
2340
1704
  }
@@ -2353,6 +1717,7 @@
2353
1717
  "C017",
2354
1718
  "C018",
2355
1719
  "C023",
1720
+ "C024",
2356
1721
  "C029",
2357
1722
  "C030",
2358
1723
  "C035",
@@ -2360,6 +1725,8 @@
2360
1725
  "C042",
2361
1726
  "C043",
2362
1727
  "C047",
1728
+ "C048",
1729
+ "C052",
2363
1730
  "C072",
2364
1731
  "C075",
2365
1732
  "T002",
@@ -2409,6 +1776,8 @@
2409
1776
  "S027",
2410
1777
  "S029",
2411
1778
  "S030",
1779
+ "S031",
1780
+ "S032",
2412
1781
  "S033",
2413
1782
  "S034",
2414
1783
  "S035",
@@ -2436,46 +1805,31 @@
2436
1805
  "logging": {
2437
1806
  "name": "Logging Standards",
2438
1807
  "description": "Rules related to logging practices",
2439
- "rules": [
2440
- "C019",
2441
- "S057"
2442
- ],
1808
+ "rules": ["C019", "S057"],
2443
1809
  "severity": "warning"
2444
1810
  },
2445
1811
  "naming": {
2446
1812
  "name": "Naming Conventions",
2447
1813
  "description": "Rules for consistent naming patterns",
2448
- "rules": [
2449
- "C006"
2450
- ],
1814
+ "rules": ["C006"],
2451
1815
  "severity": "warning"
2452
1816
  },
2453
1817
  "design": {
2454
1818
  "name": "Design Principles",
2455
1819
  "description": "Rules for software design best practices",
2456
- "rules": [
2457
- "C006"
2458
- ],
1820
+ "rules": ["C006"],
2459
1821
  "severity": "warning"
2460
1822
  },
2461
1823
  "validation": {
2462
1824
  "name": "Data Validation",
2463
1825
  "description": "Rules for proper data validation practices",
2464
- "rules": [
2465
- "C031",
2466
- "S018",
2467
- "S025",
2468
- "S026"
2469
- ],
1826
+ "rules": ["C031", "S018", "S025", "S026"],
2470
1827
  "severity": "error"
2471
1828
  },
2472
1829
  "architecture": {
2473
1830
  "name": "Architecture Guidelines",
2474
1831
  "description": "Rules for system architecture best practices",
2475
- "rules": [
2476
- "C014",
2477
- "C033"
2478
- ],
1832
+ "rules": ["C014", "C033"],
2479
1833
  "severity": "error"
2480
1834
  }
2481
1835
  },
@@ -2512,44 +1866,33 @@
2512
1866
  },
2513
1867
  "languages": {
2514
1868
  "typescript": {
2515
- "extensions": [
2516
- ".ts",
2517
- ".tsx"
2518
- ],
1869
+ "extensions": [".ts", ".tsx"],
2519
1870
  "analyzer": "ast",
2520
1871
  "parser": "@typescript-eslint/parser"
2521
1872
  },
2522
1873
  "javascript": {
2523
- "extensions": [
2524
- ".js",
2525
- ".jsx"
2526
- ],
1874
+ "extensions": [".js", ".jsx"],
2527
1875
  "analyzer": "ast",
2528
1876
  "parser": "@typescript-eslint/parser"
2529
1877
  },
2530
1878
  "dart": {
2531
- "extensions": [
2532
- ".dart"
2533
- ],
1879
+ "extensions": [".dart"],
2534
1880
  "analyzer": "pattern",
2535
1881
  "parser": "regex"
2536
1882
  },
2537
1883
  "kotlin": {
2538
- "extensions": [
2539
- ".kt",
2540
- ".kts"
2541
- ],
1884
+ "extensions": [".kt", ".kts"],
2542
1885
  "analyzer": "ast",
2543
1886
  "parser": "kotlin-parser"
2544
1887
  }
2545
1888
  },
2546
1889
  "metadata": {
2547
- "version": "1.1.6",
2548
- "lastUpdated": "2025-07-24",
2549
- "totalRules": 44,
1890
+ "version": "1.1.7",
1891
+ "lastUpdated": "2025-08-25",
1892
+ "totalRules": 97,
2550
1893
  "qualityRules": 33,
2551
- "securityRules": 47,
2552
- "stableRules": 43,
1894
+ "securityRules": 49,
1895
+ "stableRules": 45,
2553
1896
  "experimentalRules": 1,
2554
1897
  "supportedLanguages": 4,
2555
1898
  "features": [
@@ -2558,7 +1901,9 @@
2558
1901
  "Dynamic rule configuration",
2559
1902
  "ESLint 9.x integration",
2560
1903
  "React rules integration",
2561
- "Memory leak fixes"
2562
- ]
1904
+ "Memory leak fixes",
1905
+ "S032 HttpOnly session cookies"
1906
+ ],
1907
+ "consolidatedFrom": "/Users/bach.ngoc.hoai/Docs/ee/coding-quality/extensions/sunlint/config/rules/rules-registry.json"
2563
1908
  }
2564
- }
1909
+ }