@sfdxy/mule-lint 1.18.1 → 1.19.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 (230) hide show
  1. package/README.md +154 -150
  2. package/dist/bin/mule-lint-mcp.js.map +1 -1
  3. package/dist/bin/mule-lint.js +2 -2
  4. package/dist/bin/mule-lint.js.map +1 -1
  5. package/dist/package.json +26 -15
  6. package/dist/src/core/ComplexityCalculator.d.ts.map +1 -1
  7. package/dist/src/core/ComplexityCalculator.js.map +1 -1
  8. package/dist/src/core/FileScanner.d.ts.map +1 -1
  9. package/dist/src/core/FileScanner.js.map +1 -1
  10. package/dist/src/core/MetricsAggregator.d.ts.map +1 -1
  11. package/dist/src/core/MetricsAggregator.js +1 -1
  12. package/dist/src/core/MetricsAggregator.js.map +1 -1
  13. package/dist/src/core/MetricsCollector.d.ts.map +1 -1
  14. package/dist/src/core/MetricsCollector.js +1 -2
  15. package/dist/src/core/MetricsCollector.js.map +1 -1
  16. package/dist/src/core/QualityGateEvaluator.d.ts.map +1 -1
  17. package/dist/src/core/QualityGateEvaluator.js.map +1 -1
  18. package/dist/src/core/XPathHelper.d.ts.map +1 -1
  19. package/dist/src/core/XPathHelper.js +0 -1
  20. package/dist/src/core/XPathHelper.js.map +1 -1
  21. package/dist/src/core/XmlParser.d.ts.map +1 -1
  22. package/dist/src/core/XmlParser.js.map +1 -1
  23. package/dist/src/core/YamlParser.d.ts.map +1 -1
  24. package/dist/src/core/YamlParser.js.map +1 -1
  25. package/dist/src/core/errors.js.map +1 -1
  26. package/dist/src/engine/LintEngine.d.ts.map +1 -1
  27. package/dist/src/engine/LintEngine.js.map +1 -1
  28. package/dist/src/formatter/MuleXmlFormatter.d.ts.map +1 -1
  29. package/dist/src/formatter/MuleXmlFormatter.js +7 -1
  30. package/dist/src/formatter/MuleXmlFormatter.js.map +1 -1
  31. package/dist/src/formatter/index.d.ts +2 -2
  32. package/dist/src/formatter/index.d.ts.map +1 -1
  33. package/dist/src/formatter/index.js.map +1 -1
  34. package/dist/src/formatters/CsvFormatter.js.map +1 -1
  35. package/dist/src/formatters/HtmlFormatter.js +0 -1
  36. package/dist/src/formatters/HtmlFormatter.js.map +1 -1
  37. package/dist/src/formatters/JsonFormatter.d.ts.map +1 -1
  38. package/dist/src/formatters/JsonFormatter.js.map +1 -1
  39. package/dist/src/formatters/SarifFormatter.js.map +1 -1
  40. package/dist/src/formatters/TableFormatter.js.map +1 -1
  41. package/dist/src/formatters/html/components/Icons.js +1 -1
  42. package/dist/src/formatters/html/components/Icons.js.map +1 -1
  43. package/dist/src/formatters/html/components/MetricCard.d.ts.map +1 -1
  44. package/dist/src/formatters/html/components/MetricCard.js.map +1 -1
  45. package/dist/src/formatters/html/components/Modal.d.ts.map +1 -1
  46. package/dist/src/formatters/html/components/Modal.js.map +1 -1
  47. package/dist/src/formatters/html/components/RatingBadge.d.ts.map +1 -1
  48. package/dist/src/formatters/html/components/RatingBadge.js +6 -6
  49. package/dist/src/formatters/html/components/RatingBadge.js.map +1 -1
  50. package/dist/src/formatters/html/index.d.ts +2 -2
  51. package/dist/src/formatters/html/index.d.ts.map +1 -1
  52. package/dist/src/formatters/html/index.js.map +1 -1
  53. package/dist/src/formatters/html/scripts/charts.d.ts.map +1 -1
  54. package/dist/src/formatters/html/scripts/charts.js +45 -12
  55. package/dist/src/formatters/html/scripts/charts.js.map +1 -1
  56. package/dist/src/formatters/html/scripts/index.d.ts.map +1 -1
  57. package/dist/src/formatters/html/scripts/index.js.map +1 -1
  58. package/dist/src/formatters/html/scripts/renderer.d.ts.map +1 -1
  59. package/dist/src/formatters/html/scripts/renderer.js +175 -35
  60. package/dist/src/formatters/html/scripts/renderer.js.map +1 -1
  61. package/dist/src/formatters/html/sections/Header.d.ts.map +1 -1
  62. package/dist/src/formatters/html/sections/Header.js.map +1 -1
  63. package/dist/src/formatters/html/sections/LintSummary.d.ts.map +1 -1
  64. package/dist/src/formatters/html/sections/LintSummary.js.map +1 -1
  65. package/dist/src/formatters/html/sections/QualityRatings.js.map +1 -1
  66. package/dist/src/formatters/html/sections/Sidebar.d.ts.map +1 -1
  67. package/dist/src/formatters/html/sections/Sidebar.js.map +1 -1
  68. package/dist/src/formatters/html/styles/badges.d.ts.map +1 -1
  69. package/dist/src/formatters/html/styles/badges.js.map +1 -1
  70. package/dist/src/formatters/html/styles/index.d.ts.map +1 -1
  71. package/dist/src/formatters/html/styles/index.js.map +1 -1
  72. package/dist/src/formatters/html/theme.js.map +1 -1
  73. package/dist/src/formatters/html/views/Dashboard.js +5 -5
  74. package/dist/src/formatters/html/views/Dashboard.js.map +1 -1
  75. package/dist/src/formatters/html/views/IssuesView.d.ts.map +1 -1
  76. package/dist/src/formatters/html/views/IssuesView.js.map +1 -1
  77. package/dist/src/formatters/index.js.map +1 -1
  78. package/dist/src/mcp/index.d.ts.map +1 -1
  79. package/dist/src/mcp/index.js +0 -1
  80. package/dist/src/mcp/index.js.map +1 -1
  81. package/dist/src/mcp/prompts/index.js.map +1 -1
  82. package/dist/src/mcp/resources/index.js +30 -7
  83. package/dist/src/mcp/resources/index.js.map +1 -1
  84. package/dist/src/mcp/tools/formatMuleXml.d.ts.map +1 -1
  85. package/dist/src/mcp/tools/formatMuleXml.js +4 -13
  86. package/dist/src/mcp/tools/formatMuleXml.js.map +1 -1
  87. package/dist/src/mcp/tools/getRuleDetails.d.ts.map +1 -1
  88. package/dist/src/mcp/tools/getRuleDetails.js +1 -3
  89. package/dist/src/mcp/tools/getRuleDetails.js.map +1 -1
  90. package/dist/src/mcp/tools/runLintAnalysis.js +9 -9
  91. package/dist/src/mcp/tools/runLintAnalysis.js.map +1 -1
  92. package/dist/src/mcp/tools/validateSnippet.d.ts.map +1 -1
  93. package/dist/src/mcp/tools/validateSnippet.js.map +1 -1
  94. package/dist/src/quality/calculator.d.ts.map +1 -1
  95. package/dist/src/quality/calculator.js +1 -1
  96. package/dist/src/quality/calculator.js.map +1 -1
  97. package/dist/src/quality/index.d.ts.map +1 -1
  98. package/dist/src/quality/index.js.map +1 -1
  99. package/dist/src/quality/thresholds.js.map +1 -1
  100. package/dist/src/quality/types.d.ts.map +1 -1
  101. package/dist/src/rules/api-led/ApiLedRules.d.ts.map +1 -1
  102. package/dist/src/rules/api-led/ApiLedRules.js +6 -2
  103. package/dist/src/rules/api-led/ApiLedRules.js.map +1 -1
  104. package/dist/src/rules/api-led/SingleSystemSapiRule.d.ts.map +1 -1
  105. package/dist/src/rules/api-led/SingleSystemSapiRule.js.map +1 -1
  106. package/dist/src/rules/base/BaseRule.d.ts.map +1 -1
  107. package/dist/src/rules/base/BaseRule.js.map +1 -1
  108. package/dist/src/rules/base/ProjectRule.d.ts.map +1 -1
  109. package/dist/src/rules/base/ProjectRule.js.map +1 -1
  110. package/dist/src/rules/complexity/FlowComplexityRule.d.ts.map +1 -1
  111. package/dist/src/rules/complexity/FlowComplexityRule.js.map +1 -1
  112. package/dist/src/rules/dataweave/DataWeaveRules.d.ts.map +1 -1
  113. package/dist/src/rules/dataweave/DataWeaveRules.js +1 -3
  114. package/dist/src/rules/dataweave/DataWeaveRules.js.map +1 -1
  115. package/dist/src/rules/dataweave/Java17DWErrorHandlingRule.d.ts.map +1 -1
  116. package/dist/src/rules/dataweave/Java17DWErrorHandlingRule.js.map +1 -1
  117. package/dist/src/rules/documentation/DisplayNameRule.d.ts.map +1 -1
  118. package/dist/src/rules/documentation/DisplayNameRule.js.map +1 -1
  119. package/dist/src/rules/documentation/FlowDescriptionRule.d.ts.map +1 -1
  120. package/dist/src/rules/documentation/FlowDescriptionRule.js.map +1 -1
  121. package/dist/src/rules/documentation/MissingDocNameRule.d.ts.map +1 -1
  122. package/dist/src/rules/documentation/MissingDocNameRule.js.map +1 -1
  123. package/dist/src/rules/error-handling/CorrelationIdRule.d.ts.map +1 -1
  124. package/dist/src/rules/error-handling/CorrelationIdRule.js.map +1 -1
  125. package/dist/src/rules/error-handling/GenericErrorRule.d.ts.map +1 -1
  126. package/dist/src/rules/error-handling/GenericErrorRule.js.map +1 -1
  127. package/dist/src/rules/error-handling/GlobalErrorHandlerRule.d.ts.map +1 -1
  128. package/dist/src/rules/error-handling/GlobalErrorHandlerRule.js.map +1 -1
  129. package/dist/src/rules/error-handling/HttpStatusRule.d.ts.map +1 -1
  130. package/dist/src/rules/error-handling/HttpStatusRule.js.map +1 -1
  131. package/dist/src/rules/error-handling/MissingErrorHandlerRule.d.ts.map +1 -1
  132. package/dist/src/rules/error-handling/MissingErrorHandlerRule.js.map +1 -1
  133. package/dist/src/rules/error-handling/TryScopeRule.d.ts.map +1 -1
  134. package/dist/src/rules/error-handling/TryScopeRule.js.map +1 -1
  135. package/dist/src/rules/experimental/ExperimentalRules.d.ts.map +1 -1
  136. package/dist/src/rules/experimental/ExperimentalRules.js +6 -2
  137. package/dist/src/rules/experimental/ExperimentalRules.js.map +1 -1
  138. package/dist/src/rules/governance/GovernanceRules.d.ts.map +1 -1
  139. package/dist/src/rules/governance/GovernanceRules.js.map +1 -1
  140. package/dist/src/rules/http/HttpContentTypeRule.d.ts.map +1 -1
  141. package/dist/src/rules/http/HttpContentTypeRule.js.map +1 -1
  142. package/dist/src/rules/http/HttpTimeoutRule.d.ts.map +1 -1
  143. package/dist/src/rules/http/HttpTimeoutRule.js.map +1 -1
  144. package/dist/src/rules/http/HttpUserAgentRule.d.ts.map +1 -1
  145. package/dist/src/rules/http/HttpUserAgentRule.js.map +1 -1
  146. package/dist/src/rules/index.js.map +1 -1
  147. package/dist/src/rules/logging/ExcessiveLoggersRule.d.ts.map +1 -1
  148. package/dist/src/rules/logging/ExcessiveLoggersRule.js.map +1 -1
  149. package/dist/src/rules/logging/LoggerCategoryRule.d.ts.map +1 -1
  150. package/dist/src/rules/logging/LoggerCategoryRule.js.map +1 -1
  151. package/dist/src/rules/logging/LoggerInUntilSuccessfulRule.d.ts.map +1 -1
  152. package/dist/src/rules/logging/LoggerInUntilSuccessfulRule.js.map +1 -1
  153. package/dist/src/rules/logging/LoggerPayloadRule.d.ts.map +1 -1
  154. package/dist/src/rules/logging/LoggerPayloadRule.js.map +1 -1
  155. package/dist/src/rules/logging/NewLoggingRules.d.ts.map +1 -1
  156. package/dist/src/rules/logging/NewLoggingRules.js.map +1 -1
  157. package/dist/src/rules/naming/FlowCasingRule.d.ts.map +1 -1
  158. package/dist/src/rules/naming/FlowCasingRule.js.map +1 -1
  159. package/dist/src/rules/naming/FlowNamingRule.d.ts.map +1 -1
  160. package/dist/src/rules/naming/FlowNamingRule.js +3 -1
  161. package/dist/src/rules/naming/FlowNamingRule.js.map +1 -1
  162. package/dist/src/rules/naming/VariableNamingRule.d.ts.map +1 -1
  163. package/dist/src/rules/naming/VariableNamingRule.js.map +1 -1
  164. package/dist/src/rules/operations/CommentedCodeRule.d.ts.map +1 -1
  165. package/dist/src/rules/operations/CommentedCodeRule.js.map +1 -1
  166. package/dist/src/rules/operations/UnusedFlowRule.d.ts.map +1 -1
  167. package/dist/src/rules/operations/UnusedFlowRule.js.map +1 -1
  168. package/dist/src/rules/performance/AsyncErrorHandlerRule.d.ts.map +1 -1
  169. package/dist/src/rules/performance/AsyncErrorHandlerRule.js.map +1 -1
  170. package/dist/src/rules/performance/ConnectionPoolingRule.d.ts.map +1 -1
  171. package/dist/src/rules/performance/ConnectionPoolingRule.js.map +1 -1
  172. package/dist/src/rules/performance/LargeChoiceBlockRule.d.ts.map +1 -1
  173. package/dist/src/rules/performance/LargeChoiceBlockRule.js.map +1 -1
  174. package/dist/src/rules/performance/ReconnectionStrategyRule.d.ts.map +1 -1
  175. package/dist/src/rules/performance/ReconnectionStrategyRule.js.map +1 -1
  176. package/dist/src/rules/performance/ScatterGatherRoutesRule.d.ts.map +1 -1
  177. package/dist/src/rules/performance/ScatterGatherRoutesRule.js.map +1 -1
  178. package/dist/src/rules/security/EncryptionKeyInLogsRule.d.ts.map +1 -1
  179. package/dist/src/rules/security/EncryptionKeyInLogsRule.js.map +1 -1
  180. package/dist/src/rules/security/HardcodedCredentialsRule.d.ts.map +1 -1
  181. package/dist/src/rules/security/HardcodedCredentialsRule.js.map +1 -1
  182. package/dist/src/rules/security/HardcodedHttpRule.d.ts.map +1 -1
  183. package/dist/src/rules/security/HardcodedHttpRule.js +1 -9
  184. package/dist/src/rules/security/HardcodedHttpRule.js.map +1 -1
  185. package/dist/src/rules/security/InputValidationRule.d.ts.map +1 -1
  186. package/dist/src/rules/security/InputValidationRule.js +1 -3
  187. package/dist/src/rules/security/InputValidationRule.js.map +1 -1
  188. package/dist/src/rules/security/InsecureTlsRule.d.ts.map +1 -1
  189. package/dist/src/rules/security/InsecureTlsRule.js.map +1 -1
  190. package/dist/src/rules/security/RateLimitingRule.d.ts.map +1 -1
  191. package/dist/src/rules/security/RateLimitingRule.js.map +1 -1
  192. package/dist/src/rules/security/TlsVersionRule.d.ts.map +1 -1
  193. package/dist/src/rules/security/TlsVersionRule.js.map +1 -1
  194. package/dist/src/rules/standards/ApiKitValidationRule.d.ts.map +1 -1
  195. package/dist/src/rules/standards/ApiKitValidationRule.js.map +1 -1
  196. package/dist/src/rules/standards/AutoDiscoveryRule.d.ts.map +1 -1
  197. package/dist/src/rules/standards/AutoDiscoveryRule.js.map +1 -1
  198. package/dist/src/rules/standards/ChoiceAntiPatternRule.d.ts.map +1 -1
  199. package/dist/src/rules/standards/ChoiceAntiPatternRule.js.map +1 -1
  200. package/dist/src/rules/standards/CronExternalizedRule.d.ts.map +1 -1
  201. package/dist/src/rules/standards/CronExternalizedRule.js.map +1 -1
  202. package/dist/src/rules/standards/DeprecatedComponentRule.d.ts.map +1 -1
  203. package/dist/src/rules/standards/DeprecatedComponentRule.js.map +1 -1
  204. package/dist/src/rules/standards/DwlStandardsRule.d.ts.map +1 -1
  205. package/dist/src/rules/standards/DwlStandardsRule.js.map +1 -1
  206. package/dist/src/rules/standards/HttpPortPlaceholderRule.d.ts.map +1 -1
  207. package/dist/src/rules/standards/HttpPortPlaceholderRule.js.map +1 -1
  208. package/dist/src/rules/structure/StructureRules.d.ts.map +1 -1
  209. package/dist/src/rules/structure/StructureRules.js.map +1 -1
  210. package/dist/src/rules/yaml/YamlRules.d.ts.map +1 -1
  211. package/dist/src/rules/yaml/YamlRules.js +2 -7
  212. package/dist/src/rules/yaml/YamlRules.js.map +1 -1
  213. package/dist/src/types/Config.d.ts.map +1 -1
  214. package/dist/src/types/Config.js.map +1 -1
  215. package/dist/src/types/QualityGate.d.ts.map +1 -1
  216. package/dist/src/types/QualityGate.js.map +1 -1
  217. package/dist/src/types/Report.d.ts.map +1 -1
  218. package/dist/src/types/Rule.d.ts.map +1 -1
  219. package/docs/README.md +27 -27
  220. package/docs/best-practices/documentation-standards.md +20 -11
  221. package/docs/best-practices/folder-structure.md +16 -10
  222. package/docs/best-practices/mulesoft-best-practices.md +96 -94
  223. package/docs/best-practices/rules-catalog.md +316 -287
  224. package/docs/linter/architecture.md +70 -64
  225. package/docs/linter/extending.md +137 -128
  226. package/docs/linter/folder-structure.md +39 -38
  227. package/docs/linter/naming-conventions.md +80 -78
  228. package/docs/linter/rule-engine.md +306 -306
  229. package/docs/mcp-design.md +35 -21
  230. package/package.json +84 -73
