@sfdxy/mule-lint 1.18.0 → 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.
- package/README.md +154 -150
- package/dist/bin/mule-lint-mcp.js.map +1 -1
- package/dist/bin/mule-lint.js +4 -3
- package/dist/bin/mule-lint.js.map +1 -1
- package/dist/package.json +26 -15
- package/dist/src/core/ComplexityCalculator.d.ts.map +1 -1
- package/dist/src/core/ComplexityCalculator.js.map +1 -1
- package/dist/src/core/FileScanner.d.ts.map +1 -1
- package/dist/src/core/FileScanner.js.map +1 -1
- package/dist/src/core/MetricsAggregator.d.ts.map +1 -1
- package/dist/src/core/MetricsAggregator.js.map +1 -1
- package/dist/src/core/MetricsCollector.d.ts.map +1 -1
- package/dist/src/core/MetricsCollector.js +1 -2
- package/dist/src/core/MetricsCollector.js.map +1 -1
- package/dist/src/core/QualityGateEvaluator.d.ts.map +1 -1
- package/dist/src/core/QualityGateEvaluator.js.map +1 -1
- package/dist/src/core/XPathHelper.d.ts +9 -1
- package/dist/src/core/XPathHelper.d.ts.map +1 -1
- package/dist/src/core/XPathHelper.js +4 -9
- package/dist/src/core/XPathHelper.js.map +1 -1
- package/dist/src/core/XmlParser.d.ts.map +1 -1
- package/dist/src/core/XmlParser.js.map +1 -1
- package/dist/src/core/YamlParser.d.ts.map +1 -1
- package/dist/src/core/YamlParser.js.map +1 -1
- package/dist/src/core/errors.js.map +1 -1
- package/dist/src/engine/LintEngine.d.ts.map +1 -1
- package/dist/src/engine/LintEngine.js +2 -4
- package/dist/src/engine/LintEngine.js.map +1 -1
- package/dist/src/formatter/MuleXmlFormatter.d.ts.map +1 -1
- package/dist/src/formatter/MuleXmlFormatter.js +7 -1
- package/dist/src/formatter/MuleXmlFormatter.js.map +1 -1
- package/dist/src/formatter/index.d.ts +2 -2
- package/dist/src/formatter/index.d.ts.map +1 -1
- package/dist/src/formatter/index.js.map +1 -1
- package/dist/src/formatters/CsvFormatter.js.map +1 -1
- package/dist/src/formatters/HtmlFormatter.js +0 -1
- package/dist/src/formatters/HtmlFormatter.js.map +1 -1
- package/dist/src/formatters/JsonFormatter.d.ts.map +1 -1
- package/dist/src/formatters/JsonFormatter.js.map +1 -1
- package/dist/src/formatters/SarifFormatter.js.map +1 -1
- package/dist/src/formatters/TableFormatter.js.map +1 -1
- package/dist/src/formatters/html/components/Icons.js +1 -1
- package/dist/src/formatters/html/components/Icons.js.map +1 -1
- package/dist/src/formatters/html/components/MetricCard.d.ts.map +1 -1
- package/dist/src/formatters/html/components/MetricCard.js.map +1 -1
- package/dist/src/formatters/html/components/Modal.d.ts.map +1 -1
- package/dist/src/formatters/html/components/Modal.js.map +1 -1
- package/dist/src/formatters/html/components/RatingBadge.d.ts.map +1 -1
- package/dist/src/formatters/html/components/RatingBadge.js +6 -6
- package/dist/src/formatters/html/components/RatingBadge.js.map +1 -1
- package/dist/src/formatters/html/index.d.ts +2 -2
- package/dist/src/formatters/html/index.d.ts.map +1 -1
- package/dist/src/formatters/html/index.js.map +1 -1
- package/dist/src/formatters/html/scripts/charts.d.ts.map +1 -1
- package/dist/src/formatters/html/scripts/charts.js +45 -12
- package/dist/src/formatters/html/scripts/charts.js.map +1 -1
- package/dist/src/formatters/html/scripts/index.d.ts.map +1 -1
- package/dist/src/formatters/html/scripts/index.js.map +1 -1
- package/dist/src/formatters/html/scripts/renderer.d.ts.map +1 -1
- package/dist/src/formatters/html/scripts/renderer.js +175 -35
- package/dist/src/formatters/html/scripts/renderer.js.map +1 -1
- package/dist/src/formatters/html/sections/Header.d.ts.map +1 -1
- package/dist/src/formatters/html/sections/Header.js.map +1 -1
- package/dist/src/formatters/html/sections/LintSummary.d.ts.map +1 -1
- package/dist/src/formatters/html/sections/LintSummary.js.map +1 -1
- package/dist/src/formatters/html/sections/QualityRatings.js.map +1 -1
- package/dist/src/formatters/html/sections/Sidebar.d.ts.map +1 -1
- package/dist/src/formatters/html/sections/Sidebar.js.map +1 -1
- package/dist/src/formatters/html/styles/badges.d.ts.map +1 -1
- package/dist/src/formatters/html/styles/badges.js.map +1 -1
- package/dist/src/formatters/html/styles/index.d.ts.map +1 -1
- package/dist/src/formatters/html/styles/index.js.map +1 -1
- package/dist/src/formatters/html/theme.js.map +1 -1
- package/dist/src/formatters/html/views/Dashboard.js +5 -5
- package/dist/src/formatters/html/views/Dashboard.js.map +1 -1
- package/dist/src/formatters/html/views/IssuesView.d.ts.map +1 -1
- package/dist/src/formatters/html/views/IssuesView.js.map +1 -1
- package/dist/src/formatters/index.js.map +1 -1
- package/dist/src/mcp/index.d.ts.map +1 -1
- package/dist/src/mcp/index.js +12 -511
- package/dist/src/mcp/index.js.map +1 -1
- package/dist/src/mcp/prompts/index.d.ts +6 -0
- package/dist/src/mcp/prompts/index.d.ts.map +1 -0
- package/dist/src/mcp/prompts/index.js +87 -0
- package/dist/src/mcp/prompts/index.js.map +1 -0
- package/dist/src/mcp/resources/index.d.ts +6 -0
- package/dist/src/mcp/resources/index.d.ts.map +1 -0
- package/dist/src/mcp/resources/index.js +189 -0
- package/dist/src/mcp/resources/index.js.map +1 -0
- package/dist/src/mcp/tools/formatMuleXml.d.ts +6 -0
- package/dist/src/mcp/tools/formatMuleXml.d.ts.map +1 -0
- package/dist/src/mcp/tools/formatMuleXml.js +133 -0
- package/dist/src/mcp/tools/formatMuleXml.js.map +1 -0
- package/dist/src/mcp/tools/getRuleDetails.d.ts +6 -0
- package/dist/src/mcp/tools/getRuleDetails.d.ts.map +1 -0
- package/dist/src/mcp/tools/getRuleDetails.js +44 -0
- package/dist/src/mcp/tools/getRuleDetails.js.map +1 -0
- package/dist/src/mcp/tools/runLintAnalysis.d.ts +7 -0
- package/dist/src/mcp/tools/runLintAnalysis.d.ts.map +1 -0
- package/dist/src/mcp/tools/runLintAnalysis.js +76 -0
- package/dist/src/mcp/tools/runLintAnalysis.js.map +1 -0
- package/dist/src/mcp/tools/validateSnippet.d.ts +6 -0
- package/dist/src/mcp/tools/validateSnippet.d.ts.map +1 -0
- package/dist/src/mcp/tools/validateSnippet.js +59 -0
- package/dist/src/mcp/tools/validateSnippet.js.map +1 -0
- package/dist/src/quality/calculator.d.ts.map +1 -1
- package/dist/src/quality/calculator.js +1 -1
- package/dist/src/quality/calculator.js.map +1 -1
- package/dist/src/quality/index.d.ts.map +1 -1
- package/dist/src/quality/index.js.map +1 -1
- package/dist/src/quality/thresholds.js.map +1 -1
- package/dist/src/quality/types.d.ts.map +1 -1
- package/dist/src/rules/api-led/ApiLedRules.d.ts.map +1 -1
- package/dist/src/rules/api-led/ApiLedRules.js +6 -2
- package/dist/src/rules/api-led/ApiLedRules.js.map +1 -1
- package/dist/src/rules/api-led/SingleSystemSapiRule.d.ts.map +1 -1
- package/dist/src/rules/api-led/SingleSystemSapiRule.js.map +1 -1
- package/dist/src/rules/base/BaseRule.d.ts.map +1 -1
- package/dist/src/rules/base/BaseRule.js.map +1 -1
- package/dist/src/rules/base/ProjectRule.d.ts.map +1 -1
- package/dist/src/rules/base/ProjectRule.js.map +1 -1
- package/dist/src/rules/complexity/FlowComplexityRule.d.ts.map +1 -1
- package/dist/src/rules/complexity/FlowComplexityRule.js.map +1 -1
- package/dist/src/rules/dataweave/DataWeaveRules.d.ts.map +1 -1
- package/dist/src/rules/dataweave/DataWeaveRules.js +1 -3
- package/dist/src/rules/dataweave/DataWeaveRules.js.map +1 -1
- package/dist/src/rules/dataweave/Java17DWErrorHandlingRule.d.ts.map +1 -1
- package/dist/src/rules/dataweave/Java17DWErrorHandlingRule.js.map +1 -1
- package/dist/src/rules/documentation/DisplayNameRule.d.ts.map +1 -1
- package/dist/src/rules/documentation/DisplayNameRule.js.map +1 -1
- package/dist/src/rules/documentation/FlowDescriptionRule.d.ts.map +1 -1
- package/dist/src/rules/documentation/FlowDescriptionRule.js.map +1 -1
- package/dist/src/rules/documentation/MissingDocNameRule.d.ts.map +1 -1
- package/dist/src/rules/documentation/MissingDocNameRule.js.map +1 -1
- package/dist/src/rules/error-handling/CorrelationIdRule.d.ts.map +1 -1
- package/dist/src/rules/error-handling/CorrelationIdRule.js.map +1 -1
- package/dist/src/rules/error-handling/GenericErrorRule.d.ts.map +1 -1
- package/dist/src/rules/error-handling/GenericErrorRule.js.map +1 -1
- package/dist/src/rules/error-handling/GlobalErrorHandlerRule.d.ts.map +1 -1
- package/dist/src/rules/error-handling/GlobalErrorHandlerRule.js.map +1 -1
- package/dist/src/rules/error-handling/HttpStatusRule.d.ts.map +1 -1
- package/dist/src/rules/error-handling/HttpStatusRule.js.map +1 -1
- package/dist/src/rules/error-handling/MissingErrorHandlerRule.d.ts.map +1 -1
- package/dist/src/rules/error-handling/MissingErrorHandlerRule.js.map +1 -1
- package/dist/src/rules/error-handling/TryScopeRule.d.ts.map +1 -1
- package/dist/src/rules/error-handling/TryScopeRule.js.map +1 -1
- package/dist/src/rules/experimental/ExperimentalRules.d.ts.map +1 -1
- package/dist/src/rules/experimental/ExperimentalRules.js +6 -2
- package/dist/src/rules/experimental/ExperimentalRules.js.map +1 -1
- package/dist/src/rules/governance/GovernanceRules.d.ts +2 -2
- package/dist/src/rules/governance/GovernanceRules.d.ts.map +1 -1
- package/dist/src/rules/governance/GovernanceRules.js +2 -2
- package/dist/src/rules/governance/GovernanceRules.js.map +1 -1
- package/dist/src/rules/http/HttpContentTypeRule.d.ts.map +1 -1
- package/dist/src/rules/http/HttpContentTypeRule.js.map +1 -1
- package/dist/src/rules/http/HttpTimeoutRule.d.ts.map +1 -1
- package/dist/src/rules/http/HttpTimeoutRule.js.map +1 -1
- package/dist/src/rules/http/HttpUserAgentRule.d.ts.map +1 -1
- package/dist/src/rules/http/HttpUserAgentRule.js.map +1 -1
- package/dist/src/rules/index.js.map +1 -1
- package/dist/src/rules/logging/ExcessiveLoggersRule.d.ts.map +1 -1
- package/dist/src/rules/logging/ExcessiveLoggersRule.js.map +1 -1
- package/dist/src/rules/logging/LoggerCategoryRule.d.ts.map +1 -1
- package/dist/src/rules/logging/LoggerCategoryRule.js.map +1 -1
- package/dist/src/rules/logging/LoggerInUntilSuccessfulRule.d.ts.map +1 -1
- package/dist/src/rules/logging/LoggerInUntilSuccessfulRule.js.map +1 -1
- package/dist/src/rules/logging/LoggerPayloadRule.d.ts.map +1 -1
- package/dist/src/rules/logging/LoggerPayloadRule.js.map +1 -1
- package/dist/src/rules/logging/NewLoggingRules.d.ts.map +1 -1
- package/dist/src/rules/logging/NewLoggingRules.js.map +1 -1
- package/dist/src/rules/naming/FlowCasingRule.d.ts.map +1 -1
- package/dist/src/rules/naming/FlowCasingRule.js.map +1 -1
- package/dist/src/rules/naming/FlowNamingRule.d.ts.map +1 -1
- package/dist/src/rules/naming/FlowNamingRule.js +3 -1
- package/dist/src/rules/naming/FlowNamingRule.js.map +1 -1
- package/dist/src/rules/naming/VariableNamingRule.d.ts.map +1 -1
- package/dist/src/rules/naming/VariableNamingRule.js.map +1 -1
- package/dist/src/rules/operations/CommentedCodeRule.d.ts.map +1 -1
- package/dist/src/rules/operations/CommentedCodeRule.js.map +1 -1
- package/dist/src/rules/operations/UnusedFlowRule.d.ts.map +1 -1
- package/dist/src/rules/operations/UnusedFlowRule.js.map +1 -1
- package/dist/src/rules/performance/AsyncErrorHandlerRule.d.ts.map +1 -1
- package/dist/src/rules/performance/AsyncErrorHandlerRule.js.map +1 -1
- package/dist/src/rules/performance/ConnectionPoolingRule.d.ts.map +1 -1
- package/dist/src/rules/performance/ConnectionPoolingRule.js.map +1 -1
- package/dist/src/rules/performance/LargeChoiceBlockRule.d.ts.map +1 -1
- package/dist/src/rules/performance/LargeChoiceBlockRule.js.map +1 -1
- package/dist/src/rules/performance/ReconnectionStrategyRule.d.ts.map +1 -1
- package/dist/src/rules/performance/ReconnectionStrategyRule.js.map +1 -1
- package/dist/src/rules/performance/ScatterGatherRoutesRule.d.ts.map +1 -1
- package/dist/src/rules/performance/ScatterGatherRoutesRule.js.map +1 -1
- package/dist/src/rules/security/EncryptionKeyInLogsRule.d.ts.map +1 -1
- package/dist/src/rules/security/EncryptionKeyInLogsRule.js.map +1 -1
- package/dist/src/rules/security/HardcodedCredentialsRule.d.ts.map +1 -1
- package/dist/src/rules/security/HardcodedCredentialsRule.js.map +1 -1
- package/dist/src/rules/security/HardcodedHttpRule.d.ts.map +1 -1
- package/dist/src/rules/security/HardcodedHttpRule.js +1 -9
- package/dist/src/rules/security/HardcodedHttpRule.js.map +1 -1
- package/dist/src/rules/security/InputValidationRule.d.ts.map +1 -1
- package/dist/src/rules/security/InputValidationRule.js +1 -3
- package/dist/src/rules/security/InputValidationRule.js.map +1 -1
- package/dist/src/rules/security/InsecureTlsRule.d.ts.map +1 -1
- package/dist/src/rules/security/InsecureTlsRule.js.map +1 -1
- package/dist/src/rules/security/RateLimitingRule.d.ts.map +1 -1
- package/dist/src/rules/security/RateLimitingRule.js.map +1 -1
- package/dist/src/rules/security/TlsVersionRule.d.ts.map +1 -1
- package/dist/src/rules/security/TlsVersionRule.js.map +1 -1
- package/dist/src/rules/standards/ApiKitValidationRule.d.ts.map +1 -1
- package/dist/src/rules/standards/ApiKitValidationRule.js.map +1 -1
- package/dist/src/rules/standards/AutoDiscoveryRule.d.ts.map +1 -1
- package/dist/src/rules/standards/AutoDiscoveryRule.js.map +1 -1
- package/dist/src/rules/standards/ChoiceAntiPatternRule.d.ts.map +1 -1
- package/dist/src/rules/standards/ChoiceAntiPatternRule.js.map +1 -1
- package/dist/src/rules/standards/CronExternalizedRule.d.ts.map +1 -1
- package/dist/src/rules/standards/CronExternalizedRule.js.map +1 -1
- package/dist/src/rules/standards/DeprecatedComponentRule.d.ts.map +1 -1
- package/dist/src/rules/standards/DeprecatedComponentRule.js.map +1 -1
- package/dist/src/rules/standards/DwlStandardsRule.d.ts.map +1 -1
- package/dist/src/rules/standards/DwlStandardsRule.js.map +1 -1
- package/dist/src/rules/standards/HttpPortPlaceholderRule.d.ts.map +1 -1
- package/dist/src/rules/standards/HttpPortPlaceholderRule.js.map +1 -1
- package/dist/src/rules/structure/StructureRules.d.ts.map +1 -1
- package/dist/src/rules/structure/StructureRules.js.map +1 -1
- package/dist/src/rules/yaml/YamlRules.d.ts.map +1 -1
- package/dist/src/rules/yaml/YamlRules.js +2 -7
- package/dist/src/rules/yaml/YamlRules.js.map +1 -1
- package/dist/src/types/Config.d.ts.map +1 -1
- package/dist/src/types/Config.js.map +1 -1
- package/dist/src/types/QualityGate.d.ts.map +1 -1
- package/dist/src/types/QualityGate.js.map +1 -1
- package/dist/src/types/Report.d.ts.map +1 -1
- package/dist/src/types/Rule.d.ts +1 -1
- package/dist/src/types/Rule.d.ts.map +1 -1
- package/docs/README.md +27 -27
- package/docs/best-practices/documentation-standards.md +20 -11
- package/docs/best-practices/folder-structure.md +16 -10
- package/docs/best-practices/mulesoft-best-practices.md +96 -94
- package/docs/best-practices/rules-catalog.md +316 -287
- package/docs/linter/architecture.md +70 -64
- package/docs/linter/extending.md +137 -128
- package/docs/linter/folder-structure.md +39 -38
- package/docs/linter/naming-conventions.md +80 -78
- package/docs/linter/rule-engine.md +306 -306
- package/docs/mcp-design.md +35 -21
- package/package.json +84 -73
|
@@ -30,38 +30,38 @@
|
|
|
30
30
|
|
|
31
31
|
## Rule Categories
|
|
32
32
|
|
|
33
|
-
| Family
|
|
34
|
-
|
|
35
|
-
| Error Handling | MULE-001/003/005/007/009, ERR-001
|
|
36
|
-
| Naming
|
|
37
|
-
| Security
|
|
38
|
-
| Logging
|
|
39
|
-
| HTTP
|
|
40
|
-
| Performance
|
|
41
|
-
| Documentation
|
|
42
|
-
| Standards
|
|
43
|
-
| Complexity
|
|
44
|
-
| Structure
|
|
45
|
-
| YAML
|
|
46
|
-
| DataWeave
|
|
47
|
-
| API-Led
|
|
48
|
-
| Governance
|
|
49
|
-
| Code Hygiene
|
|
50
|
-
| Experimental
|
|
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
|
|
55
|
-
|
|
56
|
-
| 001-099 | Error Handling
|
|
57
|
-
| 100-199 | Naming
|
|
58
|
-
| 200-299 | Security
|
|
59
|
-
| 300-399 | Logging
|
|
60
|
-
| 400-499 | HTTP
|
|
61
|
-
| 500-599 | Performance
|
|
62
|
-
| 600-699 | Documentation
|
|
63
|
-
| 700-799 | 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
|
|
77
|
-
|
|
78
|
-
| **Severity** | Error
|
|
76
|
+
| Property | Value |
|
|
77
|
+
| ------------ | -------------- |
|
|
78
|
+
| **Severity** | Error |
|
|
79
79
|
| **Category** | Error Handling |
|
|
80
|
-
| **Fixable**
|
|
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
|
|
95
|
-
|
|
96
|
-
| **Severity** | Error
|
|
95
|
+
| Property | Value |
|
|
96
|
+
| ------------ | -------------- |
|
|
97
|
+
| **Severity** | Error |
|
|
97
98
|
| **Category** | Error Handling |
|
|
98
|
-
| **Fixable**
|
|
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
|
|
112
|
-
|
|
113
|
-
| **Severity** | Warning
|
|
113
|
+
| Property | Value |
|
|
114
|
+
| ------------ | -------------- |
|
|
115
|
+
| **Severity** | Warning |
|
|
114
116
|
| **Category** | Error Handling |
|
|
115
|
-
| **Fixable**
|
|
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
|
|
126
|
-
|
|
127
|
-
| **Severity** | Warning
|
|
127
|
+
| Property | Value |
|
|
128
|
+
| ------------ | -------------- |
|
|
129
|
+
| **Severity** | Warning |
|
|
128
130
|
| **Category** | Error Handling |
|
|
129
|
-
| **Fixable**
|
|
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
|
|
138
|
-
|
|
139
|
-
| **Severity** | Warning
|
|
139
|
+
| Property | Value |
|
|
140
|
+
| ------------ | -------------- |
|
|
141
|
+
| **Severity** | Warning |
|
|
140
142
|
| **Category** | Error Handling |
|
|
141
|
-
| **Fixable**
|
|
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
|
|
152
|
-
|
|
153
|
-
| **Severity**
|
|
154
|
-
| **Category**
|
|
155
|
-
| **Issue Type** | Bug
|
|
156
|
-
| **Fixable**
|
|
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
|
|
192
|
-
|
|
194
|
+
| Property | Value |
|
|
195
|
+
| ------------ | ------- |
|
|
193
196
|
| **Severity** | Warning |
|
|
194
|
-
| **Category** | Naming
|
|
195
|
-
| **Fixable**
|
|
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
|
|
215
|
-
|
|
218
|
+
| Property | Value |
|
|
219
|
+
| ------------ | ------- |
|
|
216
220
|
| **Severity** | Warning |
|
|
217
|
-
| **Category** | Naming
|
|
218
|
-
| **Fixable**
|
|
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
|
|
232
|
-
|
|
236
|
+
| Property | Value |
|
|
237
|
+
| ------------ | ------- |
|
|
233
238
|
| **Severity** | Warning |
|
|
234
|
-
| **Category** | Naming
|
|
235
|
-
| **Fixable**
|
|
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
|
|
248
|
-
|
|
249
|
-
| **Severity** | Error
|
|
252
|
+
| Property | Value |
|
|
253
|
+
| ------------ | -------- |
|
|
254
|
+
| **Severity** | Error |
|
|
250
255
|
| **Category** | Security |
|
|
251
|
-
| **Fixable**
|
|
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
|
|
269
|
-
|
|
270
|
-
| **Severity** | Error
|
|
274
|
+
| Property | Value |
|
|
275
|
+
| ------------ | -------- |
|
|
276
|
+
| **Severity** | Error |
|
|
271
277
|
| **Category** | Security |
|
|
272
|
-
| **Fixable**
|
|
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
|
|
283
|
-
|
|
284
|
-
| **Severity** | Error
|
|
288
|
+
| Property | Value |
|
|
289
|
+
| ------------ | -------- |
|
|
290
|
+
| **Severity** | Error |
|
|
285
291
|
| **Category** | Security |
|
|
286
|
-
| **Fixable**
|
|
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
|
|
295
|
-
|
|
296
|
-
| **Severity**
|
|
297
|
-
| **Category**
|
|
300
|
+
| Property | Value |
|
|
301
|
+
| -------------- | ------------- |
|
|
302
|
+
| **Severity** | Error |
|
|
303
|
+
| **Category** | Security |
|
|
298
304
|
| **Issue Type** | Vulnerability |
|
|
299
|
-
| **Fixable**
|
|
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
|
|
319
|
-
|
|
320
|
-
| **Severity**
|
|
321
|
-
| **Category**
|
|
325
|
+
| Property | Value |
|
|
326
|
+
| -------------- | ------------- |
|
|
327
|
+
| **Severity** | Warning |
|
|
328
|
+
| **Category** | Security |
|
|
322
329
|
| **Issue Type** | Vulnerability |
|
|
323
|
-
| **Fixable**
|
|
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
|
|
336
|
-
|
|
337
|
-
| **Severity**
|
|
338
|
-
| **Category**
|
|
342
|
+
| Property | Value |
|
|
343
|
+
| -------------- | ------------- |
|
|
344
|
+
| **Severity** | Warning |
|
|
345
|
+
| **Category** | Security |
|
|
339
346
|
| **Issue Type** | Vulnerability |
|
|
340
|
-
| **Fixable**
|
|
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
|
|
360
|
-
|
|
361
|
-
| **Severity** | Error
|
|
367
|
+
| Property | Value |
|
|
368
|
+
| ------------ | -------- |
|
|
369
|
+
| **Severity** | Error |
|
|
362
370
|
| **Category** | Security |
|
|
363
|
-
| **Fixable**
|
|
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
|
|
387
|
-
|
|
395
|
+
| Property | Value |
|
|
396
|
+
| ------------ | ------- |
|
|
388
397
|
| **Severity** | Warning |
|
|
389
398
|
| **Category** | Logging |
|
|
390
|
-
| **Fixable**
|
|
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
|
|
405
|
-
|
|
414
|
+
| Property | Value |
|
|
415
|
+
| ------------ | ------- |
|
|
406
416
|
| **Severity** | Warning |
|
|
407
417
|
| **Category** | Logging |
|
|
408
|
-
| **Fixable**
|
|
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
|
|
426
|
-
|
|
436
|
+
| Property | Value |
|
|
437
|
+
| ------------ | ------- |
|
|
427
438
|
| **Severity** | Warning |
|
|
428
439
|
| **Category** | Logging |
|
|
429
|
-
| **Fixable**
|
|
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
|
|
438
|
-
|
|
439
|
-
| **Severity** | Info
|
|
448
|
+
| Property | Value |
|
|
449
|
+
| ------------ | ------- |
|
|
450
|
+
| **Severity** | Info |
|
|
440
451
|
| **Category** | Logging |
|
|
441
|
-
| **Fixable**
|
|
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
|
|
454
|
-
|
|
455
|
-
| **Severity** | Error
|
|
464
|
+
| Property | Value |
|
|
465
|
+
| ------------ | ------- |
|
|
466
|
+
| **Severity** | Error |
|
|
456
467
|
| **Category** | Logging |
|
|
457
|
-
| **Fixable**
|
|
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
|
|
477
|
-
|
|
488
|
+
| Property | Value |
|
|
489
|
+
| ------------ | ------- |
|
|
478
490
|
| **Severity** | Warning |
|
|
479
491
|
| **Category** | Logging |
|
|
480
|
-
| **Fixable**
|
|
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
|
|
506
|
-
|
|
518
|
+
| Property | Value |
|
|
519
|
+
| ------------ | ------- |
|
|
507
520
|
| **Severity** | Warning |
|
|
508
|
-
| **Category** | HTTP
|
|
509
|
-
| **Fixable**
|
|
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
|
|
518
|
-
|
|
530
|
+
| Property | Value |
|
|
531
|
+
| ------------ | ------- |
|
|
519
532
|
| **Severity** | Warning |
|
|
520
|
-
| **Category** | HTTP
|
|
521
|
-
| **Fixable**
|
|
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
|
|
530
|
-
|
|
542
|
+
| Property | Value |
|
|
543
|
+
| ------------ | ------- |
|
|
531
544
|
| **Severity** | Warning |
|
|
532
|
-
| **Category** | HTTP
|
|
533
|
-
| **Fixable**
|
|
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
|
|
548
|
-
|
|
549
|
-
| **Severity** | Info
|
|
560
|
+
| Property | Value |
|
|
561
|
+
| ------------ | ----------- |
|
|
562
|
+
| **Severity** | Info |
|
|
550
563
|
| **Category** | Performance |
|
|
551
|
-
| **Fixable**
|
|
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
|
|
560
|
-
|
|
561
|
-
| **Severity** | Warning
|
|
572
|
+
| Property | Value |
|
|
573
|
+
| ------------ | ----------- |
|
|
574
|
+
| **Severity** | Warning |
|
|
562
575
|
| **Category** | Performance |
|
|
563
|
-
| **Fixable**
|
|
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
|
|
574
|
-
|
|
575
|
-
| **Severity** | Warning
|
|
586
|
+
| Property | Value |
|
|
587
|
+
| ------------ | ----------- |
|
|
588
|
+
| **Severity** | Warning |
|
|
576
589
|
| **Category** | Performance |
|
|
577
|
-
| **Fixable**
|
|
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
|
|
586
|
-
|
|
587
|
-
| **Severity** | Warning
|
|
598
|
+
| Property | Value |
|
|
599
|
+
| ------------ | ----------- |
|
|
600
|
+
| **Severity** | Warning |
|
|
588
601
|
| **Category** | Performance |
|
|
589
|
-
| **Fixable**
|
|
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
|
|
611
|
-
|
|
612
|
-
| **Severity** | Warning
|
|
624
|
+
| Property | Value |
|
|
625
|
+
| ------------ | ----------- |
|
|
626
|
+
| **Severity** | Warning |
|
|
613
627
|
| **Category** | Performance |
|
|
614
|
-
| **Fixable**
|
|
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
|
|
641
|
-
|
|
642
|
-
| **Severity** | Info
|
|
655
|
+
| Property | Value |
|
|
656
|
+
| ------------ | ------------- |
|
|
657
|
+
| **Severity** | Info |
|
|
643
658
|
| **Category** | Documentation |
|
|
644
|
-
| **Fixable**
|
|
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
|
|
653
|
-
|
|
654
|
-
| **Severity** | Warning
|
|
667
|
+
| Property | Value |
|
|
668
|
+
| ------------ | ------------- |
|
|
669
|
+
| **Severity** | Warning |
|
|
655
670
|
| **Category** | Documentation |
|
|
656
|
-
| **Fixable**
|
|
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
|
|
665
|
-
|
|
666
|
-
| **Severity** | Info
|
|
679
|
+
| Property | Value |
|
|
680
|
+
| ------------ | ------------- |
|
|
681
|
+
| **Severity** | Info |
|
|
667
682
|
| **Category** | Documentation |
|
|
668
|
-
| **Fixable**
|
|
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
|
|
690
|
-
|
|
691
|
-
| **Severity** | Warning
|
|
705
|
+
| Property | Value |
|
|
706
|
+
| ------------ | --------- |
|
|
707
|
+
| **Severity** | Warning |
|
|
692
708
|
| **Category** | Standards |
|
|
693
|
-
| **Fixable**
|
|
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
|
|
702
|
-
|
|
703
|
-
| **Severity** | Info
|
|
717
|
+
| Property | Value |
|
|
718
|
+
| ------------ | --------- |
|
|
719
|
+
| **Severity** | Info |
|
|
704
720
|
| **Category** | Standards |
|
|
705
|
-
| **Fixable**
|
|
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
|
|
714
|
-
|
|
715
|
-
| **Severity** | Warning
|
|
729
|
+
| Property | Value |
|
|
730
|
+
| ------------ | --------- |
|
|
731
|
+
| **Severity** | Warning |
|
|
716
732
|
| **Category** | Standards |
|
|
717
|
-
| **Fixable**
|
|
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
|
|
726
|
-
|
|
727
|
-
| **Severity** | Info
|
|
741
|
+
| Property | Value |
|
|
742
|
+
| ------------ | --------- |
|
|
743
|
+
| **Severity** | Info |
|
|
728
744
|
| **Category** | Standards |
|
|
729
|
-
| **Fixable**
|
|
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
|
|
746
|
-
|
|
747
|
-
| **Severity** | Warning
|
|
762
|
+
| Property | Value |
|
|
763
|
+
| ------------ | --------- |
|
|
764
|
+
| **Severity** | Warning |
|
|
748
765
|
| **Category** | Standards |
|
|
749
|
-
| **Fixable**
|
|
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
|
|
767
|
-
|
|
768
|
-
| **Severity** | Warning
|
|
784
|
+
| Property | Value |
|
|
785
|
+
| ------------ | --------- |
|
|
786
|
+
| **Severity** | Warning |
|
|
769
787
|
| **Category** | Standards |
|
|
770
|
-
| **Fixable**
|
|
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
|
|
792
|
-
|
|
793
|
-
| **Severity** | Info
|
|
810
|
+
| Property | Value |
|
|
811
|
+
| ------------ | --------- |
|
|
812
|
+
| **Severity** | Info |
|
|
794
813
|
| **Category** | Standards |
|
|
795
|
-
| **Fixable**
|
|
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
|
|
812
|
-
|
|
813
|
-
| **Severity** | Warning
|
|
830
|
+
| Property | Value |
|
|
831
|
+
| ------------ | ---------- |
|
|
832
|
+
| **Severity** | Warning |
|
|
814
833
|
| **Category** | Complexity |
|
|
815
|
-
| **Fixable**
|
|
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
|
|
854
|
-
|
|
855
|
-
| **Severity** | Warning
|
|
873
|
+
| Property | Value |
|
|
874
|
+
| ------------ | --------- |
|
|
875
|
+
| **Severity** | Warning |
|
|
856
876
|
| **Category** | Structure |
|
|
857
|
-
| **Fixable**
|
|
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
|
|
875
|
-
|
|
876
|
-
| **Severity** | Warning
|
|
896
|
+
| Property | Value |
|
|
897
|
+
| ------------ | --------- |
|
|
898
|
+
| **Severity** | Warning |
|
|
877
899
|
| **Category** | Structure |
|
|
878
|
-
| **Fixable**
|
|
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
|
|
887
|
-
|
|
888
|
-
| **Severity** | Warning
|
|
908
|
+
| Property | Value |
|
|
909
|
+
| ------------ | --------- |
|
|
910
|
+
| **Severity** | Warning |
|
|
889
911
|
| **Category** | Structure |
|
|
890
|
-
| **Fixable**
|
|
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
|
|
903
|
-
|
|
904
|
-
| **Severity** | Warning
|
|
924
|
+
| Property | Value |
|
|
925
|
+
| ------------ | --------- |
|
|
926
|
+
| **Severity** | Warning |
|
|
905
927
|
| **Category** | Standards |
|
|
906
|
-
| **Fixable**
|
|
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
|
|
920
|
-
|
|
921
|
-
| **Severity** | Info
|
|
942
|
+
| Property | Value |
|
|
943
|
+
| ------------ | --------- |
|
|
944
|
+
| **Severity** | Info |
|
|
922
945
|
| **Category** | Standards |
|
|
923
|
-
| **Fixable**
|
|
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
|
|
943
|
-
|
|
944
|
-
| **Severity** | Error
|
|
966
|
+
| Property | Value |
|
|
967
|
+
| ------------ | -------- |
|
|
968
|
+
| **Severity** | Error |
|
|
945
969
|
| **Category** | Security |
|
|
946
|
-
| **Fixable**
|
|
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
|
|
968
|
-
|
|
969
|
-
| **Severity** | Warning
|
|
992
|
+
| Property | Value |
|
|
993
|
+
| ------------ | --------- |
|
|
994
|
+
| **Severity** | Warning |
|
|
970
995
|
| **Category** | DataWeave |
|
|
971
|
-
| **Fixable**
|
|
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
|
|
980
|
-
|
|
981
|
-
| **Severity** | Info
|
|
1004
|
+
| Property | Value |
|
|
1005
|
+
| ------------ | --------- |
|
|
1006
|
+
| **Severity** | Info |
|
|
982
1007
|
| **Category** | DataWeave |
|
|
983
|
-
| **Fixable**
|
|
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
|
|
992
|
-
|
|
993
|
-
| **Severity** | Info
|
|
1016
|
+
| Property | Value |
|
|
1017
|
+
| ------------ | --------- |
|
|
1018
|
+
| **Severity** | Info |
|
|
994
1019
|
| **Category** | DataWeave |
|
|
995
|
-
| **Fixable**
|
|
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
|
|
1004
|
-
|
|
1005
|
-
| **Severity** | Error
|
|
1028
|
+
| Property | Value |
|
|
1029
|
+
| ------------ | --------- |
|
|
1030
|
+
| **Severity** | Error |
|
|
1006
1031
|
| **Category** | DataWeave |
|
|
1007
|
-
| **Fixable**
|
|
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
|
|
1014
|
-
|
|
1015
|
-
| `error.description`
|
|
1038
|
+
| Forbidden | Replacement |
|
|
1039
|
+
| -------------------------- | ---------------------------------------------------------------- |
|
|
1040
|
+
| `error.description` | `error.detailedDescription` |
|
|
1016
1041
|
| `error.errorType.asString` | `error.errorType.namespace ++ ":" ++ error.errorType.identifier` |
|
|
1017
|
-
| `error.muleMessage`
|
|
1018
|
-
| `error.errors`
|
|
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
|
|
1043
|
-
|
|
1044
|
-
| **Severity** | Info
|
|
1069
|
+
| Property | Value |
|
|
1070
|
+
| ------------ | ------- |
|
|
1071
|
+
| **Severity** | Info |
|
|
1045
1072
|
| **Category** | API-Led |
|
|
1046
|
-
| **Fixable**
|
|
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
|
|
1055
|
-
|
|
1056
|
-
| **Severity** | Info
|
|
1081
|
+
| Property | Value |
|
|
1082
|
+
| ------------ | ------- |
|
|
1083
|
+
| **Severity** | Info |
|
|
1057
1084
|
| **Category** | API-Led |
|
|
1058
|
-
| **Fixable**
|
|
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
|
|
1067
|
-
|
|
1068
|
-
| **Severity** | Info
|
|
1093
|
+
| Property | Value |
|
|
1094
|
+
| ------------ | ------- |
|
|
1095
|
+
| **Severity** | Info |
|
|
1069
1096
|
| **Category** | API-Led |
|
|
1070
|
-
| **Fixable**
|
|
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
|
|
1079
|
-
|
|
1105
|
+
| Property | Value |
|
|
1106
|
+
| ------------ | ------- |
|
|
1080
1107
|
| **Severity** | Warning |
|
|
1081
1108
|
| **Category** | API-Led |
|
|
1082
|
-
| **Fixable**
|
|
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
|
|
1097
|
-
|
|
1098
|
-
| **Severity** | Info
|
|
1123
|
+
| Property | Value |
|
|
1124
|
+
| ------------ | --------- |
|
|
1125
|
+
| **Severity** | Info |
|
|
1099
1126
|
| **Category** | Standards |
|
|
1100
|
-
| **Fixable**
|
|
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
|
|
1113
|
-
|
|
1114
|
-
| **Severity** | Warning
|
|
1139
|
+
| Property | Value |
|
|
1140
|
+
| ------------ | --------- |
|
|
1141
|
+
| **Severity** | Warning |
|
|
1115
1142
|
| **Category** | Standards |
|
|
1116
|
-
| **Fixable**
|
|
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
|
|
1132
|
-
|
|
1133
|
-
| **Severity** | Error
|
|
1159
|
+
| Property | Value |
|
|
1160
|
+
| ------------ | --------- |
|
|
1161
|
+
| **Severity** | Error |
|
|
1134
1162
|
| **Category** | Structure |
|
|
1135
|
-
| **Fixable**
|
|
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
|
|
1149
|
-
|
|
1150
|
-
| **Severity** | Warning
|
|
1177
|
+
| Property | Value |
|
|
1178
|
+
| ------------ | --------- |
|
|
1179
|
+
| **Severity** | Warning |
|
|
1151
1180
|
| **Category** | Structure |
|
|
1152
|
-
| **Fixable**
|
|
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
|
|
1167
|
-
|
|
1168
|
-
| **Severity** | Info
|
|
1195
|
+
| Property | Value |
|
|
1196
|
+
| ------------ | ------------ |
|
|
1197
|
+
| **Severity** | Info |
|
|
1169
1198
|
| **Category** | Experimental |
|
|
1170
|
-
| **Fixable**
|
|
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
|
|
1179
|
-
|
|
1180
|
-
| **Severity** | Info
|
|
1207
|
+
| Property | Value |
|
|
1208
|
+
| ------------ | ------------ |
|
|
1209
|
+
| **Severity** | Info |
|
|
1181
1210
|
| **Category** | Experimental |
|
|
1182
|
-
| **Fixable**
|
|
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
|
|
1191
|
-
|
|
1192
|
-
| **Severity** | Info
|
|
1219
|
+
| Property | Value |
|
|
1220
|
+
| ------------ | ------------ |
|
|
1221
|
+
| **Severity** | Info |
|
|
1193
1222
|
| **Category** | Experimental |
|
|
1194
|
-
| **Fixable**
|
|
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
|
|
1205
|
-
| Warning
|
|
1206
|
-
| Info
|
|
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
|
|