flowlint 0.5.1 → 0.6.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 +45 -355
- package/dist/cli.js +163 -21
- package/dist/cli.js.map +1 -1
- package/package.json +52 -57
- package/dist/cli.d.ts +0 -8
- package/dist/commands/init.d.ts +0 -8
- package/dist/commands/init.js +0 -34
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/scan.d.ts +0 -11
- package/dist/commands/scan.js +0 -104
- package/dist/commands/scan.js.map +0 -1
- package/dist/packages/config/flowlint-config.d.ts +0 -73
- package/dist/packages/config/flowlint-config.js +0 -120
- package/dist/packages/config/flowlint-config.js.map +0 -1
- package/dist/packages/config/index.d.ts +0 -4
- package/dist/packages/config/index.js +0 -21
- package/dist/packages/config/index.js.map +0 -1
- package/dist/packages/github/client.d.ts +0 -2
- package/dist/packages/github/client.js +0 -94
- package/dist/packages/github/client.js.map +0 -1
- package/dist/packages/logger/index.d.ts +0 -11
- package/dist/packages/logger/index.js +0 -40
- package/dist/packages/logger/index.js.map +0 -1
- package/dist/packages/observability/collectors.d.ts +0 -40
- package/dist/packages/observability/collectors.js +0 -75
- package/dist/packages/observability/collectors.js.map +0 -1
- package/dist/packages/observability/index.d.ts +0 -10
- package/dist/packages/observability/index.js +0 -35
- package/dist/packages/observability/index.js.map +0 -1
- package/dist/packages/observability/metrics.d.ts +0 -119
- package/dist/packages/observability/metrics.js +0 -194
- package/dist/packages/observability/metrics.js.map +0 -1
- package/dist/packages/observability/middleware.d.ts +0 -32
- package/dist/packages/observability/middleware.js +0 -58
- package/dist/packages/observability/middleware.js.map +0 -1
- package/dist/packages/review/analysis-engine.d.ts +0 -19
- package/dist/packages/review/analysis-engine.js +0 -111
- package/dist/packages/review/analysis-engine.js.map +0 -1
- package/dist/packages/review/index.d.ts +0 -12
- package/dist/packages/review/index.js +0 -29
- package/dist/packages/review/index.js.map +0 -1
- package/dist/packages/review/parser-n8n.d.ts +0 -2
- package/dist/packages/review/parser-n8n.js +0 -122
- package/dist/packages/review/parser-n8n.js.map +0 -1
- package/dist/packages/review/providers/github.d.ts +0 -62
- package/dist/packages/review/providers/github.js +0 -275
- package/dist/packages/review/providers/github.js.map +0 -1
- package/dist/packages/review/providers.d.ts +0 -106
- package/dist/packages/review/providers.js +0 -12
- package/dist/packages/review/providers.js.map +0 -1
- package/dist/packages/review/reporter.d.ts +0 -17
- package/dist/packages/review/reporter.js +0 -59
- package/dist/packages/review/reporter.js.map +0 -1
- package/dist/packages/review/rules/index.d.ts +0 -9
- package/dist/packages/review/rules/index.js +0 -415
- package/dist/packages/review/rules/index.js.map +0 -1
- package/dist/packages/review/rules/rule-utils.d.ts +0 -36
- package/dist/packages/review/rules/rule-utils.js +0 -75
- package/dist/packages/review/rules/rule-utils.js.map +0 -1
- package/dist/packages/review/schemas/index.d.ts +0 -17
- package/dist/packages/review/schemas/index.js +0 -167
- package/dist/packages/review/schemas/index.js.map +0 -1
- package/dist/packages/review/schemas/n8n-workflow.schema.json +0 -177
- package/dist/packages/review/sniffer.d.ts +0 -15
- package/dist/packages/review/sniffer.js +0 -47
- package/dist/packages/review/sniffer.js.map +0 -1
- package/dist/packages/review/types.d.ts +0 -40
- package/dist/packages/review/types.js +0 -3
- package/dist/packages/review/types.js.map +0 -1
- package/dist/packages/review/utils/findings.d.ts +0 -23
- package/dist/packages/review/utils/findings.js +0 -34
- package/dist/packages/review/utils/findings.js.map +0 -1
- package/dist/packages/review/utils/merge.d.ts +0 -12
- package/dist/packages/review/utils/merge.js +0 -40
- package/dist/packages/review/utils/merge.js.map +0 -1
- package/dist/packages/review/utils.d.ts +0 -60
- package/dist/packages/review/utils.js +0 -214
- package/dist/packages/review/utils.js.map +0 -1
- package/dist/packages/tracing/github-tracer.d.ts +0 -38
- package/dist/packages/tracing/github-tracer.js +0 -79
- package/dist/packages/tracing/github-tracer.js.map +0 -1
- package/dist/packages/tracing/index.d.ts +0 -81
- package/dist/packages/tracing/index.js +0 -240
- package/dist/packages/tracing/index.js.map +0 -1
- package/dist/packages/tracing/tracer.d.ts +0 -30
- package/dist/packages/tracing/tracer.js +0 -141
- package/dist/packages/tracing/tracer.js.map +0 -1
- package/dist/providers/local-config-provider.d.ts +0 -11
- package/dist/providers/local-config-provider.js +0 -39
- package/dist/providers/local-config-provider.js.map +0 -1
- package/dist/providers/local-file-source.d.ts +0 -13
- package/dist/providers/local-file-source.js +0 -47
- package/dist/providers/local-file-source.js.map +0 -1
- package/dist/reporters/console-reporter.d.ts +0 -8
- package/dist/reporters/console-reporter.js +0 -75
- package/dist/reporters/console-reporter.js.map +0 -1
- package/dist/reporters/github-actions-reporter.d.ts +0 -30
- package/dist/reporters/github-actions-reporter.js +0 -104
- package/dist/reporters/github-actions-reporter.js.map +0 -1
- package/dist/reporters/json-reporter.d.ts +0 -14
- package/dist/reporters/json-reporter.js +0 -57
- package/dist/reporters/json-reporter.js.map +0 -1
- package/dist/reporters/junit-reporter.d.ts +0 -25
- package/dist/reporters/junit-reporter.js +0 -142
- package/dist/reporters/junit-reporter.js.map +0 -1
- package/dist/reporters/sarif-reporter.d.ts +0 -21
- package/dist/reporters/sarif-reporter.js +0 -125
- package/dist/reporters/sarif-reporter.js.map +0 -1
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Provider Interfaces for FlowLint
|
|
3
|
-
*
|
|
4
|
-
* These abstractions decouple the core linting engine from specific data sources
|
|
5
|
-
* and output formats, allowing FlowLint to be used in multiple contexts:
|
|
6
|
-
* - GitHub App (existing)
|
|
7
|
-
* - CLI (local file analysis)
|
|
8
|
-
* - Future: Web Dashboard, CI/CD integrations
|
|
9
|
-
*/
|
|
10
|
-
import type { Finding, Graph } from './types';
|
|
11
|
-
import type { FlowLintConfig } from '../config/flowlint-config';
|
|
12
|
-
export type { Finding } from './types';
|
|
13
|
-
/**
|
|
14
|
-
* LintableFile represents a single file that can be analyzed.
|
|
15
|
-
* This replaces the GitHub-specific PRFile type for core linting operations.
|
|
16
|
-
*/
|
|
17
|
-
export interface LintableFile {
|
|
18
|
-
path: string;
|
|
19
|
-
content: string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* FileSource provides files for analysis.
|
|
23
|
-
* Implementations can read from:
|
|
24
|
-
* - Local filesystem (for CLI)
|
|
25
|
-
* - GitHub PR (for App)
|
|
26
|
-
* - Any other source
|
|
27
|
-
*/
|
|
28
|
-
export interface FileSource {
|
|
29
|
-
/**
|
|
30
|
-
* Get files matching the provided glob patterns.
|
|
31
|
-
* @param patterns Include/ignore patterns
|
|
32
|
-
* @returns Array of lintable files
|
|
33
|
-
*/
|
|
34
|
-
getFiles(patterns: {
|
|
35
|
-
include: string[];
|
|
36
|
-
ignore: string[];
|
|
37
|
-
}): Promise<LintableFile[]>;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* ConfigProvider loads FlowLint configuration.
|
|
41
|
-
* Implementations can load from:
|
|
42
|
-
* - Local .flowlint.yml file (for CLI)
|
|
43
|
-
* - Remote GitHub repository (for App)
|
|
44
|
-
* - Default/hardcoded configuration
|
|
45
|
-
*/
|
|
46
|
-
export interface ConfigProvider {
|
|
47
|
-
/**
|
|
48
|
-
* Load the FlowLint configuration.
|
|
49
|
-
* Should return merged config (defaults + overrides).
|
|
50
|
-
* @returns Loaded configuration
|
|
51
|
-
*/
|
|
52
|
-
load(): Promise<FlowLintConfig>;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Reporter generates output from analysis results.
|
|
56
|
-
* Implementations can output to:
|
|
57
|
-
* - GitHub Checks API (for App)
|
|
58
|
-
* - Console/table (for CLI)
|
|
59
|
-
* - JSON file (for integrations/Web Dashboard)
|
|
60
|
-
*/
|
|
61
|
-
export interface Reporter {
|
|
62
|
-
/**
|
|
63
|
-
* Report analysis results.
|
|
64
|
-
* @param results Array of findings from all files
|
|
65
|
-
* @returns Promise that resolves when reporting is complete
|
|
66
|
-
*/
|
|
67
|
-
report(results: AnalysisResult[]): Promise<void>;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* AnalysisResult represents the findings for a single analyzed file.
|
|
71
|
-
* This is the data structure passed to reporters.
|
|
72
|
-
*/
|
|
73
|
-
export interface AnalysisResult {
|
|
74
|
-
file: LintableFile;
|
|
75
|
-
graph: Graph;
|
|
76
|
-
findings: Finding[];
|
|
77
|
-
errors?: Array<{
|
|
78
|
-
error: string;
|
|
79
|
-
details?: string;
|
|
80
|
-
}>;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* AnalysisEngine orchestrates the linting process.
|
|
84
|
-
* It coordinates file source, config loading, rule execution, and reporting.
|
|
85
|
-
*/
|
|
86
|
-
export interface AnalysisEngine {
|
|
87
|
-
/**
|
|
88
|
-
* Run a complete analysis on the provided scope.
|
|
89
|
-
* @returns Summary of the analysis (e.g., total findings, errors)
|
|
90
|
-
*/
|
|
91
|
-
analyze(): Promise<AnalysisSummary>;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Summary of a completed analysis.
|
|
95
|
-
*/
|
|
96
|
-
export interface AnalysisSummary {
|
|
97
|
-
totalFiles: number;
|
|
98
|
-
totalFindings: number;
|
|
99
|
-
findingsBySeverity: {
|
|
100
|
-
must: number;
|
|
101
|
-
should: number;
|
|
102
|
-
nit: number;
|
|
103
|
-
};
|
|
104
|
-
errors: number;
|
|
105
|
-
hasBlockingIssues: boolean;
|
|
106
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Provider Interfaces for FlowLint
|
|
4
|
-
*
|
|
5
|
-
* These abstractions decouple the core linting engine from specific data sources
|
|
6
|
-
* and output formats, allowing FlowLint to be used in multiple contexts:
|
|
7
|
-
* - GitHub App (existing)
|
|
8
|
-
* - CLI (local file analysis)
|
|
9
|
-
* - Future: Web Dashboard, CI/CD integrations
|
|
10
|
-
*/
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
//# sourceMappingURL=providers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"providers.js","sourceRoot":"","sources":["../../../packages/review/providers.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { Finding } from './types';
|
|
2
|
-
import type { FlowLintConfig } from '../config/flowlint-config';
|
|
3
|
-
type Conclusion = 'action_required' | 'neutral' | 'success' | 'failure';
|
|
4
|
-
export declare function buildCheckOutput({ findings, cfg, summaryOverride, conclusionOverride, }: {
|
|
5
|
-
findings: Finding[];
|
|
6
|
-
cfg: FlowLintConfig;
|
|
7
|
-
summaryOverride?: string;
|
|
8
|
-
conclusionOverride?: Conclusion;
|
|
9
|
-
}): {
|
|
10
|
-
conclusion: Conclusion;
|
|
11
|
-
output: {
|
|
12
|
-
title: string;
|
|
13
|
-
summary: string;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export declare function buildAnnotations(findings: Finding[]): any[];
|
|
17
|
-
export {};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildCheckOutput = buildCheckOutput;
|
|
4
|
-
exports.buildAnnotations = buildAnnotations;
|
|
5
|
-
function buildCheckOutput({ findings, cfg, summaryOverride, conclusionOverride, }) {
|
|
6
|
-
const summary = summaryOverride ?? summarize(findings);
|
|
7
|
-
const conclusion = conclusionOverride ?? inferConclusion(findings);
|
|
8
|
-
return {
|
|
9
|
-
conclusion,
|
|
10
|
-
output: {
|
|
11
|
-
title: process.env.CHECK_TITLE || 'FlowLint findings',
|
|
12
|
-
summary,
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
function buildAnnotations(findings) {
|
|
17
|
-
const severityOrder = ['must', 'should', 'nit'];
|
|
18
|
-
const ordered = [...findings].sort((a, b) => severityOrder.indexOf(a.severity) - severityOrder.indexOf(b.severity));
|
|
19
|
-
return ordered.map((finding) => {
|
|
20
|
-
const line = finding.line ?? 1;
|
|
21
|
-
// Build raw_details with optional documentation URL
|
|
22
|
-
let rawDetails = finding.raw_details;
|
|
23
|
-
if (finding.documentationUrl) {
|
|
24
|
-
const docLine = `See examples: ${finding.documentationUrl}`;
|
|
25
|
-
rawDetails = rawDetails ? `${docLine}\n\n${rawDetails}` : docLine;
|
|
26
|
-
}
|
|
27
|
-
return {
|
|
28
|
-
path: finding.path,
|
|
29
|
-
start_line: line,
|
|
30
|
-
end_line: line,
|
|
31
|
-
annotation_level: mapSeverity(finding.severity),
|
|
32
|
-
message: `${finding.rule}: ${finding.message}`,
|
|
33
|
-
raw_details: rawDetails?.slice(0, 64000),
|
|
34
|
-
};
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
function inferConclusion(findings) {
|
|
38
|
-
if (findings.some((f) => f.severity === 'must'))
|
|
39
|
-
return 'failure';
|
|
40
|
-
if (findings.some((f) => f.severity === 'should'))
|
|
41
|
-
return 'neutral';
|
|
42
|
-
return 'success';
|
|
43
|
-
}
|
|
44
|
-
function summarize(findings) {
|
|
45
|
-
if (findings.length === 0)
|
|
46
|
-
return 'No issues found.';
|
|
47
|
-
const must = findings.filter((f) => f.severity === 'must').length;
|
|
48
|
-
const should = findings.filter((f) => f.severity === 'should').length;
|
|
49
|
-
const nit = findings.filter((f) => f.severity === 'nit').length;
|
|
50
|
-
return `${must} must-fix, ${should} should-fix, ${nit} nit.`;
|
|
51
|
-
}
|
|
52
|
-
function mapSeverity(severity) {
|
|
53
|
-
if (severity === 'must')
|
|
54
|
-
return 'failure';
|
|
55
|
-
if (severity === 'should')
|
|
56
|
-
return 'warning';
|
|
57
|
-
return 'notice';
|
|
58
|
-
}
|
|
59
|
-
//# sourceMappingURL=reporter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"reporter.js","sourceRoot":"","sources":["../../../pack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AAK,MAAM;QAAE,OAAO,SAAS,CAAC;IAC1C,IAAI,QAAQ,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAC5C,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Graph, Finding } from '../types';
|
|
2
|
-
import type { FlowLintConfig } from '../../config/flowlint-config';
|
|
3
|
-
type RuleContext = {
|
|
4
|
-
path: string;
|
|
5
|
-
cfg: FlowLintConfig;
|
|
6
|
-
nodeLines?: Record<string, number>;
|
|
7
|
-
};
|
|
8
|
-
export declare function runAllRules(graph: Graph, ctx: RuleContext): Finding[];
|
|
9
|
-
export {};
|
|
@@ -1,415 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.runAllRules = runAllRules;
|
|
4
|
-
const rule_utils_1 = require("./rule-utils");
|
|
5
|
-
const utils_1 = require("../utils");
|
|
6
|
-
// --- Rule Definitions using Helpers ---
|
|
7
|
-
const r1Retry = (0, rule_utils_1.createNodeRule)('R1', 'rate_limit_retry', (node, graph, ctx) => {
|
|
8
|
-
if (!(0, utils_1.isApiNode)(node.type))
|
|
9
|
-
return null;
|
|
10
|
-
const params = (node.params ?? {});
|
|
11
|
-
const options = (params.options ?? {});
|
|
12
|
-
const retryCandidates = [
|
|
13
|
-
options.retryOnFail,
|
|
14
|
-
params.retryOnFail,
|
|
15
|
-
node.flags?.retryOnFail,
|
|
16
|
-
];
|
|
17
|
-
const retryOnFail = retryCandidates.find((value) => value !== undefined && value !== null);
|
|
18
|
-
if (retryOnFail === true) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
if (typeof retryOnFail === 'string') {
|
|
22
|
-
const normalized = retryOnFail.trim().toLowerCase();
|
|
23
|
-
if (retryOnFail.includes('{{') || normalized === 'true') {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return {
|
|
28
|
-
rule: 'R1',
|
|
29
|
-
severity: 'must',
|
|
30
|
-
path: ctx.path,
|
|
31
|
-
message: `Node ${node.name || node.id} is missing retry/backoff configuration`,
|
|
32
|
-
raw_details: `In the node properties, enable "Retry on Fail" under Options.`,
|
|
33
|
-
nodeId: node.id,
|
|
34
|
-
line: ctx.nodeLines?.[node.id],
|
|
35
|
-
};
|
|
36
|
-
});
|
|
37
|
-
const r2ErrorHandling = (0, rule_utils_1.createNodeRule)('R2', 'error_handling', (node, graph, ctx) => {
|
|
38
|
-
if (ctx.cfg.rules.error_handling.forbid_continue_on_fail && node.flags?.continueOnFail) {
|
|
39
|
-
return {
|
|
40
|
-
rule: 'R2',
|
|
41
|
-
severity: 'must',
|
|
42
|
-
path: ctx.path,
|
|
43
|
-
message: `Node ${node.name || node.id} has continueOnFail enabled (disable it and route errors explicitly)`,
|
|
44
|
-
nodeId: node.id,
|
|
45
|
-
line: ctx.nodeLines?.[node.id],
|
|
46
|
-
raw_details: 'Open the node in n8n and disable "Continue On Fail" (Options > Continue On Fail). Route failures down an explicit error branch instead.',
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
return null;
|
|
50
|
-
});
|
|
51
|
-
const r4Secrets = (0, rule_utils_1.createHardcodedStringRule)({
|
|
52
|
-
ruleId: 'R4',
|
|
53
|
-
severity: 'must',
|
|
54
|
-
configKey: 'secrets',
|
|
55
|
-
messageFn: (node) => `Node ${node.name || node.id} contains a hardcoded secret (move it to credentials/env vars)`,
|
|
56
|
-
details: 'Move API keys/tokens into Credentials or environment variables; the workflow should only reference {{$credentials.*}} expressions.',
|
|
57
|
-
});
|
|
58
|
-
const r9ConfigLiterals = (0, rule_utils_1.createHardcodedStringRule)({
|
|
59
|
-
ruleId: 'R9',
|
|
60
|
-
severity: 'should',
|
|
61
|
-
configKey: 'config_literals',
|
|
62
|
-
messageFn: (node, value) => `Node ${node.name || node.id} contains env-specific literal "${value.substring(0, 40)}" (move to expression/credential)`,
|
|
63
|
-
details: 'Move environment-specific URLs/IDs into expressions or credentials (e.g., {{$env.API_BASE_URL}}) so the workflow is portable.',
|
|
64
|
-
});
|
|
65
|
-
const r10NamingConvention = (0, rule_utils_1.createNodeRule)('R10', 'naming_convention', (node, graph, ctx) => {
|
|
66
|
-
const genericNames = new Set(ctx.cfg.rules.naming_convention.generic_names ?? []);
|
|
67
|
-
if (!node.name || genericNames.has(node.name.toLowerCase())) {
|
|
68
|
-
return {
|
|
69
|
-
rule: 'R10',
|
|
70
|
-
severity: 'nit',
|
|
71
|
-
path: ctx.path,
|
|
72
|
-
message: `Node ${node.id} uses a generic name "${node.name ?? ''}" (rename it to describe the action)`,
|
|
73
|
-
nodeId: node.id,
|
|
74
|
-
line: ctx.nodeLines?.[node.id],
|
|
75
|
-
raw_details: 'Rename the node to describe its purpose (e.g., "Check subscription status" instead of "IF") for easier reviews and debugging.',
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
return null;
|
|
79
|
-
});
|
|
80
|
-
const DEPRECATED_NODES = {
|
|
81
|
-
'n8n-nodes-base.splitInBatches': 'Use Loop over items instead',
|
|
82
|
-
'n8n-nodes-base.executeWorkflow': 'Use Execute Workflow (Sub-Workflow) instead',
|
|
83
|
-
};
|
|
84
|
-
const r11DeprecatedNodes = (0, rule_utils_1.createNodeRule)('R11', 'deprecated_nodes', (node, graph, ctx) => {
|
|
85
|
-
if (DEPRECATED_NODES[node.type]) {
|
|
86
|
-
return {
|
|
87
|
-
rule: 'R11',
|
|
88
|
-
severity: 'should',
|
|
89
|
-
path: ctx.path,
|
|
90
|
-
message: `Node ${node.name || node.id} uses deprecated type ${node.type} (replace with ${DEPRECATED_NODES[node.type]})`,
|
|
91
|
-
nodeId: node.id,
|
|
92
|
-
line: ctx.nodeLines?.[node.id],
|
|
93
|
-
raw_details: `Replace this node with ${DEPRECATED_NODES[node.type]} so future n8n upgrades don’t break the workflow.`,
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
return null;
|
|
97
|
-
});
|
|
98
|
-
const r12UnhandledErrorPath = (0, rule_utils_1.createNodeRule)('R12', 'unhandled_error_path', (node, graph, ctx) => {
|
|
99
|
-
if (!(0, utils_1.isErrorProneNode)(node.type))
|
|
100
|
-
return null;
|
|
101
|
-
const hasErrorPath = graph.edges.some((edge) => {
|
|
102
|
-
if (edge.from !== node.id)
|
|
103
|
-
return false;
|
|
104
|
-
if (edge.on === 'error')
|
|
105
|
-
return true;
|
|
106
|
-
const targetNode = graph.nodes.find((candidate) => candidate.id === edge.to);
|
|
107
|
-
return targetNode ? (0, utils_1.isErrorHandlerNode)(targetNode.type, targetNode.name) : false;
|
|
108
|
-
});
|
|
109
|
-
if (!hasErrorPath) {
|
|
110
|
-
return {
|
|
111
|
-
rule: 'R12',
|
|
112
|
-
severity: 'must',
|
|
113
|
-
path: ctx.path,
|
|
114
|
-
message: `Node ${node.name || node.id} has no error branch (add a red connector to handler)`,
|
|
115
|
-
nodeId: node.id,
|
|
116
|
-
line: ctx.nodeLines?.[node.id],
|
|
117
|
-
raw_details: 'Add an error (red) branch to a Stop and Error or logging/alert node so failures do not disappear silently.',
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
return null;
|
|
121
|
-
});
|
|
122
|
-
function r13WebhookAcknowledgment(graph, ctx) {
|
|
123
|
-
const cfg = ctx.cfg.rules.webhook_acknowledgment;
|
|
124
|
-
if (!cfg?.enabled)
|
|
125
|
-
return [];
|
|
126
|
-
const findings = [];
|
|
127
|
-
// Find all webhook trigger nodes (not respondToWebhook)
|
|
128
|
-
const webhookNodes = graph.nodes.filter((node) => node.type === 'n8n-nodes-base.webhook' ||
|
|
129
|
-
(node.type.includes('webhook') && !node.type.includes('respondToWebhook')));
|
|
130
|
-
for (const webhookNode of webhookNodes) {
|
|
131
|
-
// Get immediate downstream nodes
|
|
132
|
-
const directDownstream = graph.edges
|
|
133
|
-
.filter((edge) => edge.from === webhookNode.id)
|
|
134
|
-
.map((edge) => graph.nodes.find((n) => n.id === edge.to))
|
|
135
|
-
.filter((n) => !!n);
|
|
136
|
-
if (directDownstream.length === 0)
|
|
137
|
-
continue;
|
|
138
|
-
// Check if first downstream is "Respond to Webhook"
|
|
139
|
-
const hasImmediateResponse = directDownstream.some((node) => node.type === 'n8n-nodes-base.respondToWebhook' ||
|
|
140
|
-
/respond.*webhook/i.test(node.type) ||
|
|
141
|
-
/respond.*webhook/i.test(node.name || ''));
|
|
142
|
-
if (hasImmediateResponse)
|
|
143
|
-
continue; // Good pattern - immediate acknowledgment
|
|
144
|
-
// Check if any downstream node is "heavy"
|
|
145
|
-
const heavyNodeTypes = cfg.heavy_node_types || [
|
|
146
|
-
'n8n-nodes-base.httpRequest',
|
|
147
|
-
'n8n-nodes-base.postgres',
|
|
148
|
-
'n8n-nodes-base.mysql',
|
|
149
|
-
'n8n-nodes-base.mongodb',
|
|
150
|
-
'n8n-nodes-base.openAi',
|
|
151
|
-
'n8n-nodes-base.anthropic',
|
|
152
|
-
];
|
|
153
|
-
const hasHeavyProcessing = directDownstream.some((node) => heavyNodeTypes.includes(node.type) || /loop|batch/i.test(node.type));
|
|
154
|
-
if (hasHeavyProcessing) {
|
|
155
|
-
findings.push({
|
|
156
|
-
rule: 'R13',
|
|
157
|
-
severity: 'must',
|
|
158
|
-
path: ctx.path,
|
|
159
|
-
message: `Webhook "${webhookNode.name || webhookNode.id}" performs heavy processing before acknowledgment (risk of timeout/duplicates)`,
|
|
160
|
-
nodeId: webhookNode.id,
|
|
161
|
-
line: ctx.nodeLines?.[webhookNode.id],
|
|
162
|
-
raw_details: `Add a "Respond to Webhook" node immediately after the webhook trigger (return 200/204), then perform heavy processing. This prevents webhook timeouts and duplicate events.`,
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
return findings;
|
|
167
|
-
}
|
|
168
|
-
const r14RetryAfterCompliance = (0, rule_utils_1.createNodeRule)('R14', 'retry_after_compliance', (node, graph, ctx) => {
|
|
169
|
-
// Only check HTTP request nodes
|
|
170
|
-
if (!(0, utils_1.isApiNode)(node.type))
|
|
171
|
-
return null;
|
|
172
|
-
const params = (node.params ?? {});
|
|
173
|
-
const options = (params.options ?? {});
|
|
174
|
-
// Check if retry is enabled
|
|
175
|
-
const retryCandidates = [
|
|
176
|
-
options.retryOnFail,
|
|
177
|
-
params.retryOnFail,
|
|
178
|
-
node.flags?.retryOnFail,
|
|
179
|
-
];
|
|
180
|
-
const retryOnFail = retryCandidates.find((value) => value !== undefined && value !== null);
|
|
181
|
-
// If retry is disabled or explicitly false, skip this rule
|
|
182
|
-
if (!retryOnFail || retryOnFail === false)
|
|
183
|
-
return null;
|
|
184
|
-
// If retryOnFail is explicitly a string expression, skip if it's not "true"
|
|
185
|
-
if (typeof retryOnFail === 'string') {
|
|
186
|
-
const normalized = retryOnFail.trim().toLowerCase();
|
|
187
|
-
if (retryOnFail.includes('{{') && normalized !== 'true') {
|
|
188
|
-
return null; // Dynamic expression, assume it might handle retry-after
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
// Check waitBetweenTries specifically (Pragmatic fix for n8n UI limitations)
|
|
192
|
-
const waitBetweenTries = node.flags?.waitBetweenTries;
|
|
193
|
-
if (waitBetweenTries !== undefined && waitBetweenTries !== null) {
|
|
194
|
-
// If it's a static number (or numeric string), we accept it because n8n UI
|
|
195
|
-
// often prevents using expressions here. We prioritize allowing retries (R1)
|
|
196
|
-
// over strict Retry-After compliance if the platform limits the user.
|
|
197
|
-
if (typeof waitBetweenTries === 'number')
|
|
198
|
-
return null;
|
|
199
|
-
if (typeof waitBetweenTries === 'string' &&
|
|
200
|
-
!isNaN(Number(waitBetweenTries)) &&
|
|
201
|
-
!waitBetweenTries.includes('{{')) {
|
|
202
|
-
return null;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
// Check if there's an expression/code that references retry-after
|
|
206
|
-
const nodeStr = JSON.stringify(node);
|
|
207
|
-
const hasRetryAfterLogic = /retry[-_]?after|retryafter/i.test(nodeStr);
|
|
208
|
-
if (hasRetryAfterLogic) {
|
|
209
|
-
return null; // Good - respects Retry-After
|
|
210
|
-
}
|
|
211
|
-
// Flag as violation
|
|
212
|
-
return {
|
|
213
|
-
rule: 'R14',
|
|
214
|
-
severity: 'should',
|
|
215
|
-
path: ctx.path,
|
|
216
|
-
message: `Node ${node.name || node.id} has retry logic but ignores Retry-After headers (429/503 responses)`,
|
|
217
|
-
raw_details: `Add expression to parse Retry-After header: const retryAfter = $json.headers['retry-after']; const delay = retryAfter ? (parseInt(retryAfter) || new Date(retryAfter) - Date.now()) : Math.min(1000 * Math.pow(2, $execution.retryCount), 60000); This prevents API bans and respects server rate limits.`,
|
|
218
|
-
nodeId: node.id,
|
|
219
|
-
line: ctx.nodeLines?.[node.id],
|
|
220
|
-
};
|
|
221
|
-
});
|
|
222
|
-
// --- Rules with custom logic (not fitting the simple node-by-node pattern) ---
|
|
223
|
-
function r3Idempotency(graph, ctx) {
|
|
224
|
-
const cfg = ctx.cfg.rules.idempotency;
|
|
225
|
-
if (!cfg?.enabled)
|
|
226
|
-
return [];
|
|
227
|
-
const hasIngress = graph.nodes.some((node) => /webhook|trigger|start/i.test(node.type));
|
|
228
|
-
if (!hasIngress)
|
|
229
|
-
return [];
|
|
230
|
-
const mutationNodes = graph.nodes.filter((node) => (0, utils_1.isMutationNode)(node.type));
|
|
231
|
-
if (!mutationNodes.length)
|
|
232
|
-
return [];
|
|
233
|
-
const findings = [];
|
|
234
|
-
for (const mutationNode of mutationNodes) {
|
|
235
|
-
const upstreamNodeIds = (0, utils_1.findAllUpstreamNodes)(graph, mutationNode.id);
|
|
236
|
-
const upstreamNodes = graph.nodes.filter((n) => upstreamNodeIds.has(n.id));
|
|
237
|
-
const hasGuard = upstreamNodes.some((p) => (0, utils_1.containsCandidate)(p.params, cfg.key_field_candidates));
|
|
238
|
-
if (!hasGuard) {
|
|
239
|
-
findings.push({
|
|
240
|
-
rule: 'R3',
|
|
241
|
-
severity: 'must',
|
|
242
|
-
path: ctx.path,
|
|
243
|
-
message: `The mutation path ending at "${mutationNode.name || mutationNode.id}" appears to be missing an idempotency guard.`,
|
|
244
|
-
raw_details: `Ensure one of the upstream nodes or the mutation node itself uses an idempotency key, such as one of: ${cfg.key_field_candidates.join(', ')}`,
|
|
245
|
-
nodeId: mutationNode.id,
|
|
246
|
-
line: ctx.nodeLines?.[mutationNode.id],
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
return findings;
|
|
251
|
-
}
|
|
252
|
-
function r5DeadEnds(graph, ctx) {
|
|
253
|
-
const cfg = ctx.cfg.rules.dead_ends;
|
|
254
|
-
if (!cfg?.enabled)
|
|
255
|
-
return [];
|
|
256
|
-
if (graph.nodes.length <= 1)
|
|
257
|
-
return [];
|
|
258
|
-
const outgoing = new Map();
|
|
259
|
-
for (const node of graph.nodes)
|
|
260
|
-
outgoing.set(node.id, 0);
|
|
261
|
-
for (const edge of graph.edges)
|
|
262
|
-
outgoing.set(edge.from, (outgoing.get(edge.from) || 0) + 1);
|
|
263
|
-
const findings = [];
|
|
264
|
-
for (const node of graph.nodes) {
|
|
265
|
-
if ((outgoing.get(node.id) || 0) === 0 && !(0, utils_1.isTerminalNode)(node.type, node.name)) {
|
|
266
|
-
findings.push({
|
|
267
|
-
rule: 'R5',
|
|
268
|
-
severity: 'nit',
|
|
269
|
-
path: ctx.path,
|
|
270
|
-
message: `Node ${node.name || node.id} has no outgoing connections (either wire it up or remove it)`,
|
|
271
|
-
nodeId: node.id,
|
|
272
|
-
line: ctx.nodeLines?.[node.id],
|
|
273
|
-
raw_details: 'Either remove this node as dead code or connect it to the next/safe step so the workflow can continue.',
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
return findings;
|
|
278
|
-
}
|
|
279
|
-
function r6LongRunning(graph, ctx) {
|
|
280
|
-
const cfg = ctx.cfg.rules.long_running;
|
|
281
|
-
if (!cfg?.enabled)
|
|
282
|
-
return [];
|
|
283
|
-
const findings = [];
|
|
284
|
-
const loopNodes = graph.nodes.filter((node) => /loop|batch|while|repeat/i.test(node.type));
|
|
285
|
-
for (const node of loopNodes) {
|
|
286
|
-
const iterations = (0, utils_1.readNumber)(node.params, [
|
|
287
|
-
'maxIterations',
|
|
288
|
-
'maxIteration',
|
|
289
|
-
'limit',
|
|
290
|
-
'options.maxIterations',
|
|
291
|
-
]);
|
|
292
|
-
if (!iterations || (cfg.max_iterations && iterations > cfg.max_iterations)) {
|
|
293
|
-
findings.push({
|
|
294
|
-
rule: 'R6',
|
|
295
|
-
severity: 'should',
|
|
296
|
-
path: ctx.path,
|
|
297
|
-
message: `Node ${node.name || node.id} allows ${iterations ?? 'unbounded'} iterations (limit ${cfg.max_iterations}; set a lower cap)`,
|
|
298
|
-
nodeId: node.id,
|
|
299
|
-
line: ctx.nodeLines?.[node.id],
|
|
300
|
-
raw_details: `Set Options > Max iterations to ≤ ${cfg.max_iterations} or split the processing into smaller batches.`,
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
if (cfg.timeout_ms) {
|
|
304
|
-
const timeout = (0, utils_1.readNumber)(node.params, ['timeout', 'timeoutMs', 'options.timeout']);
|
|
305
|
-
if (timeout && timeout > cfg.timeout_ms) {
|
|
306
|
-
findings.push({
|
|
307
|
-
rule: 'R6',
|
|
308
|
-
severity: 'should',
|
|
309
|
-
path: ctx.path,
|
|
310
|
-
message: `Node ${node.name || node.id} uses timeout ${timeout}ms (limit ${cfg.timeout_ms}ms; shorten the timeout or break work apart)`,
|
|
311
|
-
nodeId: node.id,
|
|
312
|
-
line: ctx.nodeLines?.[node.id],
|
|
313
|
-
raw_details: `Lower the timeout to ≤ ${cfg.timeout_ms}ms or split the workflow so no single step blocks for too long.`,
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
return findings;
|
|
319
|
-
}
|
|
320
|
-
function r7AlertLogEnforcement(graph, ctx) {
|
|
321
|
-
const cfg = ctx.cfg.rules.alert_log_enforcement;
|
|
322
|
-
if (!cfg?.enabled)
|
|
323
|
-
return [];
|
|
324
|
-
const findings = [];
|
|
325
|
-
const errorEdges = graph.edges.filter((edge) => edge.on === 'error');
|
|
326
|
-
for (const edge of errorEdges) {
|
|
327
|
-
const fromNode = graph.nodes.find((n) => n.id === edge.from);
|
|
328
|
-
let isHandled = false;
|
|
329
|
-
const queue = [edge.to];
|
|
330
|
-
const visited = new Set([edge.to]);
|
|
331
|
-
let head = 0;
|
|
332
|
-
while (head < queue.length) {
|
|
333
|
-
const currentId = queue[head++];
|
|
334
|
-
const currentNode = graph.nodes.find((n) => n.id === currentId);
|
|
335
|
-
if ((0, utils_1.isNotificationNode)(currentNode.type)) {
|
|
336
|
-
isHandled = true;
|
|
337
|
-
break; // Found a handler, stop searching this path
|
|
338
|
-
}
|
|
339
|
-
if ((0, utils_1.isRejoinNode)(graph, currentId)) {
|
|
340
|
-
continue; // It's a rejoin point, but not a handler, so stop traversing this path
|
|
341
|
-
}
|
|
342
|
-
// Add successors to queue
|
|
343
|
-
const outgoing = graph.edges.filter((e) => e.from === currentId);
|
|
344
|
-
for (const outEdge of outgoing) {
|
|
345
|
-
if (!visited.has(outEdge.to)) {
|
|
346
|
-
visited.add(outEdge.to);
|
|
347
|
-
queue.push(outEdge.to);
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
if (!isHandled) {
|
|
352
|
-
findings.push({
|
|
353
|
-
rule: 'R7',
|
|
354
|
-
severity: 'should',
|
|
355
|
-
path: ctx.path,
|
|
356
|
-
message: `Error path from node ${fromNode.name || fromNode.id} has no log/alert before rejoining (add notification node)`,
|
|
357
|
-
nodeId: fromNode.id,
|
|
358
|
-
line: ctx.nodeLines?.[fromNode.id],
|
|
359
|
-
raw_details: 'Add a Slack/Email/Log node on the error branch before it rejoins the main flow so failures leave an audit trail.',
|
|
360
|
-
});
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
return findings;
|
|
364
|
-
}
|
|
365
|
-
function r8UnusedData(graph, ctx) {
|
|
366
|
-
const cfg = ctx.cfg.rules.unused_data;
|
|
367
|
-
if (!cfg?.enabled)
|
|
368
|
-
return [];
|
|
369
|
-
const findings = [];
|
|
370
|
-
for (const node of graph.nodes) {
|
|
371
|
-
// If a node has no successors, R5 handles it. If it's a terminal node, its "use" is to end the flow.
|
|
372
|
-
if ((0, utils_1.isTerminalNode)(node.type, node.name) || !graph.edges.some((e) => e.from === node.id)) {
|
|
373
|
-
continue;
|
|
374
|
-
}
|
|
375
|
-
const downstreamNodes = (0, utils_1.findAllDownstreamNodes)(graph, node.id);
|
|
376
|
-
downstreamNodes.delete(node.id);
|
|
377
|
-
const leadsToConsumer = [...downstreamNodes].some((id) => {
|
|
378
|
-
const downstreamNode = graph.nodes.find((n) => n.id === id);
|
|
379
|
-
return (0, utils_1.isMeaningfulConsumer)(downstreamNode);
|
|
380
|
-
});
|
|
381
|
-
if (!leadsToConsumer) {
|
|
382
|
-
findings.push({
|
|
383
|
-
rule: 'R8',
|
|
384
|
-
severity: 'nit',
|
|
385
|
-
path: ctx.path,
|
|
386
|
-
message: `Node "${node.name || node.id}" produces data that never reaches any consumer`,
|
|
387
|
-
nodeId: node.id,
|
|
388
|
-
line: ctx.nodeLines?.[node.id],
|
|
389
|
-
raw_details: 'Wire this branch into a consumer (DB/API/response) or remove it—otherwise the data produced here is never used.',
|
|
390
|
-
});
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
return findings;
|
|
394
|
-
}
|
|
395
|
-
// --- Rule Registration ---
|
|
396
|
-
const rules = [
|
|
397
|
-
r1Retry,
|
|
398
|
-
r2ErrorHandling,
|
|
399
|
-
r3Idempotency,
|
|
400
|
-
r4Secrets,
|
|
401
|
-
r5DeadEnds,
|
|
402
|
-
r6LongRunning,
|
|
403
|
-
r7AlertLogEnforcement,
|
|
404
|
-
r8UnusedData,
|
|
405
|
-
r9ConfigLiterals,
|
|
406
|
-
r10NamingConvention,
|
|
407
|
-
r11DeprecatedNodes,
|
|
408
|
-
r12UnhandledErrorPath,
|
|
409
|
-
r13WebhookAcknowledgment,
|
|
410
|
-
r14RetryAfterCompliance,
|
|
411
|
-
];
|
|
412
|
-
function runAllRules(graph, ctx) {
|
|
413
|
-
return rules.flatMap((rule) => rule(graph, ctx));
|
|
414
|
-
}
|
|
415
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/review/rules/index.ts"],"names":[],"mappings":";;AAsfA,kCAEC;AAtfD,6CAAyE;AACzE,oCAakB;AAMlB,yCAAyC;AAEzC,MAAM,OAAO,GAAG,IAAA,2BAAc,EAAC,IAAI,EAAE,kBAAkB,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;IAC5E,IAAI,CAAC,IAAA,iBAAS,EAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAEvC,MAAM,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAA4B,CAAC;IAC9D,MAAM,OAAO,GAAG,CAAE,MAAc,CAAC,OAAO,IAAI,EAAE,CAA4B,CAAC;IAE3E,MAAM,eAAe,GAAc;QACjC,OAAO,CAAC,WAAW;QAClB,MAAc,CAAC,WAAW;QAC3B,IAAI,CAAC,KAAK,EAAE,WAAW;KACxB,CAAC;IAEF,MAAM,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC;IAE3F,IAAI,WAAW,KAAK,IAAI,EAAE,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE,CAAC;QACpC,MAAM,UAAU,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QACpD,IAAI,WAAW,CAAC,QAA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