@@ -30,38 +30,38 @@
30
30
 
31
31
  ## Rule Categories
32
32
 
33
- | Family | Prefix | Count | Description |
34
- |--------|--------|-------|-------------|
35
- | Error Handling | MULE-001/003/005/007/009, ERR-001 | 6 | Error handler configuration and best practices |
36
- | Naming | MULE-002/101/102 | 3 | Naming conventions for flows and variables |
37
- | Security | MULE-004/201/202, SEC-002/003/004/006 | 7 | Security vulnerabilities, TLS, rate limiting |
38
- | Logging | MULE-006/301/303, LOG-001/004, HYG-001 | 6 | Logging standards, structured logging, hygiene |
39
- | HTTP | MULE-401/402/403 | 3 | HTTP configuration and headers |
40
- | Performance | MULE-501/502/503, PERF-002, RES-001 | 5 | Performance anti-patterns and resilience |
41
- | Documentation | MULE-601/604, DOC-001 | 3 | Documentation requirements |
42
- | Standards | MULE-008/010/701, OPS-001/002/003, API-005 | 7 | Coding standards and operations |
43
- | Complexity | MULE-801 | 1 | Code complexity |
44
- | Structure | MULE-802/803/804 | 3 | Project structure |
45
- | YAML | YAML-001/003/004 | 3 | YAML configuration validation |
46
- | DataWeave | DW-001/002/003/004 | 4 | DataWeave file validation |
47
- | API-Led | API-001/002/003/004 | 4 | API-Led connectivity patterns |
48
- | Governance | PROJ-001/002 | 2 | POM and Git hygiene |
49
- | Code Hygiene | HYG-002/003 | 2 | Commented code and unused flows |
50
- | Experimental | EXP-001/002/003 | 3 | Beta rules for evaluation |
33
+ | Family | Prefix | Count | Description |
34
+ | -------------- | ------------------------------------------ | ----- | ---------------------------------------------- |
35
+ | Error Handling | MULE-001/003/005/007/009, ERR-001 | 6 | Error handler configuration and best practices |
36
+ | Naming | MULE-002/101/102 | 3 | Naming conventions for flows and variables |
37
+ | Security | MULE-004/201/202, SEC-002/003/004/006 | 7 | Security vulnerabilities, TLS, rate limiting |
38
+ | Logging | MULE-006/301/303, LOG-001/004, HYG-001 | 6 | Logging standards, structured logging, hygiene |
39
+ | HTTP | MULE-401/402/403 | 3 | HTTP configuration and headers |
40
+ | Performance | MULE-501/502/503, PERF-002, RES-001 | 5 | Performance anti-patterns and resilience |
41
+ | Documentation | MULE-601/604, DOC-001 | 3 | Documentation requirements |
42
+ | Standards | MULE-008/010/701, OPS-001/002/003, API-005 | 7 | Coding standards and operations |
43
+ | Complexity | MULE-801 | 1 | Code complexity |
44
+ | Structure | MULE-802/803/804 | 3 | Project structure |
45
+ | YAML | YAML-001/003/004 | 3 | YAML configuration validation |
46
+ | DataWeave | DW-001/002/003/004 | 4 | DataWeave file validation |
47
+ | API-Led | API-001/002/003/004 | 4 | API-Led connectivity patterns |
48
+ | Governance | PROJ-001/002 | 2 | POM and Git hygiene |
49
+ | Code Hygiene | HYG-002/003 | 2 | Commented code and unused flows |
50
+ | Experimental | EXP-001/002/003 | 3 | Beta rules for evaluation |
51
51
 
