@sun-asterisk/sunlint 1.2.1 → 1.3.0

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 (109) hide show
  1. package/CHANGELOG.md +40 -1
  2. package/CONTRIBUTING.md +533 -70
  3. package/README.md +16 -2
  4. package/config/engines/engines-enhanced.json +86 -0
  5. package/config/engines/semantic-config.json +114 -0
  6. package/config/eslint-rule-mapping.json +50 -38
  7. package/config/rule-analysis-strategies.js +18 -2
  8. package/config/rules/enhanced-rules-registry.json +2503 -0
  9. package/config/rules/rules-registry-generated.json +785 -837
  10. package/core/adapters/sunlint-rule-adapter.js +25 -30
  11. package/core/analysis-orchestrator.js +42 -2
  12. package/core/categories.js +52 -0
  13. package/core/category-constants.js +39 -0
  14. package/core/cli-action-handler.js +32 -5
  15. package/core/config-manager.js +111 -0
  16. package/core/config-merger.js +61 -0
  17. package/core/constants/categories.js +168 -0
  18. package/core/constants/defaults.js +165 -0
  19. package/core/constants/engines.js +185 -0
  20. package/core/constants/index.js +30 -0
  21. package/core/constants/rules.js +215 -0
  22. package/core/file-targeting-service.js +128 -7
  23. package/core/interfaces/rule-plugin.interface.js +207 -0
  24. package/core/plugin-manager.js +448 -0
  25. package/core/rule-selection-service.js +42 -15
  26. package/core/semantic-engine.js +560 -0
  27. package/core/semantic-rule-base.js +433 -0
  28. package/core/unified-rule-registry.js +484 -0
  29. package/docs/CONSTANTS-ARCHITECTURE.md +288 -0
  30. package/engines/core/base-engine.js +249 -0
  31. package/engines/engine-factory.js +275 -0
  32. package/engines/eslint-engine.js +180 -30
  33. package/engines/heuristic-engine.js +513 -56
  34. package/integrations/eslint/plugin/index.js +27 -27
  35. package/package.json +11 -6
  36. package/rules/README.md +252 -0
  37. package/rules/common/C002_no_duplicate_code/analyzer.js +65 -0
  38. package/rules/common/C002_no_duplicate_code/config.json +23 -0
  39. package/rules/common/C003_no_vague_abbreviations/analyzer.js +418 -0
  40. package/rules/common/C003_no_vague_abbreviations/config.json +35 -0
  41. package/rules/common/C006_function_naming/analyzer.js +504 -0
  42. package/rules/common/C006_function_naming/config.json +86 -0
  43. package/rules/common/C006_function_naming/smart-analyzer.js +503 -0
  44. package/rules/common/C010_limit_block_nesting/analyzer.js +389 -0
  45. package/rules/common/C012_command_query_separation/analyzer.js +481 -0
  46. package/rules/common/C012_command_query_separation/ast-analyzer.js +495 -0
  47. package/rules/common/C013_no_dead_code/analyzer.js +206 -0
  48. package/rules/common/C014_dependency_injection/analyzer.js +338 -0
  49. package/rules/common/C017_constructor_logic/analyzer.js +314 -0
  50. package/rules/common/C019_log_level_usage/analyzer.js +362 -0
  51. package/rules/common/C019_log_level_usage/config.json +121 -0
  52. package/rules/common/C029_catch_block_logging/analyzer-smart-pipeline.js +755 -0
  53. package/rules/common/C029_catch_block_logging/analyzer.js +141 -0
  54. package/rules/common/C029_catch_block_logging/config.json +59 -0
  55. package/rules/common/C031_validation_separation/analyzer.js +186 -0
  56. package/rules/common/C041_no_sensitive_hardcode/analyzer.js +292 -0
  57. package/rules/common/C041_no_sensitive_hardcode/ast-analyzer.js +296 -0
  58. package/rules/common/C042_boolean_name_prefix/analyzer.js +300 -0
  59. package/rules/common/C043_no_console_or_print/analyzer.js +431 -0
  60. package/rules/common/C047_no_duplicate_retry_logic/analyzer.js +590 -0
  61. package/rules/common/C047_no_duplicate_retry_logic/c047-semantic-rule.js +278 -0
  62. package/rules/common/C047_no_duplicate_retry_logic/symbol-analyzer-enhanced.js +968 -0
  63. package/rules/common/C047_no_duplicate_retry_logic/symbol-config.json +71 -0
  64. package/rules/common/C075_explicit_return_types/analyzer.js +103 -0
  65. package/rules/common/C076_single_test_behavior/analyzer.js +121 -0
  66. package/rules/docs/C002_no_duplicate_code.md +57 -0
  67. package/rules/docs/C031_validation_separation.md +72 -0
  68. package/rules/index.js +162 -0
  69. package/rules/migration/converter.js +385 -0
  70. package/rules/migration/mapping.json +164 -0
  71. package/rules/parser/constants.js +31 -0
  72. package/rules/parser/file-config.js +80 -0
  73. package/rules/parser/rule-parser-simple.js +305 -0
  74. package/rules/parser/rule-parser.js +527 -0
  75. package/rules/security/S015_insecure_tls_certificate/analyzer.js +150 -0
  76. package/rules/security/S015_insecure_tls_certificate/ast-analyzer.js +237 -0
  77. package/rules/security/S023_no_json_injection/analyzer.js +278 -0
  78. package/rules/security/S023_no_json_injection/ast-analyzer.js +359 -0
  79. package/rules/security/S026_json_schema_validation/analyzer.js +251 -0
  80. package/rules/security/S026_json_schema_validation/config.json +27 -0
  81. package/rules/security/S027_no_hardcoded_secrets/analyzer.js +436 -0
  82. package/rules/security/S027_no_hardcoded_secrets/config.json +29 -0
  83. package/rules/security/S029_csrf_protection/analyzer.js +330 -0
  84. package/rules/tests/C002_no_duplicate_code.test.js +50 -0
  85. package/rules/utils/ast-utils.js +191 -0
  86. package/rules/utils/base-analyzer.js +98 -0
  87. package/rules/utils/pattern-matchers.js +239 -0
  88. package/rules/utils/rule-helpers.js +264 -0
  89. package/rules/utils/severity-constants.js +93 -0
  90. package/scripts/category-manager.js +150 -0
  91. package/scripts/generate-rules-registry.js +88 -0
  92. package/scripts/generate_insights.js +188 -0
  93. package/scripts/migrate-rule-registry.js +157 -0
  94. package/scripts/validate-system.js +48 -0
  95. package/.sunlint.json +0 -35
  96. package/config/README.md +0 -88
  97. package/config/engines/eslint-rule-mapping.json +0 -74
  98. package/config/testing/test-s005-working.ts +0 -22
  99. package/engines/tree-sitter-parser.js +0 -0
  100. package/engines/universal-ast-engine.js +0 -0
  101. package/scripts/merge-reports.js +0 -424
  102. package/scripts/test-scripts/README.md +0 -22
  103. package/scripts/test-scripts/test-c041-comparison.js +0 -114
  104. package/scripts/test-scripts/test-c041-eslint.js +0 -67
  105. package/scripts/test-scripts/test-eslint-rules.js +0 -146
  106. package/scripts/test-scripts/test-real-world.js +0 -44
  107. package/scripts/test-scripts/test-rules-on-real-projects.js +0 -86
  108. /package/{config/schemas/sunlint-schema.json → rules/universal/C010/generic.js} +0 -0
  109. /package/{core/multi-rule-runner.js → rules/universal/C010/tree-sitter-analyzer.js} +0 -0
