@sfdxy/mule-lint 1.16.2 → 1.17.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 +9 -6
- package/dist/bin/mule-lint.js +14 -1
- package/dist/bin/mule-lint.js.map +1 -1
- package/dist/package.json +3 -2
- package/dist/src/mcp/index.d.ts.map +1 -1
- package/dist/src/mcp/index.js +6 -0
- package/dist/src/mcp/index.js.map +1 -1
- package/dist/src/rules/documentation/DisplayNameRule.d.ts +17 -0
- package/dist/src/rules/documentation/DisplayNameRule.d.ts.map +1 -0
- package/dist/src/rules/documentation/DisplayNameRule.js +46 -0
- package/dist/src/rules/documentation/DisplayNameRule.js.map +1 -0
- package/dist/src/rules/index.d.ts.map +1 -1
- package/dist/src/rules/index.js +21 -12
- package/dist/src/rules/index.js.map +1 -1
- package/dist/src/rules/logging/ExcessiveLoggersRule.d.ts +16 -0
- package/dist/src/rules/logging/ExcessiveLoggersRule.d.ts.map +1 -0
- package/dist/src/rules/logging/ExcessiveLoggersRule.js +45 -0
- package/dist/src/rules/logging/ExcessiveLoggersRule.js.map +1 -0
- package/dist/src/rules/operations/CommentedCodeRule.d.ts +17 -0
- package/dist/src/rules/operations/CommentedCodeRule.d.ts.map +1 -0
- package/dist/src/rules/operations/CommentedCodeRule.js +58 -0
- package/dist/src/rules/operations/CommentedCodeRule.js.map +1 -0
- package/dist/src/rules/operations/UnusedFlowRule.d.ts +17 -0
- package/dist/src/rules/operations/UnusedFlowRule.d.ts.map +1 -0
- package/dist/src/rules/operations/UnusedFlowRule.js +80 -0
- package/dist/src/rules/operations/UnusedFlowRule.js.map +1 -0
- package/dist/src/rules/performance/ReconnectionStrategyRule.d.ts +16 -0
- package/dist/src/rules/performance/ReconnectionStrategyRule.d.ts.map +1 -0
- package/dist/src/rules/performance/ReconnectionStrategyRule.js +60 -0
- package/dist/src/rules/performance/ReconnectionStrategyRule.js.map +1 -0
- package/dist/src/rules/security/EncryptionKeyInLogsRule.d.ts +17 -0
- package/dist/src/rules/security/EncryptionKeyInLogsRule.d.ts.map +1 -0
- package/dist/src/rules/security/EncryptionKeyInLogsRule.js +46 -0
- package/dist/src/rules/security/EncryptionKeyInLogsRule.js.map +1 -0
- package/dist/src/rules/standards/ApiKitValidationRule.d.ts +16 -0
- package/dist/src/rules/standards/ApiKitValidationRule.d.ts.map +1 -0
- package/dist/src/rules/standards/ApiKitValidationRule.js +39 -0
- package/dist/src/rules/standards/ApiKitValidationRule.js.map +1 -0
- package/dist/src/rules/standards/AutoDiscoveryRule.d.ts +16 -0
- package/dist/src/rules/standards/AutoDiscoveryRule.d.ts.map +1 -0
- package/dist/src/rules/standards/AutoDiscoveryRule.js +47 -0
- package/dist/src/rules/standards/AutoDiscoveryRule.js.map +1 -0
- package/dist/src/rules/standards/CronExternalizedRule.d.ts +16 -0
- package/dist/src/rules/standards/CronExternalizedRule.d.ts.map +1 -0
- package/dist/src/rules/standards/CronExternalizedRule.js +32 -0
- package/dist/src/rules/standards/CronExternalizedRule.js.map +1 -0
- package/dist/src/rules/standards/HttpPortPlaceholderRule.d.ts +16 -0
- package/dist/src/rules/standards/HttpPortPlaceholderRule.d.ts.map +1 -0
- package/dist/src/rules/standards/HttpPortPlaceholderRule.js +34 -0
- package/dist/src/rules/standards/HttpPortPlaceholderRule.js.map +1 -0
- package/package.json +3 -2
- package/dist/src/rules/operations/OperationsRules.d.ts +0 -137
- package/dist/src/rules/operations/OperationsRules.d.ts.map +0 -1
- package/dist/src/rules/operations/OperationsRules.js +0 -442
- package/dist/src/rules/operations/OperationsRules.js.map +0 -1
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import { ValidationContext, Issue } from '../../types';
|
|
2
|
-
import { BaseRule } from '../base/BaseRule';
|
|
3
|
-
/**
|
|
4
|
-
* RES-001: Reconnection Strategy
|
|
5
|
-
*
|
|
6
|
-
* Connectors should have reconnection strategies configured for resilience.
|
|
7
|
-
*/
|
|
8
|
-
export declare class ReconnectionStrategyRule extends BaseRule {
|
|
9
|
-
id: string;
|
|
10
|
-
name: string;
|
|
11
|
-
description: string;
|
|
12
|
-
severity: "warning";
|
|
13
|
-
category: "performance";
|
|
14
|
-
validate(doc: Document, _context: ValidationContext): Issue[];
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* OPS-001: Auto-Discovery Configuration
|
|
18
|
-
*
|
|
19
|
-
* APIs should have auto-discovery configured for API Manager integration.
|
|
20
|
-
*/
|
|
21
|
-
export declare class AutoDiscoveryRule extends BaseRule {
|
|
22
|
-
id: string;
|
|
23
|
-
name: string;
|
|
24
|
-
description: string;
|
|
25
|
-
severity: "info";
|
|
26
|
-
category: "standards";
|
|
27
|
-
validate(doc: Document, _context: ValidationContext): Issue[];
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* OPS-002: HTTP Port Placeholder
|
|
31
|
-
*
|
|
32
|
-
* HTTP listener ports should use property placeholders, not hardcoded values.
|
|
33
|
-
*/
|
|
34
|
-
export declare class HttpPortPlaceholderRule extends BaseRule {
|
|
35
|
-
id: string;
|
|
36
|
-
name: string;
|
|
37
|
-
description: string;
|
|
38
|
-
severity: "warning";
|
|
39
|
-
category: "standards";
|
|
40
|
-
validate(doc: Document, _context: ValidationContext): Issue[];
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* SEC-006: Encryption Key in Logs
|
|
44
|
-
*
|
|
45
|
-
* Encryption keys and sensitive credentials should not appear in log statements.
|
|
46
|
-
*/
|
|
47
|
-
export declare class EncryptionKeyInLogsRule extends BaseRule {
|
|
48
|
-
id: string;
|
|
49
|
-
name: string;
|
|
50
|
-
description: string;
|
|
51
|
-
severity: "error";
|
|
52
|
-
category: "security";
|
|
53
|
-
private sensitivePatterns;
|
|
54
|
-
validate(doc: Document, _context: ValidationContext): Issue[];
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* HYG-001: Excessive Loggers
|
|
58
|
-
*
|
|
59
|
-
* Flows should not have too many loggers which can impact performance.
|
|
60
|
-
*/
|
|
61
|
-
export declare class ExcessiveLoggersRule extends BaseRule {
|
|
62
|
-
id: string;
|
|
63
|
-
name: string;
|
|
64
|
-
description: string;
|
|
65
|
-
severity: "warning";
|
|
66
|
-
category: "logging";
|
|
67
|
-
validate(doc: Document, context: ValidationContext): Issue[];
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* HYG-002: Commented Code Detection
|
|
71
|
-
*
|
|
72
|
-
* Detects potentially commented-out code blocks in Mule configurations.
|
|
73
|
-
*/
|
|
74
|
-
export declare class CommentedCodeRule extends BaseRule {
|
|
75
|
-
id: string;
|
|
76
|
-
name: string;
|
|
77
|
-
description: string;
|
|
78
|
-
severity: "info";
|
|
79
|
-
category: "standards";
|
|
80
|
-
private codePatterns;
|
|
81
|
-
validate(doc: Document, _context: ValidationContext): Issue[];
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* OPS-003: Cron Expression Externalized
|
|
85
|
-
*
|
|
86
|
-
* Cron expressions in schedulers should use property placeholders.
|
|
87
|
-
*/
|
|
88
|
-
export declare class CronExternalizedRule extends BaseRule {
|
|
89
|
-
id: string;
|
|
90
|
-
name: string;
|
|
91
|
-
description: string;
|
|
92
|
-
severity: "warning";
|
|
93
|
-
category: "standards";
|
|
94
|
-
validate(doc: Document, _context: ValidationContext): Issue[];
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* API-005: APIKit Validation
|
|
98
|
-
*
|
|
99
|
-
* APIs should use APIKit for auto-generated implementation interfaces.
|
|
100
|
-
*/
|
|
101
|
-
export declare class ApiKitValidationRule extends BaseRule {
|
|
102
|
-
id: string;
|
|
103
|
-
name: string;
|
|
104
|
-
description: string;
|
|
105
|
-
severity: "info";
|
|
106
|
-
category: "standards";
|
|
107
|
-
validate(doc: Document, _context: ValidationContext): Issue[];
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* HYG-003: Unused Flow Detection
|
|
111
|
-
*
|
|
112
|
-
* Detects flows that are never referenced by flow-ref.
|
|
113
|
-
*/
|
|
114
|
-
export declare class UnusedFlowRule extends BaseRule {
|
|
115
|
-
id: string;
|
|
116
|
-
name: string;
|
|
117
|
-
description: string;
|
|
118
|
-
severity: "warning";
|
|
119
|
-
category: "standards";
|
|
120
|
-
validate(doc: Document, _context: ValidationContext): Issue[];
|
|
121
|
-
private isExternallyReferenced;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* DOC-001: Display Name Enforcement
|
|
125
|
-
*
|
|
126
|
-
* Key components should have meaningful doc:name attributes, not defaults.
|
|
127
|
-
*/
|
|
128
|
-
export declare class DisplayNameRule extends BaseRule {
|
|
129
|
-
id: string;
|
|
130
|
-
name: string;
|
|
131
|
-
description: string;
|
|
132
|
-
severity: "info";
|
|
133
|
-
category: "documentation";
|
|
134
|
-
private componentDefaults;
|
|
135
|
-
validate(doc: Document, _context: ValidationContext): Issue[];
|
|
136
|
-
}
|
|
137
|
-
//# sourceMappingURL=OperationsRules.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OperationsRules.d.ts","sourceRoot":"","sources":["../../../../src/rules/operations/OperationsRules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C;;;;GAIG;AACH,qBAAa,wBAAyB,SAAQ,QAAQ;IAClD,EAAE,SAAa;IACf,IAAI,SAA2B;IAC/B,WAAW,SAA+D;IAC1E,QAAQ,EAAG,SAAS,CAAU;IAC9B,QAAQ,EAAG,aAAa,CAAU;IAElC,QAAQ,CAAC,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,GAAG,KAAK,EAAE;CAmEhE;AAED;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,QAAQ;IAC3C,EAAE,SAAa;IACf,IAAI,SAAkC;IACtC,WAAW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(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DisplayNameRule = exports.UnusedFlowRule = exports.ApiKitValidationRule = exports.CronExternalizedRule = exports.CommentedCodeRule = exports.ExcessiveLoggersRule = exports.EncryptionKeyInLogsRule = exports.HttpPortPlaceholderRule = exports.AutoDiscoveryRule = exports.ReconnectionStrategyRule = void 0;
|
|
4
|
-
const BaseRule_1 = require("../base/BaseRule");
|
|
5
|
-
/**
|
|
6
|
-
* RES-001: Reconnection Strategy
|
|
7
|
-
*
|
|
8
|
-
* Connectors should have reconnection strategies configured for resilience.
|
|
9
|
-
*/
|
|
10
|
-
class ReconnectionStrategyRule extends BaseRule_1.BaseRule {
|
|
11
|
-
id = 'RES-001';
|
|
12
|
-
name = 'Reconnection Strategy';
|
|
13
|
-
description = 'Connectors should have reconnection strategies configured';
|
|
14
|
-
severity = 'warning';
|
|
15
|
-
category = 'performance';
|
|
16
|
-
validate(doc, _context) {
|
|
17
|
-
const issues = [];
|
|
18
|
-
// Specific connector configurations that benefit from reconnection strategies
|
|
19
|
-
// Using more specific patterns to avoid false positives on generic "config" elements
|
|
20
|
-
const connectorConfigs = [
|
|
21
|
-
{ pattern: 'request-config', name: 'HTTP Request' },
|
|
22
|
-
{ pattern: 'listener-config', name: 'HTTP Listener' },
|
|
23
|
-
{ pattern: 'jms-config', name: 'JMS' },
|
|
24
|
-
{ pattern: 'amqp-config', name: 'AMQP' },
|
|
25
|
-
{ pattern: 'sftp-config', name: 'SFTP' },
|
|
26
|
-
{ pattern: 'ftp-config', name: 'FTP' },
|
|
27
|
-
{ pattern: 'vm-config', name: 'VM' },
|
|
28
|
-
];
|
|
29
|
-
for (const connector of connectorConfigs) {
|
|
30
|
-
const configs = this.select(`//*[local-name()="${connector.pattern}"]`, doc);
|
|
31
|
-
for (const config of configs) {
|
|
32
|
-
// Check for reconnection or reconnect child elements
|
|
33
|
-
const hasReconnection = this.exists('.//*[local-name()="reconnection"]', config) ||
|
|
34
|
-
this.exists('.//*[local-name()="reconnect"]', config) ||
|
|
35
|
-
this.exists('.//*[local-name()="reconnect-forever"]', config);
|
|
36
|
-
if (!hasReconnection) {
|
|
37
|
-
const name = this.getNameAttribute(config) ?? connector.name;
|
|
38
|
-
issues.push(this.createIssue(config, `${connector.name} config "${name}" has no reconnection strategy`, {
|
|
39
|
-
suggestion: 'Add <reconnection> or <reconnect-forever> for resilience',
|
|
40
|
-
}));
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
// Database configs specifically - check for db namespace
|
|
45
|
-
const dbConfigs = this.select('//*[local-name()="config" and starts-with(name(), "db:")]', doc);
|
|
46
|
-
for (const config of dbConfigs) {
|
|
47
|
-
const hasReconnection = this.exists('.//*[local-name()="reconnection"]', config) ||
|
|
48
|
-
this.exists('.//*[local-name()="reconnect"]', config);
|
|
49
|
-
if (!hasReconnection) {
|
|
50
|
-
const name = this.getNameAttribute(config) ?? 'Database';
|
|
51
|
-
issues.push(this.createIssue(config, `Database config "${name}" has no reconnection strategy`, {
|
|
52
|
-
suggestion: 'Add <reconnection> inside the connection element',
|
|
53
|
-
}));
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return issues;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
exports.ReconnectionStrategyRule = ReconnectionStrategyRule;
|
|
60
|
-
/**
|
|
61
|
-
* OPS-001: Auto-Discovery Configuration
|
|
62
|
-
*
|
|
63
|
-
* APIs should have auto-discovery configured for API Manager integration.
|
|
64
|
-
*/
|
|
65
|
-
class AutoDiscoveryRule extends BaseRule_1.BaseRule {
|
|
66
|
-
id = 'OPS-001';
|
|
67
|
-
name = 'Auto-Discovery Configuration';
|
|
68
|
-
description = 'APIs should have auto-discovery configured for API Manager';
|
|
69
|
-
severity = 'info';
|
|
70
|
-
category = 'standards';
|
|
71
|
-
validate(doc, _context) {
|
|
72
|
-
const issues = [];
|
|
73
|
-
// Check if this is an API (has APIKit router or HTTP listener)
|
|
74
|
-
const hasApiKitRouter = this.exists('//*[local-name()="router"]', doc);
|
|
75
|
-
const hasHttpListener = this.exists('//*[local-name()="listener"]', doc);
|
|
76
|
-
if (!hasApiKitRouter && !hasHttpListener) {
|
|
77
|
-
return issues; // Not an API, skip
|
|
78
|
-
}
|
|
79
|
-
// Check for auto-discovery configuration
|
|
80
|
-
const hasAutoDiscovery = this.exists('//*[local-name()="api-autodiscovery"]', doc);
|
|
81
|
-
if (!hasAutoDiscovery && hasApiKitRouter) {
|
|
82
|
-
issues.push(this.createFileIssue('API has no auto-discovery configuration for API Manager', {
|
|
83
|
-
suggestion: 'Add <api-gateway:autodiscovery> for API Manager integration',
|
|
84
|
-
}));
|
|
85
|
-
}
|
|
86
|
-
// If auto-discovery exists, check it uses placeholders
|
|
87
|
-
if (hasAutoDiscovery) {
|
|
88
|
-
const autodiscoveryNodes = this.select('//*[local-name()="api-autodiscovery"]', doc);
|
|
89
|
-
for (const node of autodiscoveryNodes) {
|
|
90
|
-
const apiId = this.getAttribute(node, 'apiId');
|
|
91
|
-
if (apiId && !apiId.includes('${')) {
|
|
92
|
-
issues.push(this.createIssue(node, 'Auto-discovery apiId should use a property placeholder', {
|
|
93
|
-
suggestion: 'Use apiId="${api.id}" instead of hardcoded value',
|
|
94
|
-
}));
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return issues;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
exports.AutoDiscoveryRule = AutoDiscoveryRule;
|
|
102
|
-
/**
|
|
103
|
-
* OPS-002: HTTP Port Placeholder
|
|
104
|
-
*
|
|
105
|
-
* HTTP listener ports should use property placeholders, not hardcoded values.
|
|
106
|
-
*/
|
|
107
|
-
class HttpPortPlaceholderRule extends BaseRule_1.BaseRule {
|
|
108
|
-
id = 'OPS-002';
|
|
109
|
-
name = 'HTTP Port Placeholder';
|
|
110
|
-
description = 'HTTP listener ports should use property placeholders';
|
|
111
|
-
severity = 'warning';
|
|
112
|
-
category = 'standards';
|
|
113
|
-
validate(doc, _context) {
|
|
114
|
-
const issues = [];
|
|
115
|
-
// Check HTTP listener configurations
|
|
116
|
-
const listenerConfigs = this.select('//*[local-name()="listener-config"]', doc);
|
|
117
|
-
for (const config of listenerConfigs) {
|
|
118
|
-
const port = this.getAttribute(config, 'port');
|
|
119
|
-
if (port && /^\d+$/.test(port)) {
|
|
120
|
-
// Port is a hardcoded number
|
|
121
|
-
const name = this.getNameAttribute(config) ?? 'HTTP Listener Config';
|
|
122
|
-
issues.push(this.createIssue(config, `HTTP config "${name}" has hardcoded port "${port}"`, {
|
|
123
|
-
suggestion: 'Use port="${http.port}" or similar placeholder',
|
|
124
|
-
}));
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
return issues;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
exports.HttpPortPlaceholderRule = HttpPortPlaceholderRule;
|
|
131
|
-
/**
|
|
132
|
-
* SEC-006: Encryption Key in Logs
|
|
133
|
-
*
|
|
134
|
-
* Encryption keys and sensitive credentials should not appear in log statements.
|
|
135
|
-
*/
|
|
136
|
-
class EncryptionKeyInLogsRule extends BaseRule_1.BaseRule {
|
|
137
|
-
id = 'SEC-006';
|
|
138
|
-
name = 'Encryption Key in Logs';
|
|
139
|
-
description = 'Encryption keys and sensitive data should not appear in logs';
|
|
140
|
-
severity = 'error';
|
|
141
|
-
category = 'security';
|
|
142
|
-
sensitivePatterns = [
|
|
143
|
-
/encrypt.*key/i,
|
|
144
|
-
/decryption.*key/i,
|
|
145
|
-
/secret.*key/i,
|
|
146
|
-
/api[_-]?key/i,
|
|
147
|
-
/password/i,
|
|
148
|
-
/credentials?/i,
|
|
149
|
-
/mule\.key/i,
|
|
150
|
-
/secure::.*key/i,
|
|
151
|
-
];
|
|
152
|
-
validate(doc, _context) {
|
|
153
|
-
const issues = [];
|
|
154
|
-
// Find all loggers
|
|
155
|
-
const loggers = this.select('//*[local-name()="logger"]', doc);
|
|
156
|
-
for (const logger of loggers) {
|
|
157
|
-
const message = this.getAttribute(logger, 'message') ?? '';
|
|
158
|
-
// Check for sensitive patterns in log messages
|
|
159
|
-
for (const pattern of this.sensitivePatterns) {
|
|
160
|
-
if (pattern.test(message)) {
|
|
161
|
-
issues.push(this.createIssue(logger, `Logger may expose sensitive data: "${message.substring(0, 50)}${message.length > 50 ? '...' : ''}"`, {
|
|
162
|
-
suggestion: 'Remove encryption keys and sensitive data from log messages',
|
|
163
|
-
}));
|
|
164
|
-
break; // Only one issue per logger
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
return issues;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
exports.EncryptionKeyInLogsRule = EncryptionKeyInLogsRule;
|
|
172
|
-
/**
|
|
173
|
-
* HYG-001: Excessive Loggers
|
|
174
|
-
*
|
|
175
|
-
* Flows should not have too many loggers which can impact performance.
|
|
176
|
-
*/
|
|
177
|
-
class ExcessiveLoggersRule extends BaseRule_1.BaseRule {
|
|
178
|
-
id = 'HYG-001';
|
|
179
|
-
name = 'Excessive Loggers';
|
|
180
|
-
description = 'Flows should not have excessive loggers';
|
|
181
|
-
severity = 'warning';
|
|
182
|
-
category = 'logging';
|
|
183
|
-
validate(doc, context) {
|
|
184
|
-
const issues = [];
|
|
185
|
-
const maxLoggers = this.getOption(context, 'maxLoggers', 5);
|
|
186
|
-
// Check flows
|
|
187
|
-
const flows = this.select('//*[local-name()="flow"]', doc);
|
|
188
|
-
for (const flow of flows) {
|
|
189
|
-
const flowName = this.getNameAttribute(flow) ?? 'unknown';
|
|
190
|
-
const loggerCount = this.count('.//*[local-name()="logger"]', flow);
|
|
191
|
-
if (loggerCount > maxLoggers) {
|
|
192
|
-
issues.push(this.createIssue(flow, `Flow "${flowName}" has ${loggerCount} loggers (max recommended: ${maxLoggers})`, {
|
|
193
|
-
suggestion: 'Consider reducing loggers or moving detailed logging to DEBUG level',
|
|
194
|
-
}));
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
// Check sub-flows
|
|
198
|
-
const subflows = this.select('//*[local-name()="sub-flow"]', doc);
|
|
199
|
-
for (const subflow of subflows) {
|
|
200
|
-
const subflowName = this.getNameAttribute(subflow) ?? 'unknown';
|
|
201
|
-
const loggerCount = this.count('.//*[local-name()="logger"]', subflow);
|
|
202
|
-
if (loggerCount > maxLoggers) {
|
|
203
|
-
issues.push(this.createIssue(subflow, `Sub-flow "${subflowName}" has ${loggerCount} loggers (max recommended: ${maxLoggers})`, {
|
|
204
|
-
suggestion: 'Consider reducing loggers or moving detailed logging to DEBUG level',
|
|
205
|
-
}));
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
return issues;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
exports.ExcessiveLoggersRule = ExcessiveLoggersRule;
|
|
212
|
-
/**
|
|
213
|
-
* HYG-002: Commented Code Detection
|
|
214
|
-
*
|
|
215
|
-
* Detects potentially commented-out code blocks in Mule configurations.
|
|
216
|
-
*/
|
|
217
|
-
class CommentedCodeRule extends BaseRule_1.BaseRule {
|
|
218
|
-
id = 'HYG-002';
|
|
219
|
-
name = 'Commented Code Detection';
|
|
220
|
-
description = 'Detects potentially commented-out code in configurations';
|
|
221
|
-
severity = 'info';
|
|
222
|
-
category = 'standards';
|
|
223
|
-
// Patterns that suggest commented-out XML code
|
|
224
|
-
codePatterns = [
|
|
225
|
-
/<flow\s/,
|
|
226
|
-
/<sub-flow\s/,
|
|
227
|
-
/<http:/,
|
|
228
|
-
/<logger\s/,
|
|
229
|
-
/<set-variable\s/,
|
|
230
|
-
/<set-payload\s/,
|
|
231
|
-
/<choice>/,
|
|
232
|
-
/<transform\s/,
|
|
233
|
-
/<flow-ref\s/,
|
|
234
|
-
/<try>/,
|
|
235
|
-
/<db:/,
|
|
236
|
-
];
|
|
237
|
-
validate(doc, _context) {
|
|
238
|
-
const issues = [];
|
|
239
|
-
// Use XPath to find comment nodes: comment()
|
|
240
|
-
// Note: In xmldom, we need to iterate through the document differently
|
|
241
|
-
try {
|
|
242
|
-
const commentNodes = this.select('//comment()', doc);
|
|
243
|
-
for (const commentNode of commentNodes) {
|
|
244
|
-
const commentText = commentNode.textContent ?? '';
|
|
245
|
-
// Check if comment contains code-like patterns
|
|
246
|
-
for (const pattern of this.codePatterns) {
|
|
247
|
-
if (pattern.test(commentText)) {
|
|
248
|
-
issues.push(this.createIssue(commentNode, 'Commented-out code detected', {
|
|
249
|
-
suggestion: 'Remove commented code or convert to documentation comment',
|
|
250
|
-
codeSnippet: commentText.substring(0, 80) + '...',
|
|
251
|
-
}));
|
|
252
|
-
break;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
catch {
|
|
258
|
-
// XPath comment() may not be supported in all parsers
|
|
259
|
-
// Silently return empty issues
|
|
260
|
-
}
|
|
261
|
-
return issues;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
exports.CommentedCodeRule = CommentedCodeRule;
|
|
265
|
-
/**
|
|
266
|
-
* OPS-003: Cron Expression Externalized
|
|
267
|
-
*
|
|
268
|
-
* Cron expressions in schedulers should use property placeholders.
|
|
269
|
-
*/
|
|
270
|
-
class CronExternalizedRule extends BaseRule_1.BaseRule {
|
|
271
|
-
id = 'OPS-003';
|
|
272
|
-
name = 'Externalized Cron Expression';
|
|
273
|
-
description = 'Cron expressions should use property placeholders';
|
|
274
|
-
severity = 'warning';
|
|
275
|
-
category = 'standards';
|
|
276
|
-
validate(doc, _context) {
|
|
277
|
-
const issues = [];
|
|
278
|
-
// Find scheduler cron expressions
|
|
279
|
-
const cronNodes = this.select('//*[local-name()="cron"]', doc);
|
|
280
|
-
for (const node of cronNodes) {
|
|
281
|
-
const expression = this.getAttribute(node, 'expression');
|
|
282
|
-
if (expression && !expression.includes('${')) {
|
|
283
|
-
issues.push(this.createIssue(node, `Hardcoded cron expression: "${expression}"`, {
|
|
284
|
-
suggestion: 'Use expression="${scheduler.cron}" to allow environment-specific scheduling',
|
|
285
|
-
}));
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
return issues;
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
exports.CronExternalizedRule = CronExternalizedRule;
|
|
292
|
-
/**
|
|
293
|
-
* API-005: APIKit Validation
|
|
294
|
-
*
|
|
295
|
-
* APIs should use APIKit for auto-generated implementation interfaces.
|
|
296
|
-
*/
|
|
297
|
-
class ApiKitValidationRule extends BaseRule_1.BaseRule {
|
|
298
|
-
id = 'API-005';
|
|
299
|
-
name = 'APIKit Validation';
|
|
300
|
-
description = 'APIs should use APIKit for implementation interfaces';
|
|
301
|
-
severity = 'info';
|
|
302
|
-
category = 'standards';
|
|
303
|
-
validate(doc, _context) {
|
|
304
|
-
const issues = [];
|
|
305
|
-
// Check if this appears to be an API project (has HTTP listener)
|
|
306
|
-
const hasHttpListener = this.exists('//*[local-name()="listener"]', doc);
|
|
307
|
-
if (!hasHttpListener) {
|
|
308
|
-
return issues;
|
|
309
|
-
}
|
|
310
|
-
// Check for APIKit router
|
|
311
|
-
const hasApiKitRouter = this.exists('//*[local-name()="router"]', doc);
|
|
312
|
-
const hasApiKitConfig = this.exists('//*[local-name()="config" and contains(@name, "api")]', doc);
|
|
313
|
-
if (!hasApiKitRouter && !hasApiKitConfig) {
|
|
314
|
-
// Only flag if this looks like an interface file
|
|
315
|
-
const hasMainFlow = this.exists('//*[local-name()="flow" and (contains(@name, "-main") or contains(@name, "-api"))]', doc);
|
|
316
|
-
if (hasMainFlow) {
|
|
317
|
-
issues.push(this.createFileIssue('Consider using APIKit to auto-generate the implementation interface', {
|
|
318
|
-
suggestion: 'APIKit provides consistent API implementation patterns',
|
|
319
|
-
}));
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
return issues;
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
exports.ApiKitValidationRule = ApiKitValidationRule;
|
|
326
|
-
/**
|
|
327
|
-
* HYG-003: Unused Flow Detection
|
|
328
|
-
*
|
|
329
|
-
* Detects flows that are never referenced by flow-ref.
|
|
330
|
-
*/
|
|
331
|
-
class UnusedFlowRule extends BaseRule_1.BaseRule {
|
|
332
|
-
id = 'HYG-003';
|
|
333
|
-
name = 'Unused Flow Detection';
|
|
334
|
-
description = 'Detects flows that are never referenced';
|
|
335
|
-
severity = 'warning';
|
|
336
|
-
category = 'standards';
|
|
337
|
-
validate(doc, _context) {
|
|
338
|
-
const issues = [];
|
|
339
|
-
// Get all flow names in this document
|
|
340
|
-
const flows = this.select('//*[local-name()="flow"]', doc);
|
|
341
|
-
const subflows = this.select('//*[local-name()="sub-flow"]', doc);
|
|
342
|
-
// Get all flow-ref targets
|
|
343
|
-
const flowRefs = this.select('//*[local-name()="flow-ref"]', doc);
|
|
344
|
-
const referencedFlows = new Set();
|
|
345
|
-
for (const ref of flowRefs) {
|
|
346
|
-
const name = this.getNameAttribute(ref);
|
|
347
|
-
if (name) {
|
|
348
|
-
referencedFlows.add(name);
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
// Check sub-flows (they should always be referenced)
|
|
352
|
-
for (const subflow of subflows) {
|
|
353
|
-
const name = this.getNameAttribute(subflow);
|
|
354
|
-
if (name && !referencedFlows.has(name)) {
|
|
355
|
-
// Exclude common patterns that are referenced externally
|
|
356
|
-
if (!this.isExternallyReferenced(name)) {
|
|
357
|
-
issues.push(this.createIssue(subflow, `Sub-flow "${name}" is never referenced within this file`, {
|
|
358
|
-
severity: 'info',
|
|
359
|
-
suggestion: 'Consider removing unused sub-flows or verify cross-file references',
|
|
360
|
-
}));
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
// Check private flows (not triggered by HTTP/scheduler)
|
|
365
|
-
for (const flow of flows) {
|
|
366
|
-
const name = this.getNameAttribute(flow);
|
|
367
|
-
if (!name) {
|
|
368
|
-
continue;
|
|
369
|
-
}
|
|
370
|
-
// Skip if it has an external trigger
|
|
371
|
-
const hasHttpListener = this.exists('.//*[local-name()="listener"]', flow);
|
|
372
|
-
const hasScheduler = this.exists('.//*[local-name()="scheduler"]', flow);
|
|
373
|
-
const hasVmListener = this.exists('.//*[local-name()="listener" and contains(@config-ref, "vm")]', flow);
|
|
374
|
-
if (hasHttpListener || hasScheduler || hasVmListener) {
|
|
375
|
-
continue; // Entry point flow
|
|
376
|
-
}
|
|
377
|
-
// Check if referenced
|
|
378
|
-
if (!referencedFlows.has(name) && !this.isExternallyReferenced(name)) {
|
|
379
|
-
issues.push(this.createIssue(flow, `Flow "${name}" has no trigger and is never referenced`, {
|
|
380
|
-
severity: 'info',
|
|
381
|
-
suggestion: 'Verify this flow is referenced from other files or remove if unused',
|
|
382
|
-
}));
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
return issues;
|
|
386
|
-
}
|
|
387
|
-
isExternallyReferenced(name) {
|
|
388
|
-
// Common patterns that are typically referenced externally
|
|
389
|
-
const externalPatterns = [
|
|
390
|
-
/-main$/,
|
|
391
|
-
/-api$/,
|
|
392
|
-
/^api-/,
|
|
393
|
-
/-console$/,
|
|
394
|
-
/-error-handler$/,
|
|
395
|
-
/global/i,
|
|
396
|
-
];
|
|
397
|
-
return externalPatterns.some((pattern) => pattern.test(name));
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
exports.UnusedFlowRule = UnusedFlowRule;
|
|
401
|
-
/**
|
|
402
|
-
* DOC-001: Display Name Enforcement
|
|
403
|
-
*
|
|
404
|
-
* Key components should have meaningful doc:name attributes, not defaults.
|
|
405
|
-
*/
|
|
406
|
-
class DisplayNameRule extends BaseRule_1.BaseRule {
|
|
407
|
-
id = 'DOC-001';
|
|
408
|
-
name = 'Display Name Enforcement';
|
|
409
|
-
description = 'Key components should have meaningful display names';
|
|
410
|
-
severity = 'info';
|
|
411
|
-
category = 'documentation';
|
|
412
|
-
// Components that should have meaningful names, with their default names to flag
|
|
413
|
-
componentDefaults = [
|
|
414
|
-
{ element: 'set-payload', defaults: ['Set Payload', 'set-payload'] },
|
|
415
|
-
{ element: 'set-variable', defaults: ['Set Variable', 'set-variable'] },
|
|
416
|
-
{ element: 'transform', defaults: ['Transform Message', 'transform'] },
|
|
417
|
-
{ element: 'flow-ref', defaults: ['Flow Reference', 'flow-ref'] },
|
|
418
|
-
{ element: 'logger', defaults: ['Logger', 'logger'] },
|
|
419
|
-
{ element: 'choice', defaults: ['Choice', 'choice'] },
|
|
420
|
-
];
|
|
421
|
-
validate(doc, _context) {
|
|
422
|
-
const issues = [];
|
|
423
|
-
for (const component of this.componentDefaults) {
|
|
424
|
-
const elements = this.select(`//*[local-name()="${component.element}"]`, doc);
|
|
425
|
-
for (const element of elements) {
|
|
426
|
-
const docName = this.getDocName(element);
|
|
427
|
-
if (!docName) {
|
|
428
|
-
continue; // Missing doc:name is handled by MULE-604
|
|
429
|
-
}
|
|
430
|
-
// Check if using default name
|
|
431
|
-
if (component.defaults.some((d) => docName.toLowerCase() === d.toLowerCase())) {
|
|
432
|
-
issues.push(this.createIssue(element, `${component.element} has generic name "${docName}"`, {
|
|
433
|
-
suggestion: `Use a descriptive name explaining the purpose`,
|
|
434
|
-
}));
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
return issues;
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
exports.DisplayNameRule = DisplayNameRule;
|
|
442
|
-
//# sourceMappingURL=OperationsRules.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OperationsRules.js","sourceRoot":"","sources":["../../../../src/rules/operations/OperationsRules.ts"],"names":[],"mappings":";;;AACA,+CAA4C;AAE5C;;;;GAIG;AACH,MAAa,wBAAyB,SAAQ,mBAAQ;IAClD,EAAE,GAAG,SAAS,CAAC;IACf,IAAI,GAAG,uBAAuB,CAAC;IAC/B,WAAW,GAAG,2DAA2D,CAAC;IAC1E,QAAQ,GAAG,SAAkB,CAAC;IAC9B,QAAQ,GAAG,aAAsB,CAAC;IAElC,QAAQ,CAAC,GAAa,EAAE,QAA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