52
52
  ### MULE Category ID Ranges
53
53
 
54
- | Range | Category | Description |
55
- |-------|----------|-------------|
56
- | 001-099 | Error Handling | Error handler configuration and best practices |
57
- | 100-199 | Naming | Naming conventions for flows, variables, files |
58
- | 200-299 | Security | Security vulnerabilities and hardcoded values |
59
- | 300-399 | Logging | Logging standards and structured logging |
60
- | 400-499 | HTTP | HTTP configuration and headers |
61
- | 500-599 | Performance | Performance anti-patterns |
62
- | 600-699 | Documentation | Documentation requirements |
63
- | 700-799 | Standards | General coding standards |
64
- | 800-899 | Complexity/Structure | Code complexity and project structure |
54
+ | Range | Category | Description |
55
+ | ------- | -------------------- | ---------------------------------------------- |
56
+ | 001-099 | Error Handling | Error handler configuration and best practices |
57
+ | 100-199 | Naming | Naming conventions for flows, variables, files |
58
+ | 200-299 | Security | Security vulnerabilities and hardcoded values |
59
+ | 300-399 | Logging | Logging standards and structured logging |
60
+ | 400-499 | HTTP | HTTP configuration and headers |
61
+ | 500-599 | Performance | Performance anti-patterns |
62
+ | 600-699 | Documentation | Documentation requirements |
63
+ | 700-799 | Standards | General coding standards |
64
+ | 800-899 | Complexity/Structure | Code complexity and project structure |
65
65
 
66
66
  ---
67
67
 
@@ -73,15 +73,16 @@
73
73
 
74
74
  ### MULE-001: Global Error Handler Exists
75
75
 
76
- | Property | Value |
77
- |----------|-------|
78
- | **Severity** | Error |
76
+ | Property | Value |
77
+ | ------------ | -------------- |
78
+ | **Severity** | Error |
79
79
  | **Category** | Error Handling |
80
- | **Fixable** | No |
80
+ | **Fixable** | No |
81
81
 
82
82
  **Description:** Every Mule project should have a global error handler file with a reusable error-handler configuration.
83
83
 
84
84
  **Check Logic:**
85
+
85
86
  1. Verify file exists: `src/main/mule/global-error-handler.xml`
86
87
  2. Verify contains: `<error-handler name="global-error-handler">`
87
88
 
@@ -91,15 +92,16 @@
91
92
 
92
93
  ### MULE-003: Missing Error Handler
93
94
 
94
- | Property | Value |
95
- |----------|-------|
96
- | **Severity** | Error |
95
+ | Property | Value |
96
+ | ------------ | -------------- |
97
+ | **Severity** | Error |
97
98
  | **Category** | Error Handling |
98
- | **Fixable** | No |
99
+ | **Fixable** | No |
99
100
 
100
101
  **Description:** Every flow should have an error handler or reference the global one.
101
102
 
102
103
  **XPath:**
104
+
103
105
  ```xpath
104
106
  //mule:flow[not(mule:error-handler) and not(contains(@name, 'api-main'))]
105
107
  ```
@@ -108,11 +110,11 @@
108
110
 
109
111
  ### MULE-005: HTTP Status in Error Handler
110
112
 
111
- | Property | Value |
112
- |----------|-------|
113
- | **Severity** | Warning |
113
+ | Property | Value |
114
+ | ------------ | -------------- |
115
+ | **Severity** | Warning |
114
116
  | **Category** | Error Handling |
115
- | **Fixable** | No |
117
+ | **Fixable** | No |
116
118
 
117
119
  **Description:** Error handlers should set an `httpStatus` variable for proper API responses.
118
120
 
@@ -122,11 +124,11 @@
122
124
 
123
125
  ### MULE-007: Correlation ID in Error Handler
124
126
 
125
- | Property | Value |
126
- |----------|-------|
127
- | **Severity** | Warning |
127
+ | Property | Value |
128
+ | ------------ | -------------- |
129
+ | **Severity** | Warning |
128
130
  | **Category** | Error Handling |
129
- | **Fixable** | No |
131
+ | **Fixable** | No |
130
132
 