package/README.md CHANGED
@@ -87,10 +87,17 @@ For advanced TypeScript analysis with ESLint integration:
87
87
  npm install --save-dev @sun-asterisk/sunlint eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin typescript
88
88
  ```
89
89
 
90
+ ### **Full ESLint Integration Support**
91
+ For complete ESLint integration with import analysis:
92
+
93
+ ```bash
94
+ npm install --save-dev @sun-asterisk/sunlint eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-import typescript
95
+ ```
96
+
90
97
  ### **What's Included by Default**
91
98
  - ✅ **JavaScript Analysis**: High-accuracy AST analysis out of the box
92
99
  - ✅ **Basic TypeScript**: Works with built-in Babel parser
93
- - ✅ **97+ Rules**: All quality and security rules available
100
+ - ✅ **256+ Rules**: All quality and security rules available
94
101
  - ✅ **Heuristic Engine**: Pattern-based analysis for all languages
95
102
 
96
103
  ### **Optional Dependencies (Install as needed)**
@@ -98,16 +105,22 @@ npm install --save-dev @sun-asterisk/sunlint eslint @typescript-eslint/parser @t
98
105
  # For ESLint engine integration
99
106
  npm install eslint --save-dev
100
107
 
108
+ # For import/module analysis (recommended with ESLint)
109
+ npm install eslint-plugin-import --save-dev
110
+
101
111
  # For enhanced TypeScript analysis
102
112
  npm install @typescript-eslint/parser @typescript-eslint/eslint-plugin --save-dev
103
113
 
104
114
  # For TypeScript compiler integration
105
115
  npm install typescript --save-dev
116
+
117
+ # For import/module analysis (recommended)
118
+ npm install eslint-plugin-import --save-dev
106
119
  ```