131
133
  **Description:** Error handlers should reference `correlationId` for traceability across distributed systems.
132
134
 
@@ -134,11 +136,11 @@
134
136
 
135
137
  ### MULE-009: Generic Error Type
136
138
 
137
- | Property | Value |
138
- |----------|-------|
139
- | **Severity** | Warning |
139
+ | Property | Value |
140
+ | ------------ | -------------- |
141
+ | **Severity** | Warning |
140
142
  | **Category** | Error Handling |
141
- | **Fixable** | No |
143
+ | **Fixable** | No |
142
144
 
143
145
  **Description:** Avoid catching `type="ANY"` in error handlers. Be specific about error types.
144
146
 
@@ -148,18 +150,19 @@
148
150
 
149
151
  ### ERR-001: Try Scope Best Practice
150
152
 
151
- | Property | Value |
152
- |----------|-------|
153
- | **Severity** | Info |
154
- | **Category** | Error Handling |
155
- | **Issue Type** | Bug |
156
- | **Fixable** | No |
153
+ | Property | Value |
154
+ | -------------- | -------------- |
155
+ | **Severity** | Info |
156
+ | **Category** | Error Handling |
157
+ | **Issue Type** | Bug |
158
+ | **Fixable** | No |
157
159
 
158
160
  **Description:** Complex operations (DB calls, HTTP requests) should use Try scope for granular error isolation and handling.
159
161
 
160
162
  **Check Logic:** Flags flows that have 2+ external calls (HTTP requests, DB operations) without any Try scope wrapping them.
161
163
 
162
164
  **Example:**
165
+
163
166
  ```xml
164
167
  <!-- ❌ Bad - multiple calls without Try -->
165
168
  <flow name="process-order-flow">
@@ -188,15 +191,16 @@
188
191
 
189
192
  ### MULE-002: Flow Naming Convention
190
193
 
191
- | Property | Value |
192
- |----------|-------|
194
+ | Property | Value |
195
+ | ------------ | ------- |
193
196
  | **Severity** | Warning |
194
- | **Category** | Naming |
195
- | **Fixable** | Yes |
197
+ | **Category** | Naming |
198
+ | **Fixable** | Yes |
196
199
 
197
200
  **Description:** Flows must end with `-flow` suffix, sub-flows with `-subflow`.
198
201
 
199
202
  **Examples:**
203
+
200
204
  ```xml
201
205
  <!-- ✅ Good -->
202
206
  <flow name="process-order-flow">
@@ -211,15 +215,16 @@
211
215
 
212
216
  ### MULE-101: Flow Name Casing
213
217
 
214
- | Property | Value |
215
- |----------|-------|
218
+ | Property | Value |
219
+ | ------------ | ------- |
216
220
  | **Severity** | Warning |
217
- | **Category** | Naming |
218
- | **Fixable** | No |
221
+ | **Category** | Naming |
222
+ | **Fixable** | No |
219
223
 
220
224
  **Description:** Flow names should follow consistent casing (kebab-case recommended).
221
225
 
222
226
  **Options:**
227
+
223
228
  - `kebab-case`: `my-flow-name` (recommended)
224
229
  - `camelCase`: `myFlowName`
225
230
  - `snake_case`: `my_flow_name`
@@ -228,11 +233,11 @@
228
233
 
229
234
  ### MULE-102: Variable Naming Convention
230
235
 
231
- | Property | Value |
232
- |----------|-------|
236
+ | Property | Value |
237
+ | ------------ | ------- |
233
238
  | **Severity** | Warning |
234
- | **Category** | Naming |
235
- | **Fixable** | No |
239
+ | **Category** | Naming |
240
+ | **Fixable** | No |
236
241
 
237
242
  **Description:** Variables set via `set-variable` should follow camelCase naming.
238
243
 
@@ -244,15 +249,16 @@
244
249
 
245
250
  ### MULE-004: Hardcoded HTTP URLs
246
251
 
247
- | Property | Value |
248
- |----------|-------|
249
- | **Severity** | Error |
252
+ | Property | Value |
253
+ | ------------ | -------- |
254
+ | **Severity** | Error |
250
255
  | **Category** | Security |
251
- | **Fixable** | No |
256
+ | **Fixable** | No |
252
257
 
253
258
  **Description:** HTTP/HTTPS URLs should use property placeholders, not hardcoded values.
254
259
 
255
260
  **Examples:**
261
+
256
262
  ```xml
257
263
  <!-- ❌ Bad -->
258
264
  <http:request url="https://api.example.com/orders" />
@@ -265,11 +271,11 @@
265
271
 
266
272
  ### MULE-201: Hardcoded Credentials
267
273
 
268
- | Property | Value |
269
- |----------|-------|
270
- | **Severity** | Error |
274
+ | Property | Value |
275
+ | ------------ | -------- |
276
+ | **Severity** | Error |
271
277
  | **Category** | Security |
272
- | **Fixable** | No |
278
+ | **Fixable** | No |
273
279
 
274
280
  **Description:** Passwords and secrets should never be hardcoded. Use secure properties.
275
281
 
@@ -279,11 +285,11 @@
279
285
 
280
286
  ### MULE-202: Insecure TLS Configuration
281
287
 
282
- | Property | Value |
283
- |----------|-------|
284
- | **Severity** | Error |
288
+ | Property | Value |
289
+ | ------------ | -------- |
290
+ | **Severity** | Error |
285
291
  | **Category** | Security |
286
- | **Fixable** | No |
292
+ | **Fixable** | No |
287
293
 
288
294
  **Description:** TLS configurations should not use insecure protocols or disable certificate verification.
289
295
 
@@ -291,18 +297,19 @@
291
297
 
292
298
  ### SEC-002: TLS Version Check
293
299
 
294
- | Property | Value |
295
- |----------|-------|
296
- | **Severity** | Error |
297
- | **Category** | Security |
300
+ | Property | Value |
301
+ | -------------- | ------------- |
302
+ | **Severity** | Error |
303
+ | **Category** | Security |
298
304
  | **Issue Type** | Vulnerability |
299
- | **Fixable** | No |
305
+ | **Fixable** | No |
300
306
 
301
307
  **Description:** Detect use of deprecated TLS versions (< 1.2). TLS 1.0 and 1.1 are deprecated and should not be used per current security standards.
302
308
 
303
309
  **Deprecated Protocols:** `TLSv1`, `TLSv1.0`, `TLSv1.1`, `SSLv3`, `SSLv2`
304
310
 
305
311
  **Example:**
312
+
306
313
  ```xml
307
314
  <!-- ❌ Bad - deprecated protocol -->
308
315
  <tls:context enabledProtocols="TLSv1.1,TLSv1.2">
@@ -315,12 +322,12 @@
315
322
 
316
323
  ### SEC-003: Rate Limiting Policy
317
324
 
318
- | Property | Value |
319
- |----------|-------|
320
- | **Severity** | Warning |
321
- | **Category** | Security |
325
+ | Property | Value |
326
+ | -------------- | ------------- |
327
+ | **Severity** | Warning |
328
+ | **Category** | Security |
322
329
  | **Issue Type** | Vulnerability |
323
- | **Fixable** | No |
330
+ | **Fixable** | No |
324
331
 
325
332
  **Description:** APIs should have rate limiting or throttling configured to prevent DoS attacks and manage API consumption.
326
333
 
@@ -332,18 +339,19 @@
332
339
 
333
340
  ### SEC-004: Input Validation
334
341
 
335
- | Property | Value |
336
- |----------|-------|
337
- | **Severity** | Warning |
338
- | **Category** | Security |
342
+ | Property | Value |
343
+ | -------------- | ------------- |
344
+ | **Severity** | Warning |
345
+ | **Category** | Security |
339
346
  | **Issue Type** | Vulnerability |
340
- | **Fixable** | No |
347
+ | **Fixable** | No |
341
348
 
342
349
  **Description:** Incoming payloads should be validated using JSON or XML schema validation to prevent injection attacks and malformed data processing.
343
350
 
344
351
  **Check Logic:** Flags flows accepting POST/PUT/PATCH requests that have no schema validation or DataWeave validation patterns.
345
352
 
346
353
  **Example:**
354
+
347
355
  ```xml
348
356
  <!-- ✅ Good - schema validation -->
349
357
  <flow name="post:\orders:api-config">
@@ -356,17 +364,18 @@
356
364
 
357
365
  ### SEC-006: Encryption Key in Logs
358
366
 
359
- | Property | Value |
360
- |----------|-------|
361
- | **Severity** | Error |
367
+ | Property | Value |
368
+ | ------------ | -------- |
369
+ | **Severity** | Error |
362
370
  | **Category** | Security |
363
- | **Fixable** | No |
371
+ | **Fixable** | No |
364
372
 
365
373
  **Description:** Encryption keys, passwords, and sensitive credentials should not appear in log statements.
366
374
 
367
375
  **Detected Patterns:** `encrypt.*key`, `password`, `credentials`, `api_key`, `secret.*key`, `mule.key`, `secure::.*key`
368
376
 
369
377
  **Example:**
378
+
370
379
  ```xml
371
380
  <!-- ❌ Bad -->
372
381
  <logger message="Key: #[vars.encryptionKey]"/>
@@ -383,15 +392,16 @@
383
392
 
384
393
  ### MULE-006: Logger Category Required
385
394
 
386
- | Property | Value |
387
- |----------|-------|
395
+ | Property | Value |
396
+ | ------------ | ------- |
388
397
  | **Severity** | Warning |
389
398
  | **Category** | Logging |
390
- | **Fixable** | Yes |
399
+ | **Fixable** | Yes |
391
400
 
392
401
  **Description:** All loggers must have a `category` attribute for proper log filtering.
393
402
 
394
403
  **Example:**
404
+
395
405
  ```xml
396
406
  <!-- ✅ Good -->
397
407
  <logger category="com.myorg.orders" message="Processing order" level="INFO"/>
@@ -401,15 +411,16 @@
401
411
 
402
412
  ### MULE-301: Logger Payload Reference
403
413
 
404
- | Property | Value |
405
- |----------|-------|
414
+ | Property | Value |
415
+ | ------------ | ------- |
406
416
  | **Severity** | Warning |
407
417
  | **Category** | Logging |
408
- | **Fixable** | No |
418
+ | **Fixable** | No |
409
419
 
410
420
  **Description:** Loggers should not directly reference `#[payload]` as it may log sensitive data and cause performance issues.
411
421
 
412
422
  **Examples:**
423
+
413
424
  ```xml
414
425
  <!-- ❌ Bad - logs entire payload -->
415
426
  <logger message="#[payload]" />
@@ -422,11 +433,11 @@
422
433
 
423
434
  ### MULE-303: Logger in Until-Successful
424
435
 
425
- | Property | Value |
426
- |----------|-------|
436
+ | Property | Value |
437
+ | ------------ | ------- |
427
438
  | **Severity** | Warning |
428
439
  | **Category** | Logging |
429
- | **Fixable** | No |
440
+ | **Fixable** | No |
430
441
 
431
442
  **Description:** Having a logger inside `until-successful` may flood logs on retries.
432
443
 
@@ -434,11 +445,11 @@
434
445
 
435
446
  ### LOG-001: Structured Logging
436
447
 
437
- | Property | Value |
438
- |----------|-------|
439
- | **Severity** | Info |
448
+ | Property | Value |
449
+ | ------------ | ------- |
450
+ | **Severity** | Info |
440
451
  | **Category** | Logging |
441
- | **Fixable** | No |
452
+ | **Fixable** | No |
442
453
 
443
454
  **Description:** Recommend JSON logger format over plain text for production applications to enable better log parsing and analysis.
444
455
 
@@ -450,17 +461,18 @@
450
461
 
451
462
  ### LOG-004: Sensitive Data in Logs
452
463
 
453
- | Property | Value |
454
- |----------|-------|
455
- | **Severity** | Error |
464
+ | Property | Value |
465
+ | ------------ | ------- |
466
+ | **Severity** | Error |
456
467
  | **Category** | Logging |
457
- | **Fixable** | No |
468
+ | **Fixable** | No |
458
469
 
459
470
  **Description:** Log statements should not contain sensitive data values (passwords, tokens, SSNs, PII).
460
471
 
461
472
  **Detected Patterns:** Variable references like `vars.password`, `payload.token`, `${secure::*}`, concatenated sensitive values.
462
473
 
463
474
  **Example:**
475
+
464
476
  ```xml
465
477
  <!-- ❌ Bad - logs sensitive variable value -->
466
478
  <logger message="#['Token: ' ++ vars.accessToken]"/>
@@ -473,15 +485,16 @@
473
485
 
474
486
  ### HYG-001: Excessive Loggers
475
487
 
476
- | Property | Value |
477
- |----------|-------|
488
+ | Property | Value |
489
+ | ------------ | ------- |
478
490
  | **Severity** | Warning |
479
491
  | **Category** | Logging |
480
- | **Fixable** | No |
492
+ | **Fixable** | No |
481
493
 
482
494
  **Description:** Flows should not have too many loggers, which can impact performance.
483
495
 
484
496
  **Configuration:**
497
+
485
498
  ```json
486
499
  {
487
500
  "HYG-001": {
@@ -502,11 +515,11 @@
502
515
 
503
516
  ### MULE-401: HTTP Request Missing User-Agent
504
517
 
505
- | Property | Value |
506
- |----------|-------|
518
+ | Property | Value |
519
+ | ------------ | ------- |
507
520
  | **Severity** | Warning |
508
- | **Category** | HTTP |
509
- | **Fixable** | No |
521
+ | **Category** | HTTP |
522
+ | **Fixable** | No |
510
523
 
511
524
  **Description:** All HTTP requests should include a `User-Agent` header for API identification.
512
525
 
@@ -514,11 +527,11 @@
514
527
 
515
528
  ### MULE-402: HTTP Request Missing Content-Type
516
529
 
517
- | Property | Value |
518
- |----------|-------|
530
+ | Property | Value |
531
+ | ------------ | ------- |
519
532
  | **Severity** | Warning |
520
- | **Category** | HTTP |
521
- | **Fixable** | No |
533
+ | **Category** | HTTP |
534
+ | **Fixable** | No |
522
535
 
523
536
  **Description:** POST/PUT HTTP requests should include a `Content-Type` header.
524
537
 
@@ -526,11 +539,11 @@
526
539
 
527
540
  ### MULE-403: HTTP Request Timeout
528
541
 
529
- | Property | Value |
530
- |----------|-------|
542
+ | Property | Value |
543
+ | ------------ | ------- |
531
544
  | **Severity** | Warning |
532
- | **Category** | HTTP |
533
- | **Fixable** | No |
545
+ | **Category** | HTTP |
546
+ | **Fixable** | No |
534
547
 
535
548
  **Description:** HTTP requests should have explicit timeout configuration.
536
549
 
@@ -544,11 +557,11 @@
544
557
 
545
558
  ### MULE-501: Scatter-Gather Routes
546
559
 
547
- | Property | Value |
548
- |----------|-------|
549
- | **Severity** | Info |
560
+ | Property | Value |
561
+ | ------------ | ----------- |
562
+ | **Severity** | Info |
550
563
  | **Category** | Performance |
551
- | **Fixable** | No |
564
+ | **Fixable** | No |
552
565
 
553
566
  **Description:** Scatter-gather with many routes may cause memory issues. Consider limiting routes.
554
567
 
@@ -556,11 +569,11 @@
556
569
 
557
570
  ### MULE-502: Async Without Error Handler
558
571
 
559
- | Property | Value |
560
- |----------|-------|
561
- | **Severity** | Warning |
572
+ | Property | Value |
573
+ | ------------ | ----------- |
574
+ | **Severity** | Warning |
562
575
  | **Category** | Performance |
563
- | **Fixable** | No |
576
+ | **Fixable** | No |
564
577
 
565
578
  **Description:** Async scopes should have their own error handling since they don't propagate errors to the parent flow.
566
579
 
@@ -570,11 +583,11 @@
570
583
 
571
584
  ### MULE-503: Large Choice Blocks
572
585
 
573
- | Property | Value |
574
- |----------|-------|
575
- | **Severity** | Warning |
586
+ | Property | Value |
587
+ | ------------ | ----------- |
588
+ | **Severity** | Warning |
576
589
  | **Category** | Performance |
577
- | **Fixable** | No |
590
+ | **Fixable** | No |
578
591
 
579
592
  **Description:** Choice blocks with many when clauses should be refactored to DataWeave lookups or routing slip pattern.
580
593
 
@@ -582,17 +595,18 @@
582
595
 
583
596
  ### PERF-002: Connection Pooling
584
597
 
585
- | Property | Value |
586
- |----------|-------|
587
- | **Severity** | Warning |
598
+ | Property | Value |
599
+ | ------------ | ----------- |
600
+ | **Severity** | Warning |
588
601
  | **Category** | Performance |
589
- | **Fixable** | No |
602
+ | **Fixable** | No |
590
603
 
591
604
  **Description:** DB and HTTP connectors should configure connection pools for optimal performance and resource management.
592
605
 
593
606
  **Check Logic:** Flags HTTP request configs missing `maxConnections`/`connectionIdleTimeout` and DB configs missing `pooling-profile`.
594
607
 
595
608
  **Example:**
609
+
596
610
  ```xml
597
611
  <!-- ✅ Good - HTTP with pooling -->
598
612
  <http:request-config name="API_Config" maxConnections="20" connectionIdleTimeout="30000"/>
@@ -607,17 +621,18 @@
607
621
 
608
622
  ### RES-001: Reconnection Strategy