107
120
 
108
121
  **Quick setup for TypeScript projects:**
109
122
  ```bash
110
- npm install --save-dev @sun-asterisk/sunlint eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin typescript
123
+ npm install --save-dev @sun-asterisk/sunlint eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-import typescript
111
124
  ```
112
125
 
113
126
  > 💡 **Note**: SunLint gracefully handles missing dependencies. Install only what your project needs. See [docs/DEPENDENCIES.md](docs/DEPENDENCIES.md) for detailed guidance.
@@ -135,6 +148,7 @@ npm install --save-dev @sun-asterisk/sunlint eslint @typescript-eslint/parser @t
135
148
  "eslint": "^8.50.0",
136
149
  "@typescript-eslint/parser": "^7.2.0",
137
150
  "@typescript-eslint/eslint-plugin": "^7.18.0",
151
+ "eslint-plugin-import": "^2.32.0",
138
152
  "typescript": "^5.0.0"
139
153
  }
140
154
  }
@@ -0,0 +1,86 @@
1
+ {
2
+ "semantic-engine": {
3
+ "enabled": true,
4
+ "description": "TypeScript/JavaScript semantic analysis engine using ts-morph",
5
+ "features": [
6
+ "cross-file-analysis",
7
+ "symbol-table-caching",
8
+ "type-checking",
9
+ "semantic-rule-support"
10
+ ],
11
+ "configPath": "config/engines/semantic-config.json",
12
+ "dependencies": {
13
+ "required": [],
14
+ "optional": ["ts-morph"]
15
+ },
16
+ "performance": {
17
+ "enableCaching": true,
18
+ "maxCacheSize": 100,
19
+ "memoryLimit": "500MB",
20
+ "timeout": 30000
21
+ },
22
+ "rules": {
23
+ "classification": {
24
+ "semantic": ["C047", "C029", "C031", "C048", "C050"],
25
+ "hybrid": ["C019", "C035"]
26
+ },
27
+ "autoDetect": true
28
+ }
29
+ },
30
+ "eslint": {
31
+ "enabled": true,
32
+ "description": "ESLint integration for JavaScript/TypeScript linting",
33
+ "features": [
34
+ "syntax-checking",
35
+ "style-enforcement",
36
+ "best-practices",
37
+ "custom-rules"
38
+ ],
39
+ "configPath": "config/engines/eslint-config.json",
40
+ "dependencies": {
41
+ "required": ["eslint"],
42
+ "optional": ["@typescript-eslint/parser", "@typescript-eslint/eslint-plugin"]
43
+ }
44
+ },
45
+ "heuristic": {
46
+ "enabled": true,
47
+ "description": "Enhanced pattern-based analysis with AST and semantic capabilities",
48
+ "features": [
49
+ "pattern-matching",
50
+ "ast-analysis",
51
+ "semantic-analysis",
52
+ "multi-language-support",
53
+ "rule-classification"
54
+ ],
55
+ "configPath": "config/engines/heuristic-config.json",
56
+ "dependencies": {
57
+ "required": [],
58
+ "optional": ["tree-sitter", "ts-morph"]
59
+ },
60
+ "modes": {
61
+ "traditional": {
62
+ "description": "Pattern + AST analysis only",
63
+ "semantic": false
64
+ },
65
+ "semantic": {
66
+ "description": "Pattern + AST + semantic analysis",
67
+ "semantic": true,
68
+ "requires": ["semantic-engine"]
69
+ }
70
+ }
71
+ },
72
+ "openai": {
73
+ "enabled": true,
74
+ "description": "AI-powered code analysis using OpenAI API",
75
+ "features": [
76
+ "context-aware-analysis",
77
+ "natural-language-descriptions",
78
+ "intelligent-suggestions"
79
+ ],
80
+ "configPath": "config/engines/openai-config.json",
81
+ "dependencies": {
82
+ "required": ["openai"],
83
+ "optional": []
84
+ }
85
+ }
86
+ }
@@ -0,0 +1,114 @@
1
+ {
2
+ "semantic-engine": {
3
+ "compilerOptions": {
4
+ "target": "ES2020",
5
+ "module": "commonjs",
6
+ "lib": ["ES2020", "DOM"],
7
+ "allowJs": true,
8
+ "checkJs": false,
9
+ "skipLibCheck": true,
10
+ "skipDefaultLibCheck": true,
11
+ "moduleResolution": "node",
12
+ "esModuleInterop": true,
13
+ "allowSyntheticDefaultImports": true,
14
+ "strict": false,
15
+ "noImplicitAny": false
16
+ },
17
+
18
+ "performance": {
19
+ "enableCaching": true,
20
+ "maxCacheSize": 100,
21
+ "memoryLimit": 524288000,
22
+ "timeout": 30000,
23
+ "crossFileAnalysis": true,
24
+ "enableTypeChecker": false
25
+ },
26
+
27
+ "fileDiscovery": {
28
+ "patterns": [
29
+ "**/*.ts",
30
+ "**/*.tsx",
31
+ "**/*.js",
32
+ "**/*.jsx"
33
+ ],
34
+ "excludePatterns": [
35
+ "**/node_modules/**",
36
+ "**/dist/**",
37
+ "**/build/**",
38
+ "**/.git/**",
39
+ "**/coverage/**",
40
+ "**/*.test.{ts,tsx,js,jsx}",
41
+ "**/*.spec.{ts,tsx,js,jsx}"
42
+ ],
43
+ "maxFiles": 1000
44
+ },
45
+
46
+ "symbolTable": {
47
+ "extractImports": true,
48
+ "extractExports": true,
49
+ "extractFunctions": true,
50
+ "extractClasses": true,
51
+ "extractInterfaces": true,
52
+ "extractVariables": true,
53
+ "extractConstants": true,
54
+ "extractHooks": true,
55
+ "extractComponents": true,
56
+ "extractFunctionCalls": true,
57
+ "extractMethodCalls": true,
58
+ "crossFileReferences": true
59
+ },
60
+
61
+ "rules": {
62
+ "C047": {
63
+ "enabled": true,
64
+ "crossFileAnalysis": true,
65
+ "retryPatterns": [
66
+ "retry",
67
+ "retries",
68
+ "withRetry",
69
+ "retryWhen",
70
+ "attempt"
71
+ ],
72
+ "queryHooks": [
73
+ "useQuery",
74
+ "useMutation",
75
+ "useInfiniteQuery",
76
+ "useSuspenseQuery"
77
+ ],
78
+ "contextAnalysis": {
79
+ "nearbyLines": 10,
80
+ "parentContext": true
81
+ }
82
+ },
83
+
84
+ "C029": {
85
+ "enabled": false,
86
+ "crossFileAnalysis": true,
87
+ "description": "Future semantic rule for component lifecycle"
88
+ },
89
+
90
+ "C031": {
91
+ "enabled": false,
92
+ "crossFileAnalysis": true,
93
+ "description": "Future semantic rule for state management"
94
+ }
95
+ },
96
+
97
+ "optimization": {
98
+ "incrementalAnalysis": true,
99
+ "watchMode": false,
100
+ "parallelProcessing": false,
101
+ "memoryCleanup": {
102
+ "interval": 60000,
103
+ "threshold": 0.8
104
+ }
105
+ },
106
+
107
+ "debugging": {
108
+ "enableVerboseLogging": false,
109
+ "logSymbolTable": false,
110
+ "logPerformanceMetrics": true,
111
+ "outputStatsFile": false
112
+ }
113
+ }
114
+ }
@@ -3,8 +3,8 @@
3
3
  "version": "1.0.0",