609
623
 
610
- | Property | Value |
611
- |----------|-------|
612
- | **Severity** | Warning |
624
+ | Property | Value |
625
+ | ------------ | ----------- |
626
+ | **Severity** | Warning |
613
627
  | **Category** | Performance |
614
- | **Fixable** | No |
628
+ | **Fixable** | No |
615
629
 
616
630
  **Description:** Connectors should have reconnection strategies configured for resilience.
617
631
 
618
632
  **Checked Connectors:** HTTP Request, HTTP Listener, JMS, AMQP, SFTP, FTP, VM, Database
619
633
 
620
634
  **Example:**
635
+
621
636
  ```xml
622
637
  <!-- ✅ Good -->
623
638
  <http:request-config name="API_Config">
@@ -637,11 +652,11 @@
637
652
 
638
653
  ### MULE-601: Flow Missing Description
639
654
 
640
- | Property | Value |
641
- |----------|-------|
642
- | **Severity** | Info |
655
+ | Property | Value |
656
+ | ------------ | ------------- |
657
+ | **Severity** | Info |
643
658
  | **Category** | Documentation |
644
- | **Fixable** | No |
659
+ | **Fixable** | No |
645
660
 
646
661
  **Description:** Flows should have a `doc:description` attribute for documentation.
647
662
 
@@ -649,11 +664,11 @@
649
664
 
650
665
  ### MULE-604: Missing doc:name
651
666
 
652
- | Property | Value |
653
- |----------|-------|
654
- | **Severity** | Warning |
667
+ | Property | Value |
668
+ | ------------ | ------------- |
669
+ | **Severity** | Warning |
655
670
  | **Category** | Documentation |
656
- | **Fixable** | No |
671
+ | **Fixable** | No |
657
672
 
658
673
  **Description:** Key components (logger, set-variable, transform, etc.) should have `doc:name` for Anypoint Studio visibility.
659
674
 
@@ -661,17 +676,18 @@
661
676
 
662
677
  ### DOC-001: Display Name Enforcement
663
678
 
664
- | Property | Value |
665
- |----------|-------|
666
- | **Severity** | Info |
679
+ | Property | Value |
680
+ | ------------ | ------------- |
681
+ | **Severity** | Info |
667
682
  | **Category** | Documentation |
668
- | **Fixable** | No |
683
+ | **Fixable** | No |
669
684
 
670
685
  **Description:** Key components should have meaningful `doc:name` attributes, not default/generic names.
671
686
 
672
687
  **Flagged Defaults:** `Set Payload`, `Set Variable`, `Transform Message`, `Flow Reference`, `Logger`, `Choice`
673
688
 
674
689
  **Example:**
690
+
675
691
  ```xml
676
692
  <!-- ❌ Bad - generic default name -->
677
693
  <set-payload doc:name="Set Payload" value="#[output application/json --- {}]"/>
@@ -686,11 +702,11 @@
686
702
 
687
703
  ### MULE-008: Choice Anti-Pattern
688
704
 
689
- | Property | Value |
690
- |----------|-------|
691
- | **Severity** | Warning |
705
+ | Property | Value |
706
+ | ------------ | --------- |
707
+ | **Severity** | Warning |
692
708
  | **Category** | Standards |
693
- | **Fixable** | No |
709
+ | **Fixable** | No |
694
710
 
695
711
  **Description:** Avoid using `raise-error` directly inside `choice/otherwise`. Use a more descriptive error type.
696
712
 
@@ -698,11 +714,11 @@
698
714
 
699
715
  ### MULE-010: DWL Standards File
700
716
 
701
- | Property | Value |
702
- |----------|-------|
703
- | **Severity** | Info |
717
+ | Property | Value |
718
+ | ------------ | --------- |
719
+ | **Severity** | Info |
704
720
  | **Category** | Standards |
705
- | **Fixable** | No |
721
+ | **Fixable** | No |
706
722
 
707
723
  **Description:** Project should have a standard error DataWeave file at `src/main/resources/dwl/standard-error.dwl`.
708
724
 
@@ -710,11 +726,11 @@
710
726
 
711
727
  ### MULE-701: Deprecated Component Usage
712
728
 
713
- | Property | Value |
714
- |----------|-------|
715
- | **Severity** | Warning |
729
+ | Property | Value |
730
+ | ------------ | --------- |
731
+ | **Severity** | Warning |
716
732
  | **Category** | Standards |
717
- | **Fixable** | No |
733
+ | **Fixable** | No |
718
734
 
719
735
  **Description:** Detect usage of deprecated Mule components.
720
736
 
@@ -722,17 +738,18 @@
722
738
 
723
739
  ### OPS-001: Auto-Discovery Configuration
724
740
 
725
- | Property | Value |
726
- |----------|-------|
727
- | **Severity** | Info |
741
+ | Property | Value |
742
+ | ------------ | --------- |
743
+ | **Severity** | Info |
728
744
  | **Category** | Standards |
729
- | **Fixable** | No |
745
+ | **Fixable** | No |
730
746
 
731
747
  **Description:** APIs should have auto-discovery configured for API Manager integration.
732
748
 
733
749
  **Check Logic:** Flags API projects (those with APIKit router) that are missing `<api-gateway:autodiscovery>`. Also verifies that `apiId` uses a property placeholder.
734
750
 
735
751
  **Example:**
752
+
736
753
  ```xml
737
754
  <!-- ✅ Good -->
738
755
  <api-gateway:autodiscovery apiId="${api.id}" flowRef="api-main"/>
@@ -742,15 +759,16 @@
742
759
 
743
760
  ### OPS-002: HTTP Port Placeholder
744
761
 
745
- | Property | Value |
746
- |----------|-------|
747
- | **Severity** | Warning |
762
+ | Property | Value |
763
+ | ------------ | --------- |
764
+ | **Severity** | Warning |
748
765
  | **Category** | Standards |
749
- | **Fixable** | No |
766
+ | **Fixable** | No |
750
767
 
751
768
  **Description:** HTTP listener ports should use property placeholders, not hardcoded values.
752
769
 
753
770
  **Example:**
771
+
754
772
  ```xml
755
773
  <!-- ❌ Bad -->
756
774
  <http:listener-config port="8081"/>
@@ -763,15 +781,16 @@
763
781
 
764
782
  ### OPS-003: Externalized Cron Expression
765
783
 
766
- | Property | Value |
767
- |----------|-------|
768
- | **Severity** | Warning |
784
+ | Property | Value |
785
+ | ------------ | --------- |
786
+ | **Severity** | Warning |
769
787
  | **Category** | Standards |
770
- | **Fixable** | No |
788
+ | **Fixable** | No |
771
789
 
772
790
  **Description:** Cron expressions in schedulers should use property placeholders to allow environment-specific scheduling.
773
791
 
774
792
  **Example:**
793
+
775
794
  ```xml
776
795
  <!-- ❌ Bad -->
777
796
  <scheduling-strategy>
@@ -788,11 +807,11 @@
788
807
 
789
808
  ### API-005: APIKit Validation
790
809
 
791
- | Property | Value |
792
- |----------|-------|
793
- | **Severity** | Info |
810
+ | Property | Value |
811
+ | ------------ | --------- |
812
+ | **Severity** | Info |
794
813
  | **Category** | Standards |
795
- | **Fixable** | No |
814
+ | **Fixable** | No |
796
815
 
797
816
  **Description:** APIs should use APIKit for auto-generated implementation interfaces.
798
817
 
@@ -808,11 +827,11 @@
808
827
 
809
828
  ### MULE-801: Flow Complexity
810
829
 
811
- | Property | Value |
812
- |----------|-------|
813
- | **Severity** | Warning |
830
+ | Property | Value |
831
+ | ------------ | ---------- |
832
+ | **Severity** | Warning |
814
833
  | **Category** | Complexity |
815
- | **Fixable** | No |
834
+ | **Fixable** | No |
816
835
 
817
836
  **Description:** Flow cyclomatic complexity should not exceed threshold.
818
837
 
@@ -831,6 +850,7 @@
831
850
  | `<on-error-*>` | Error handlers |
832
851
 
833
852
  **Configuration:**
853
+
834
854
  ```json