4
4
  "stats": {
5
5
  "commonRulesTotal": 76,
6
- "commonRulesImplemented": 19,
7
- "commonRulesMissing": 57,
6
+ "commonRulesImplemented": 27,
7
+ "commonRulesMissing": 49,
8
8
  "securityRulesTotal": 59,
9
9
  "securityRulesImplemented": 43,
10
10
  "securityRulesMissing": 16,
@@ -12,46 +12,58 @@
12
12
  "typescriptRulesImplemented": 8
13
13
  },
14
14
  "missingCommonRules": [
15
- "C001", "C004", "C005", "C007", "C008", "C009", "C011", "C012", "C015", "C016",
16
- "C019", "C020", "C021", "C022", "C024", "C025", "C026", "C027", "C028", "C031",
17
- "C032", "C033", "C034", "C036", "C037", "C038", "C039", "C040", "C044", "C045",
18
- "C046", "C048", "C049", "C050", "C051", "C052", "C053", "C054", "C055", "C056",
19
- "C057", "C058", "C059", "C060", "C061", "C062", "C063", "C064", "C065", "C066",
20
- "C067", "C068", "C069", "C070", "C071", "C073", "C074"
15
+ "C001", "C004", "C008", "C009", "C011", "C016",
16
+ "C020", "C021", "C022", "C024", "C025", "C026", "C027", "C028", "C036",
17
+ "C039", "C044", "C045", "C046", "C048", "C049", "C050", "C051", "C052",
18
+ "C053", "C054", "C055", "C056", "C057", "C058", "C059", "C060", "C061",
19
+ "C062", "C063", "C064", "C065", "C066", "C067", "C068", "C069", "C070",
20
+ "C071", "C073", "C074"
21
21
  ],