835
855
  {
836
856
  "MULE-801": {
@@ -850,19 +870,21 @@
850
870
 
851
871
  ### MULE-802: Project Structure
852
872
 
853
- | Property | Value |
854
- |----------|-------|
855
- | **Severity** | Warning |
873
+ | Property | Value |
874
+ | ------------ | --------- |
875
+ | **Severity** | Warning |
856
876
  | **Category** | Structure |
857
- | **Fixable** | No |
877
+ | **Fixable** | No |
858
878
 
859
879
  **Description:** Validate standard MuleSoft project folder structure.
860
880
 
861
881
  **Required Directories:**
882
+
862
883
  - `src/main/mule`
863
884
  - `src/main/resources`
864
885
 
865
886
  **Recommended Directories:**
887
+
866
888
  - `src/main/resources/dwl`
867
889
  - `src/main/resources/api`
868
890
  - `src/test/munit`
@@ -871,11 +893,11 @@
871
893
 
872
894
  ### MULE-803: Global Config File
873
895
 
874
- | Property | Value |
875
- |----------|-------|
876
- | **Severity** | Warning |
896
+ | Property | Value |
897
+ | ------------ | --------- |
898
+ | **Severity** | Warning |
877
899
  | **Category** | Structure |
878
- | **Fixable** | No |
900
+ | **Fixable** | No |
879
901
 
880
902
  **Description:** Project should have `global.xml` with shared configurations (HTTP listeners, error handlers, etc.).
881
903
 
@@ -883,11 +905,11 @@
883
905
 
884
906
  ### MULE-804: Monolithic XML File
885
907
 
886
- | Property | Value |
887
- |----------|-------|
888
- | **Severity** | Warning |
908
+ | Property | Value |
909
+ | ------------ | --------- |
910
+ | **Severity** | Warning |
889
911
  | **Category** | Structure |
890
- | **Fixable** | No |
912
+ | **Fixable** | No |
891
913
 
892
914
  **Description:** XML files should not exceed 10 flows/sub-flows. Split large files by domain.
893
915
 
@@ -899,15 +921,16 @@
899
921
 
900
922
  ### YAML-001: Environment Properties Files
901
923
 
902
- | Property | Value |
903
- |----------|-------|
904
- | **Severity** | Warning |
924
+ | Property | Value |
925
+ | ------------ | --------- |
926
+ | **Severity** | Warning |
905
927
  | **Category** | Standards |
906
- | **Fixable** | No |
928
+ | **Fixable** | No |
907
929
 
908
930
  **Description:** Environment-specific YAML property files should exist for each environment.
909
931
 
910
932
  **Expected Files:**
933
+
911
934
  - `dev.yaml` or `config-dev.yaml`
912
935
  - `qa.yaml` or `config-qa.yaml`
913
936
  - `prod.yaml` or `config-prod.yaml`
@@ -916,15 +939,16 @@
916
939
 
917
940
  ### YAML-003: Property Naming Convention
918
941
 
919
- | Property | Value |
920
- |----------|-------|
921
- | **Severity** | Info |
942
+ | Property | Value |
943
+ | ------------ | --------- |
944
+ | **Severity** | Info |
922
945
  | **Category** | Standards |
923
- | **Fixable** | No |
946
+ | **Fixable** | No |
924
947
 
925
948
  **Description:** Property keys should follow `category.property` format.
926
949
 
927
950
  **Examples:**
951
+
928
952
  ```yaml
929
953
  # ✅ Good
930
954
  db.host: localhost
@@ -939,15 +963,16 @@ ApiTimeout: 30000
939
963
 
940
964
  ### YAML-004: No Plaintext Secrets
941
965
 
942
- | Property | Value |
943
- |----------|-------|
944
- | **Severity** | Error |
966
+ | Property | Value |
967
+ | ------------ | -------- |
968
+ | **Severity** | Error |
945
969
  | **Category** | Security |
946
- | **Fixable** | No |
970
+ | **Fixable** | No |
947
971
 
948
972
  **Description:** Sensitive properties (passwords, keys, secrets) should be encrypted with `![...]` syntax.
949
973
 
950
974
  **Example:**
975
+
951
976
  ```yaml
952
977
  # ❌ Bad - plaintext secret
953
978
  db.password: mySecretPassword
@@ -964,11 +989,11 @@ db.password: "![encryptedValue]"
964
989
 
965
990
  ### DW-001: External DWL for Complex Transforms
966
991
 
967
- | Property | Value |
968
- |----------|-------|
969
- | **Severity** | Warning |
992
+ | Property | Value |
993
+ | ------------ | --------- |
994
+ | **Severity** | Warning |
970
995
  | **Category** | DataWeave |
971
- | **Fixable** | No |
996
+ | **Fixable** | No |
972
997
 
973
998
  **Description:** Complex DataWeave (10+ lines) should be externalized to `.dwl` files.
974
999
 
@@ -976,11 +1001,11 @@ db.password: "![encryptedValue]"
976
1001
 
977
1002
  ### DW-002: DWL File Naming
978
1003
 
979
- | Property | Value |
980
- |----------|-------|
981
- | **Severity** | Info |
1004
+ | Property | Value |
1005
+ | ------------ | --------- |
1006
+ | **Severity** | Info |
982
1007
  | **Category** | DataWeave |
983
- | **Fixable** | No |
1008
+ | **Fixable** | No |
984
1009
 
985
1010
  **Description:** DataWeave files should use kebab-case naming (`my-transform.dwl`).
986
1011
 
@@ -988,11 +1013,11 @@ db.password: "![encryptedValue]"
988
1013
 
989
1014
  ### DW-003: DWL Modules
990
1015
 
991
- | Property | Value |
992
- |----------|-------|
993
- | **Severity** | Info |
1016
+ | Property | Value |
1017
+ | ------------ | --------- |
1018
+ | **Severity** | Info |
994
1019
  | **Category** | DataWeave |
995
- | **Fixable** | No |
1020
+ | **Fixable** | No |
996
1021
 
997
1022
  **Description:** Project should have common reusable DataWeave modules (`common.dwl`, `utils.dwl`).
998
1023
 
@@ -1000,24 +1025,25 @@ db.password: "![encryptedValue]"
1000
1025
 
1001
1026
  ### DW-004: Java 17 DataWeave Error Handling
1002
1027
 
1003
- | Property | Value |
1004
- |----------|-------|
1005
- | **Severity** | Error |
1028
+ | Property | Value |
1029
+ | ------------ | --------- |
1030
+ | **Severity** | Error |
1006
1031
  | **Category** | DataWeave |
1007
- | **Fixable** | No |
1032
+ | **Fixable** | No |
1008
1033
 
1009
1034
  **Description:** Enforces DataWeave error handling patterns compatible with Java 17 encapsulation. Detects restricted property access patterns that fail at runtime on Java 17.
1010
1035
 
1011
1036
  **Forbidden Patterns & Replacements:**
1012
1037
 
1013
- | Forbidden | Replacement |
1014
- |-----------|-------------|
1015
- | `error.description` | `error.detailedDescription` |
1038
+ | Forbidden | Replacement |
1039
+ | -------------------------- | ---------------------------------------------------------------- |
1040
+ | `error.description` | `error.detailedDescription` |
1016
1041
  | `error.errorType.asString` | `error.errorType.namespace ++ ":" ++ error.errorType.identifier` |
1017
- | `error.muleMessage` | `error.errorMessage` |
1018
- | `error.errors` | `error.childErrors` |
1042
+ | `error.muleMessage` | `error.errorMessage` |
1043
+ | `error.errors` | `error.childErrors` |
1019
1044
 
1020
1045
  **Example:**
1046
+
1021
1047
  ```dataweave
1022
1048
  // ❌ Bad - restricted in Java 17
1023
1049
  error.description
@@ -1033,17 +1059,18 @@ error.errorType.namespace ++ ":" ++ error.errorType.identifier
1033
1059
  ## API-Led Rules
1034
1060
 
1035
1061
  > **Best Practice**: Follow API-Led Connectivity architecture with clear layer separation:
1062
+ >
1036
1063
  > - **Experience Layer**: Channel-specific APIs (web, mobile)
1037
1064
  > - **Process Layer**: Orchestration and business logic
1038
1065
  > - **System Layer**: Backend system connectivity
1039
1066
 
1040
1067
  ### API-001: Experience Layer Pattern
1041
1068
 
1042
- | Property | Value |
1043
- |----------|-------|
1044
- | **Severity** | Info |
1069
+ | Property | Value |
1070
+ | ------------ | ------- |
1071
+ | **Severity** | Info |
1045
1072
  | **Category** | API-Led |
1046
- | **Fixable** | No |
1073
+ | **Fixable** | No |
1047
1074
 
1048
1075
  **Description:** Experience layer APIs (with `-exp-` in name) should have HTTP listeners as entry points.
1049
1076
 
@@ -1051,11 +1078,11 @@ error.errorType.namespace ++ ":" ++ error.errorType.identifier
1051
1078
 
1052
1079
  ### API-002: Process Layer Pattern
1053
1080
 
1054
- | Property | Value |
1055
- |----------|-------|
1056
- | **Severity** | Info |
1081
+ | Property | Value |
1082
+ | ------------ | ------- |
1083
+ | **Severity** | Info |
1057
1084
  | **Category** | API-Led |
1058
- | **Fixable** | No |
1085
+ | **Fixable** | No |
1059
1086
 
1060
1087
  **Description:** Process layer APIs (with `-proc-` in name) should orchestrate other APIs via flow-refs or HTTP requests.
1061
1088
 
@@ -1063,11 +1090,11 @@ error.errorType.namespace ++ ":" ++ error.errorType.identifier
1063
1090
 
1064
1091
  ### API-003: System Layer Pattern
1065
1092
 
1066
- | Property | Value |
1067
- |----------|-------|
1068
- | **Severity** | Info |
1093
+ | Property | Value |
1094
+ | ------------ | ------- |
1095
+ | **Severity** | Info |
1069
1096
  | **Category** | API-Led |
1070
- | **Fixable** | No |
1097
+ | **Fixable** | No |
1071
1098
 
1072
1099
  **Description:** System layer APIs (with `-sys-` in name) should connect to external systems (databases, HTTP services).
1073
1100
 
@@ -1075,11 +1102,11 @@ error.errorType.namespace ++ ":" ++ error.errorType.identifier
1075
1102
 
1076
1103
  ### API-004: Single System Per SAPI
1077
1104
 
1078
- | Property | Value |
1079
- |----------|-------|
1105
+ | Property | Value |
1106
+ | ------------ | ------- |
1080
1107
  | **Severity** | Warning |
1081
1108
  | **Category** | API-Led |
1082
- | **Fixable** | No |
1109
+ | **Fixable** | No |
1083
1110
 
1084
1111
  **Description:** System API should integrate with only one backend system. This promotes clear separation of concerns, easier maintenance, better reusability, and simplified error handling.
1085
1112
 
@@ -1093,11 +1120,11 @@ error.errorType.namespace ++ ":" ++ error.errorType.identifier
1093
1120
 
1094
1121
  ### HYG-002: Commented Code Detection
1095
1122
 
1096
- | Property | Value |
1097
- |----------|-------|
1098
- | **Severity** | Info |
1123
+ | Property | Value |
1124
+ | ------------ | --------- |
1125
+ | **Severity** | Info |
1099
1126
  | **Category** | Standards |
1100
- | **Fixable** | No |
1127
+ | **Fixable** | No |
1101
1128
 
1102
1129
  **Description:** Detects potentially commented-out code blocks in Mule configurations.
1103
1130
 
@@ -1109,15 +1136,16 @@ error.errorType.namespace ++ ":" ++ error.errorType.identifier
1109
1136
 
1110
1137
  ### HYG-003: Unused Flow Detection
1111
1138
 
1112
- | Property | Value |
1113
- |----------|-------|
1114
- | **Severity** | Warning |
1139
+ | Property | Value |
1140
+ | ------------ | --------- |
1141
+ | **Severity** | Warning |
1115
1142
  | **Category** | Standards |
1116
- | **Fixable** | No |
1143
+ | **Fixable** | No |
1117
1144
 
1118
1145
  **Description:** Detects flows and sub-flows that are never referenced by `flow-ref` within the same file.
1119
1146
 
1120
1147
  **Check Logic:**
1148
+
1121
1149
  - **Sub-flows**: Always expected to be referenced; flagged if no `flow-ref` points to them.
1122
1150
  - **Flows without triggers**: Flows that have no HTTP listener, scheduler, or VM listener and aren't referenced are flagged.
1123
1151
  - **Exclusions**: Flows matching common external patterns (`-main`, `-api`, `api-`, `-console`, `-error-handler`, `global`) are excluded.
@@ -1128,15 +1156,16 @@ error.errorType.namespace ++ ":" ++ error.errorType.identifier
1128
1156
 
1129
1157
  ### PROJ-001: POM Validation
1130
1158
 
1131
- | Property | Value |
1132
- |----------|-------|
1133
- | **Severity** | Error |
1159
+ | Property | Value |
1160
+ | ------------ | --------- |
1161
+ | **Severity** | Error |
1134
1162
  | **Category** | Structure |
1135
- | **Fixable** | No |
1163
+ | **Fixable** | No |
1136
1164
 
1137
1165
  **Description:** Validates `pom.xml` existence and critical plugins.
1138
1166
 
1139
1167
  **Checks:**
1168
+
1140
1169
  1. `pom.xml` exists in project root
1141
1170
  2. Contains `mule-maven-plugin` in build configuration
1142
1171
  3. Contains `munit-maven-plugin` if test files exist
@@ -1145,11 +1174,11 @@ error.errorType.namespace ++ ":" ++ error.errorType.identifier
1145
1174
 
1146
1175
  ### PROJ-002: Git Hygiene
1147
1176
 
1148
- | Property | Value |
1149
- |----------|-------|
1150
- | **Severity** | Warning |
1177
+ | Property | Value |
1178
+ | ------------ | --------- |
1179
+ | **Severity** | Warning |
1151
1180
  | **Category** | Structure |
1152
- | **Fixable** | No |
1181
+ | **Fixable** | No |
1153
1182
 
1154
1183
  **Description:** Validates `.gitignore` existence and standard entries in git repositories.
1155
1184
 
@@ -1163,11 +1192,11 @@ error.errorType.namespace ++ ":" ++ error.errorType.identifier
1163
1192
 
1164
1193
  ### EXP-001: Flow Reference Depth
1165
1194
 
1166
- | Property | Value |
1167
- |----------|-------|
1168
- | **Severity** | Info |
1195
+ | Property | Value |
1196
+ | ------------ | ------------ |
1197
+ | **Severity** | Info |
1169
1198
  | **Category** | Experimental |
1170
- | **Fixable** | No |
1199
+ | **Fixable** | No |
1171
1200
 
1172
1201
  **Description:** Limit the number of flow-refs in a single flow to avoid deep call chains.
1173
1202
 
@@ -1175,11 +1204,11 @@ error.errorType.namespace ++ ":" ++ error.errorType.identifier
1175
1204
 
1176
1205
  ### EXP-002: Connector Config Naming
1177
1206
 
1178
- | Property | Value |
1179
- |----------|-------|
1180
- | **Severity** | Info |
1207
+ | Property | Value |
1208
+ | ------------ | ------------ |
1209
+ | **Severity** | Info |
1181
1210
  | **Category** | Experimental |
1182
- | **Fixable** | No |
1211
+ | **Fixable** | No |
1183
1212
 
1184
1213
  **Description:** Connector configurations should follow `Convention_Type` pattern (e.g., `HTTP_Request_Config`).
1185
1214
 
@@ -1187,11 +1216,11 @@ error.errorType.namespace ++ ":" ++ error.errorType.identifier
1187
1216
 
1188
1217
  ### EXP-003: MUnit Coverage
1189
1218
 
1190
- | Property | Value |
1191
- |----------|-------|
1192
- | **Severity** | Info |
1219
+ | Property | Value |
1220
+ | ------------ | ------------ |
1221
+ | **Severity** | Info |
1193
1222
  | **Category** | Experimental |
1194
- | **Fixable** | No |
1223
+ | **Fixable** | No |
1195
1224
 
1196
1225
  **Description:** Flows should have corresponding MUnit tests in `src/test/munit`.
1197
1226
 
@@ -1199,11 +1228,11 @@ error.errorType.namespace ++ ":" ++ error.errorType.identifier
1199
1228
 
1200
1229
  ## Rule Priority Matrix
1201
1230
 
1202
- | Severity | Count | Rules |
1203
- |----------|-------|-------|
1204
- | Error | 10 | MULE-001, 003, 004, 201, 202, SEC-002, SEC-006, LOG-004, DW-004, YAML-004, PROJ-001 |
1205
- | Warning | 25 | MULE-002, 005, 006, 007, 008, 009, 101, 102, 301, 303, 401, 402, 403, 502, 503, 604, 701, 801, 802, 803, 804, SEC-003, SEC-004, PERF-002, RES-001, OPS-002, OPS-003, HYG-001, HYG-003, API-004, PROJ-002 |
1206
- | Info | 21 | MULE-010, 501, 601, YAML-001, 003, DW-001, 002, 003, API-001, 002, 003, 005, EXP-001, 002, 003, ERR-001, LOG-001, OPS-001, DOC-001, HYG-002 |
1231
+ | Severity | Count | Rules |
1232
+ | -------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1233
+ | Error | 10 | MULE-001, 003, 004, 201, 202, SEC-002, SEC-006, LOG-004, DW-004, YAML-004, PROJ-001 |
1234
+ | Warning | 25 | MULE-002, 005, 006, 007, 008, 009, 101, 102, 301, 303, 401, 402, 403, 502, 503, 604, 701, 801, 802, 803, 804, SEC-003, SEC-004, PERF-002, RES-001, OPS-002, OPS-003, HYG-001, HYG-003, API-004, PROJ-002 |
1235
+ | Info | 21 | MULE-010, 501, 601, YAML-001, 003, DW-001, 002, 003, API-001, 002, 003, 005, EXP-001, 002, 003, ERR-001, LOG-001, OPS-001, DOC-001, HYG-002 |
1207
1236
 
1208
1237
  ---
1209
1238