22
22
  "missingSecurityRules": [
23
23
  "S004", "S021", "S024", "S028", "S031", "S032", "S040", "S049", "S051", "S053",
24
24
  "S056", "S059", "S060", "S061", "S062", "S063"
25
25
  ],
26
26
  "mappings": {
27
- "C002": ["custom/no-duplicate-code"],
28
- "C003": ["custom/no-vague-abbreviations"],
29
- "C006": ["custom/function-name-verb-noun"],
30
- "C010": ["custom/limit-block-nesting"],
31
- "C013": ["custom/no-dead-code"],
32
- "C014": ["custom/abstract-dependency-preferred"],
33
- "C017": ["custom/limit-constructor-logic"],
34
- "C018": ["custom/no-generic-throw"],
35
- "C023": ["custom/no-duplicate-variable-name-in-scope"],
36
- "C029": ["custom/catch-block-logging"],
37
- "C030": ["custom/use-custom-error-classes"],
38
- "C035": ["custom/no-empty-catch"],
39
- "C041": ["custom/no-config-inline"],
40
- "C042": ["custom/boolean-name-prefix"],
41
- "C043": ["custom/no-console-or-print"],
42
- "C047": ["custom/no-duplicate-retry-logic"],
43
- "C072": ["custom/one-assert-per-test"],
44
- "C075": ["custom/explicit-function-return-types"],
45
- "C076": ["custom/single-behavior-per-test"],
27
+ "C002": ["custom/c002-no-duplicate-code"],
28
+ "C003": ["custom/c003-no-vague-abbreviations"],
29
+ "C005": ["max-statements-per-line", "complexity"],
30
+ "C006": ["custom/c006-function-name-verb-noun"],
31
+ "C007": ["spaced-comment", "no-inline-comments", "no-warning-comments"],
32
+ "C010": ["custom/c010-limit-block-nesting"],
33
+ "C012": ["consistent-return", "no-void", "@typescript-eslint/no-confusing-void-expression"],
34
+ "C013": ["custom/c013-no-dead-code"],
35
+ "C014": ["custom/c014-abstract-dependency-preferred"],
36
+ "C015": ["@typescript-eslint/naming-convention", "camelcase"],
37
+ "C017": ["custom/c017-limit-constructor-logic"],
38
+ "C018": ["custom/c018-no-generic-throw"],
39
+ "C019": ["no-console", "no-alert", "no-debugger"],
40
+ "C023": ["custom/c023-no-duplicate-variable-name-in-scope"],
41
+ "C029": ["custom/c029-catch-block-logging"],
42
+ "C030": ["custom/c030-use-custom-error-classes"],
43
+ "C031": ["no-implicit-coercion", "eqeqeq"],
44
+ "C032": ["no-new", "no-constructor-return"],
45
+ "C033": ["prefer-const", "no-var"],
46
+ "C034": ["no-global-assign", "no-implicit-globals", "@typescript-eslint/no-namespace"],
47
+ "C035": ["custom/c035-no-empty-catch"],
48
+ "C037": ["consistent-return", "@typescript-eslint/explicit-function-return-type", "@typescript-eslint/explicit-module-boundary-types"],
49
+ "C038": ["import/no-dynamic-require", "import/order", "@typescript-eslint/no-var-requires"],
50
+ "C040": ["no-duplicate-imports", "import/no-duplicates"],
51
+ "C041": ["custom/c041-no-config-inline"],
52
+ "C042": ["custom/c042-boolean-name-prefix"],
53
+ "C043": ["custom/c043-no-console-or-print"],
54
+ "C047": ["custom/c047-no-duplicate-retry-logic"],
55
+ "C072": ["custom/c072-one-assert-per-test"],
56
+ "C075": ["custom/c075-explicit-function-return-types"],
57
+ "C076": ["custom/c076-single-behavior-per-test"],
46
58
 
47
- "T002": ["custom/interface-prefix-i"],
48
- "T003": ["custom/ts-ignore-reason"],
49
- "T004": ["custom/no-empty-type"],
50
- "T007": ["custom/no-fn-in-constructor"],
51
- "T010": ["custom/no-nested-union-tuple"],
52
- "T019": ["custom/no-this-assign"],
53
- "T020": ["custom/no-default-multi-export"],
54
- "T021": ["custom/limit-nested-generics"],
59
+ "T002": ["custom/t002-interface-prefix-i"],
60
+ "T003": ["custom/t003-ts-ignore-reason"],
61
+ "T004": ["custom/t004-no-empty-type"],
62
+ "T007": ["custom/t007-no-fn-in-constructor"],
63
+ "T010": ["custom/t010-no-nested-union-tuple"],
64
+ "T019": ["custom/t019-no-this-assign"],
65
+ "T020": ["custom/t020-no-default-multi-export"],
66
+ "T021": ["custom/t021-limit-nested-generics"],
55
67
 
56
68
  "S001": ["custom/s001-fail-securely"],
57
69
  "S002": ["custom/s002-idor-check"],
@@ -114,9 +126,9 @@
114
126
 
115
127
  "implementationTodo": {
116
128
  "commonRules": {
117
- "priority1": ["C001", "C004", "C005", "C007", "C008", "C009", "C011", "C012"],
118
- "priority2": ["C015", "C016", "C019", "C020", "C021", "C022", "C024", "C025"],
119
- "priority3": ["C026", "C027", "C028", "C031", "C032", "C033", "C034", "C036"]
129
+ "priority1": ["C001", "C004", "C008", "C009", "C011"],
130
+ "priority2": ["C016", "C020", "C021", "C022", "C024", "C025"],
131
+ "priority3": ["C026", "C027", "C028", "C036", "C039", "C044", "C045", "C046"]
120
132
  },
121
133
  "securityRules": {
122
134
  "needImplementation": ["S004", "S021", "S024", "S028", "S031", "S032", "S040"],
@@ -12,9 +12,9 @@ module.exports = {
12
12
  accuracy: { ast: 95, regex: 75 }
13
13
  },
14
14
  'C012': {
15
- reason: 'Cyclomatic complexity needs control flow analysis',
15
+ reason: 'Command Query Separation requires function behavior analysis',
16
16
  methods: ['ast', 'regex'],
17
- accuracy: { ast: 90, regex: 60 }
17
+ accuracy: { ast: 95, regex: 80 }
18
18
  },
19
19
  'C015': {
20
20
  reason: 'Function parameter counting benefits from AST',
@@ -25,6 +25,16 @@ module.exports = {
25
25
  reason: 'Constructor logic analysis needs AST context',
26
26
  methods: ['ast', 'regex'],
27
27
  accuracy: { ast: 90, regex: 70 }
28
+ },
29
+ 'S015': {
30
+ reason: 'TLS certificate validation requires AST context analysis',
31
+ methods: ['ast', 'regex'],
32
+ accuracy: { ast: 95, regex: 80 }
33
+ },
34
+ 'S023': {
35
+ reason: 'JSON injection detection requires AST context analysis',
36
+ methods: ['ast', 'regex'],
37
+ accuracy: { ast: 95, regex: 60 }
28
38
  }
29
39
  },
30
40
 
@@ -55,6 +65,12 @@ module.exports = {
55
65
  strategy: 'ast-primary-regex-fallback',
56
66
  accuracy: { ast: 90, regex: 75, combined: 95 }
57
67
  },
68
+ 'C041': {
69
+ reason: 'Hardcoded secrets need AST literal analysis like ESLint',
70
+ methods: ['ast', 'regex'],
71
+ strategy: 'ast-primary-regex-fallback',
72
+ accuracy: { ast: 95, regex: 70, combined: 95 }
73
+ },
58
74
  'C047': {
59
75
  reason: 'Retry logic detection needs pattern + structure',
60
76
  methods: ['regex', 'ast'],