@kairoaisec/cli 0.1.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/CHANGELOG.md +47 -0
- package/LICENSE +21 -0
- package/README.md +161 -0
- package/dist/api/client.d.ts +128 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +153 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/index.d.ts +7 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +42 -0
- package/dist/api/index.js.map +1 -0
- package/dist/cli.d.ts +5 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +72 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/auth/index.d.ts +3 -0
- package/dist/commands/auth/index.d.ts.map +1 -0
- package/dist/commands/auth/index.js +13 -0
- package/dist/commands/auth/index.js.map +1 -0
- package/dist/commands/auth/login.d.ts +3 -0
- package/dist/commands/auth/login.d.ts.map +1 -0
- package/dist/commands/auth/login.js +174 -0
- package/dist/commands/auth/login.js.map +1 -0
- package/dist/commands/auth/logout.d.ts +3 -0
- package/dist/commands/auth/logout.d.ts.map +1 -0
- package/dist/commands/auth/logout.js +56 -0
- package/dist/commands/auth/logout.js.map +1 -0
- package/dist/commands/auth/whoami.d.ts +3 -0
- package/dist/commands/auth/whoami.d.ts.map +1 -0
- package/dist/commands/auth/whoami.js +110 -0
- package/dist/commands/auth/whoami.js.map +1 -0
- package/dist/commands/config.d.ts +3 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +102 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/project/create.d.ts +3 -0
- package/dist/commands/project/create.d.ts.map +1 -0
- package/dist/commands/project/create.js +146 -0
- package/dist/commands/project/create.js.map +1 -0
- package/dist/commands/project/index.d.ts +3 -0
- package/dist/commands/project/index.d.ts.map +1 -0
- package/dist/commands/project/index.js +14 -0
- package/dist/commands/project/index.js.map +1 -0
- package/dist/commands/project/list.d.ts +3 -0
- package/dist/commands/project/list.d.ts.map +1 -0
- package/dist/commands/project/list.js +116 -0
- package/dist/commands/project/list.js.map +1 -0
- package/dist/commands/project/select.d.ts +3 -0
- package/dist/commands/project/select.d.ts.map +1 -0
- package/dist/commands/project/select.js +147 -0
- package/dist/commands/project/select.js.map +1 -0
- package/dist/commands/scan.d.ts +3 -0
- package/dist/commands/scan.d.ts.map +1 -0
- package/dist/commands/scan.js +401 -0
- package/dist/commands/scan.js.map +1 -0
- package/dist/config/index.d.ts +44 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +237 -0
- package/dist/config/index.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +33 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/file-discovery.d.ts +17 -0
- package/dist/lib/file-discovery.d.ts.map +1 -0
- package/dist/lib/file-discovery.js +218 -0
- package/dist/lib/file-discovery.js.map +1 -0
- package/dist/lib/patterns.d.ts +18 -0
- package/dist/lib/patterns.d.ts.map +1 -0
- package/dist/lib/patterns.js +187 -0
- package/dist/lib/patterns.js.map +1 -0
- package/dist/lib/sarif.d.ts +61 -0
- package/dist/lib/sarif.d.ts.map +1 -0
- package/dist/lib/sarif.js +169 -0
- package/dist/lib/sarif.js.map +1 -0
- package/dist/lib/scanner.d.ts +43 -0
- package/dist/lib/scanner.d.ts.map +1 -0
- package/dist/lib/scanner.js +163 -0
- package/dist/lib/scanner.js.map +1 -0
- package/dist/lib/slither.d.ts +112 -0
- package/dist/lib/slither.d.ts.map +1 -0
- package/dist/lib/slither.js +463 -0
- package/dist/lib/slither.js.map +1 -0
- package/dist/utils/logger.d.ts +14 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +44 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/spinner.d.ts +15 -0
- package/dist/utils/spinner.d.ts.map +1 -0
- package/dist/utils/spinner.js +55 -0
- package/dist/utils/spinner.js.map +1 -0
- package/dist/utils/validation.d.ts +12 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +79 -0
- package/dist/utils/validation.js.map +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
export interface SlitherFinding {
|
|
2
|
+
check: string;
|
|
3
|
+
impact: string;
|
|
4
|
+
confidence: string;
|
|
5
|
+
description: string;
|
|
6
|
+
elements: Array<{
|
|
7
|
+
type: string;
|
|
8
|
+
name: string;
|
|
9
|
+
source_mapping: {
|
|
10
|
+
start: number;
|
|
11
|
+
length: number;
|
|
12
|
+
filename_relative: string;
|
|
13
|
+
filename_absolute: string;
|
|
14
|
+
filename_short: string;
|
|
15
|
+
is_dependency: boolean;
|
|
16
|
+
lines: number[];
|
|
17
|
+
starting_column: number;
|
|
18
|
+
ending_column: number;
|
|
19
|
+
};
|
|
20
|
+
}>;
|
|
21
|
+
additional_fields?: {
|
|
22
|
+
vuln_id?: string;
|
|
23
|
+
severity?: string;
|
|
24
|
+
markdown?: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export interface KairoFinding {
|
|
28
|
+
title: string;
|
|
29
|
+
severity: 'critical' | 'high' | 'medium' | 'low' | 'informational';
|
|
30
|
+
description: string;
|
|
31
|
+
recommendation: string;
|
|
32
|
+
affected_lines?: string;
|
|
33
|
+
source: 'slither';
|
|
34
|
+
file_path?: string;
|
|
35
|
+
check_name?: string;
|
|
36
|
+
confidence?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface SlitherResult {
|
|
39
|
+
success: boolean;
|
|
40
|
+
findings: KairoFinding[];
|
|
41
|
+
errors?: string[];
|
|
42
|
+
rawOutput?: any;
|
|
43
|
+
}
|
|
44
|
+
export interface SlitherOptions {
|
|
45
|
+
enabled?: boolean;
|
|
46
|
+
slitherOnly?: boolean;
|
|
47
|
+
timeout?: number;
|
|
48
|
+
configFile?: string;
|
|
49
|
+
excludeChecks?: string[];
|
|
50
|
+
includeChecks?: string[];
|
|
51
|
+
}
|
|
52
|
+
export declare class SlitherAnalyzer {
|
|
53
|
+
private static readonly DEFAULT_TIMEOUT;
|
|
54
|
+
private static readonly SLITHER_VERSION_REGEX;
|
|
55
|
+
/**
|
|
56
|
+
* Check if Slither is installed and available
|
|
57
|
+
*/
|
|
58
|
+
static isInstalled(): Promise<boolean>;
|
|
59
|
+
/**
|
|
60
|
+
* Get Slither version
|
|
61
|
+
*/
|
|
62
|
+
static getVersion(): Promise<string | null>;
|
|
63
|
+
/**
|
|
64
|
+
* Prompt user to install Slither
|
|
65
|
+
*/
|
|
66
|
+
static getInstallInstructions(): string;
|
|
67
|
+
/**
|
|
68
|
+
* Run Slither analysis on a directory or file
|
|
69
|
+
*/
|
|
70
|
+
static analyze(targetPath: string, options?: SlitherOptions): Promise<SlitherResult>;
|
|
71
|
+
/**
|
|
72
|
+
* Build Slither command arguments
|
|
73
|
+
*/
|
|
74
|
+
private static buildSlitherArgs;
|
|
75
|
+
/**
|
|
76
|
+
* Execute Slither command with timeout using spawn
|
|
77
|
+
*/
|
|
78
|
+
private static execWithTimeout;
|
|
79
|
+
/**
|
|
80
|
+
* Convert Slither findings to Kairo format
|
|
81
|
+
*/
|
|
82
|
+
private static convertToKairoFormat;
|
|
83
|
+
/**
|
|
84
|
+
* Convert a single Slither detector result to Kairo finding
|
|
85
|
+
*/
|
|
86
|
+
private static convertDetectorToKairoFinding;
|
|
87
|
+
/**
|
|
88
|
+
* Map Slither impact and confidence to Kairo severity
|
|
89
|
+
*/
|
|
90
|
+
private static mapImpactToSeverity;
|
|
91
|
+
/**
|
|
92
|
+
* Generate human-readable title from Slither check name
|
|
93
|
+
*/
|
|
94
|
+
private static generateTitle;
|
|
95
|
+
/**
|
|
96
|
+
* Generate recommendation based on Slither check name
|
|
97
|
+
*/
|
|
98
|
+
private static generateRecommendation;
|
|
99
|
+
/**
|
|
100
|
+
* Get available Slither checks
|
|
101
|
+
*/
|
|
102
|
+
static getAvailableChecks(): Promise<string[]>;
|
|
103
|
+
/**
|
|
104
|
+
* Validate Slither configuration file
|
|
105
|
+
*/
|
|
106
|
+
static validateConfig(configPath: string): {
|
|
107
|
+
valid: boolean;
|
|
108
|
+
errors: string[];
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
export default SlitherAnalyzer;
|
|
112
|
+
//# sourceMappingURL=slither.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slither.d.ts","sourceRoot":"","sources":["../../src/lib/slither.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,cAAc,EAAE;YACd,KAAK,EAAE,MAAM,CAAC;YACd,MAAM,EAAE,MAAM,CAAC;YACf,iBAAiB,EAAE,MAAM,CAAC;YAC1B,iBAAiB,EAAE,MAAM,CAAC;YAC1B,cAAc,EAAE,MAAM,CAAC;YACvB,aAAa,EAAE,OAAO,CAAC;YACvB,KAAK,EAAE,MAAM,EAAE,CAAC;YAChB,eAAe,EAAE,MAAM,CAAC;YACxB,aAAa,EAAE,MAAM,CAAC;SACvB,CAAC;KACH,CAAC,CAAC;IACH,iBAAiB,CAAC,EAAE;QAClB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,eAAe,CAAC;IACnE,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CA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AEG;IACH,OAAO,CAAC,MAAM,CAAC,mBAAmB;IAyClC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa;IAwE5B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,sBAAsB;IAiCrC;;OAEG;WACU,kBAAkB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAuBpD;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE;CAoBhF;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,463 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.SlitherAnalyzer = void 0;
|
|
37
|
+
const child_process_1 = require("child_process");
|
|
38
|
+
const fs = __importStar(require("fs"));
|
|
39
|
+
class SlitherAnalyzer {
|
|
40
|
+
static DEFAULT_TIMEOUT = 120000; // 2 minutes
|
|
41
|
+
static SLITHER_VERSION_REGEX = /^(\d+\.\d+\.\d+)/;
|
|
42
|
+
/**
|
|
43
|
+
* Check if Slither is installed and available
|
|
44
|
+
*/
|
|
45
|
+
static async isInstalled() {
|
|
46
|
+
try {
|
|
47
|
+
await this.execWithTimeout(['--version'], 5000);
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Get Slither version
|
|
56
|
+
*/
|
|
57
|
+
static async getVersion() {
|
|
58
|
+
try {
|
|
59
|
+
const stdout = await this.execWithTimeout(['--version'], 5000);
|
|
60
|
+
const match = stdout.trim().match(this.SLITHER_VERSION_REGEX);
|
|
61
|
+
return match ? match[1] : null;
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Prompt user to install Slither
|
|
69
|
+
*/
|
|
70
|
+
static getInstallInstructions() {
|
|
71
|
+
return `
|
|
72
|
+
Slither is not installed. Please install it using one of the following methods:
|
|
73
|
+
|
|
74
|
+
📦 Using pip (recommended):
|
|
75
|
+
pip3 install slither-analyzer
|
|
76
|
+
|
|
77
|
+
🐍 Using pipx:
|
|
78
|
+
pipx install slither-analyzer
|
|
79
|
+
|
|
80
|
+
🍺 Using Homebrew (macOS):
|
|
81
|
+
brew install slither-analyzer
|
|
82
|
+
|
|
83
|
+
📖 For more installation options, visit:
|
|
84
|
+
https://github.com/crytic/slither#installation
|
|
85
|
+
|
|
86
|
+
After installation, run this command again.
|
|
87
|
+
`;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Run Slither analysis on a directory or file
|
|
91
|
+
*/
|
|
92
|
+
static async analyze(targetPath, options = {}) {
|
|
93
|
+
const { timeout = this.DEFAULT_TIMEOUT, configFile, excludeChecks = [], includeChecks = [], } = options;
|
|
94
|
+
// Check if Slither is installed
|
|
95
|
+
if (!(await this.isInstalled())) {
|
|
96
|
+
throw new Error('Slither is not installed. Run with --no-slither to skip Slither analysis.');
|
|
97
|
+
}
|
|
98
|
+
// Validate target path
|
|
99
|
+
if (!fs.existsSync(targetPath)) {
|
|
100
|
+
throw new Error(`Target path does not exist: ${targetPath}`);
|
|
101
|
+
}
|
|
102
|
+
try {
|
|
103
|
+
// Build Slither command arguments
|
|
104
|
+
const args = this.buildSlitherArgs(targetPath, {
|
|
105
|
+
configFile,
|
|
106
|
+
excludeChecks,
|
|
107
|
+
includeChecks,
|
|
108
|
+
});
|
|
109
|
+
console.log(`Running Slither analysis: slither ${args.join(' ')}`);
|
|
110
|
+
// Execute Slither with spawn
|
|
111
|
+
const stdout = await this.execWithTimeout(args, timeout);
|
|
112
|
+
// Parse JSON output
|
|
113
|
+
let slitherOutput;
|
|
114
|
+
try {
|
|
115
|
+
slitherOutput = JSON.parse(stdout);
|
|
116
|
+
}
|
|
117
|
+
catch (parseError) {
|
|
118
|
+
// If JSON parsing fails, try to extract JSON from stdout
|
|
119
|
+
const jsonMatch = stdout.match(/\{[\s\S]*\}/);
|
|
120
|
+
if (jsonMatch) {
|
|
121
|
+
slitherOutput = JSON.parse(jsonMatch[0]);
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
throw new Error(`Failed to parse Slither JSON output: ${parseError}`);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
// Convert to Kairo format
|
|
128
|
+
const findings = this.convertToKairoFormat(slitherOutput);
|
|
129
|
+
return {
|
|
130
|
+
success: true,
|
|
131
|
+
findings,
|
|
132
|
+
rawOutput: slitherOutput,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
catch (error) {
|
|
136
|
+
// Handle timeout errors
|
|
137
|
+
if (error.message && error.message.includes('timeout')) {
|
|
138
|
+
return {
|
|
139
|
+
success: false,
|
|
140
|
+
findings: [],
|
|
141
|
+
errors: [`Slither analysis timed out after ${timeout}ms`],
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
// Handle other execution errors
|
|
145
|
+
const errorMessage = error.stderr || error.message || 'Unknown Slither error';
|
|
146
|
+
console.error('Slither analysis failed:', errorMessage);
|
|
147
|
+
return {
|
|
148
|
+
success: false,
|
|
149
|
+
findings: [],
|
|
150
|
+
errors: [errorMessage],
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Build Slither command arguments
|
|
156
|
+
*/
|
|
157
|
+
static buildSlitherArgs(targetPath, options) {
|
|
158
|
+
const args = [];
|
|
159
|
+
// Add target path
|
|
160
|
+
args.push(targetPath);
|
|
161
|
+
// Output format
|
|
162
|
+
args.push('--json', '-');
|
|
163
|
+
// Config file
|
|
164
|
+
if (options.configFile && fs.existsSync(options.configFile)) {
|
|
165
|
+
args.push('--config-file', options.configFile);
|
|
166
|
+
}
|
|
167
|
+
// Exclude specific checks
|
|
168
|
+
if (options.excludeChecks && options.excludeChecks.length > 0) {
|
|
169
|
+
args.push('--exclude', options.excludeChecks.join(','));
|
|
170
|
+
}
|
|
171
|
+
// Include only specific checks
|
|
172
|
+
if (options.includeChecks && options.includeChecks.length > 0) {
|
|
173
|
+
args.push('--include', options.includeChecks.join(','));
|
|
174
|
+
}
|
|
175
|
+
// Common optimizations
|
|
176
|
+
args.push('--disable-color');
|
|
177
|
+
args.push('--no-fail-pedantic');
|
|
178
|
+
return args;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Execute Slither command with timeout using spawn
|
|
182
|
+
*/
|
|
183
|
+
static async execWithTimeout(args, timeout) {
|
|
184
|
+
return new Promise((resolve, reject) => {
|
|
185
|
+
const child = (0, child_process_1.spawn)('slither', args);
|
|
186
|
+
let stdout = '';
|
|
187
|
+
let stderr = '';
|
|
188
|
+
let timedOut = false;
|
|
189
|
+
// Set up timeout
|
|
190
|
+
const timer = setTimeout(() => {
|
|
191
|
+
timedOut = true;
|
|
192
|
+
child.kill('SIGTERM');
|
|
193
|
+
reject(new Error(`Command timed out after ${timeout}ms`));
|
|
194
|
+
}, timeout);
|
|
195
|
+
// Collect stdout
|
|
196
|
+
if (child.stdout) {
|
|
197
|
+
child.stdout.on('data', (data) => {
|
|
198
|
+
stdout += data.toString();
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
// Collect stderr
|
|
202
|
+
if (child.stderr) {
|
|
203
|
+
child.stderr.on('data', (data) => {
|
|
204
|
+
stderr += data.toString();
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
// Handle process completion
|
|
208
|
+
child.on('close', (code) => {
|
|
209
|
+
if (timedOut)
|
|
210
|
+
return; // Already handled by timeout
|
|
211
|
+
clearTimeout(timer);
|
|
212
|
+
if (code !== 0) {
|
|
213
|
+
reject(new Error(`Process exited with code ${code}: ${stderr}`));
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
resolve(stdout);
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
// Handle process errors
|
|
220
|
+
child.on('error', (error) => {
|
|
221
|
+
if (timedOut)
|
|
222
|
+
return; // Already handled by timeout
|
|
223
|
+
clearTimeout(timer);
|
|
224
|
+
reject(error);
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Convert Slither findings to Kairo format
|
|
230
|
+
*/
|
|
231
|
+
static convertToKairoFormat(slitherOutput) {
|
|
232
|
+
if (!slitherOutput?.results?.detectors) {
|
|
233
|
+
return [];
|
|
234
|
+
}
|
|
235
|
+
const findings = [];
|
|
236
|
+
for (const detector of slitherOutput.results.detectors) {
|
|
237
|
+
const finding = this.convertDetectorToKairoFinding(detector);
|
|
238
|
+
if (finding) {
|
|
239
|
+
findings.push(finding);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return findings;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Convert a single Slither detector result to Kairo finding
|
|
246
|
+
*/
|
|
247
|
+
static convertDetectorToKairoFinding(detector) {
|
|
248
|
+
if (!detector.check || !detector.description) {
|
|
249
|
+
return null;
|
|
250
|
+
}
|
|
251
|
+
// Map Slither impact to Kairo severity
|
|
252
|
+
const severity = this.mapImpactToSeverity(detector.impact, detector.confidence);
|
|
253
|
+
// Extract file and line information
|
|
254
|
+
let filePath;
|
|
255
|
+
let affectedLines;
|
|
256
|
+
if (detector.elements && detector.elements.length > 0) {
|
|
257
|
+
const firstElement = detector.elements[0];
|
|
258
|
+
if (firstElement.source_mapping) {
|
|
259
|
+
filePath = firstElement.source_mapping.filename_relative;
|
|
260
|
+
if (firstElement.source_mapping.lines.length > 0) {
|
|
261
|
+
const lines = firstElement.source_mapping.lines;
|
|
262
|
+
affectedLines =
|
|
263
|
+
lines.length === 1
|
|
264
|
+
? lines[0].toString()
|
|
265
|
+
: `${Math.min(...lines)}-${Math.max(...lines)}`;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
// Generate title from check name
|
|
270
|
+
const title = this.generateTitle(detector.check, detector.description);
|
|
271
|
+
// Generate recommendation
|
|
272
|
+
const recommendation = this.generateRecommendation(detector.check);
|
|
273
|
+
return {
|
|
274
|
+
title,
|
|
275
|
+
severity,
|
|
276
|
+
description: detector.description,
|
|
277
|
+
recommendation,
|
|
278
|
+
affected_lines: affectedLines,
|
|
279
|
+
file_path: filePath,
|
|
280
|
+
check_name: detector.check,
|
|
281
|
+
confidence: detector.confidence,
|
|
282
|
+
source: 'slither',
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Map Slither impact and confidence to Kairo severity
|
|
287
|
+
*/
|
|
288
|
+
static mapImpactToSeverity(impact, confidence) {
|
|
289
|
+
const impactLower = impact.toLowerCase();
|
|
290
|
+
const confidenceLower = confidence.toLowerCase();
|
|
291
|
+
// High confidence, high impact = critical
|
|
292
|
+
if (impactLower === 'high' && confidenceLower === 'high') {
|
|
293
|
+
return 'critical';
|
|
294
|
+
}
|
|
295
|
+
// High impact, medium confidence = high
|
|
296
|
+
if (impactLower === 'high' && confidenceLower === 'medium') {
|
|
297
|
+
return 'high';
|
|
298
|
+
}
|
|
299
|
+
// High impact, low confidence = medium (could be false positive)
|
|
300
|
+
if (impactLower === 'high' && confidenceLower === 'low') {
|
|
301
|
+
return 'medium';
|
|
302
|
+
}
|
|
303
|
+
// Medium impact = medium
|
|
304
|
+
if (impactLower === 'medium') {
|
|
305
|
+
return 'medium';
|
|
306
|
+
}
|
|
307
|
+
// Low impact = low
|
|
308
|
+
if (impactLower === 'low') {
|
|
309
|
+
return 'low';
|
|
310
|
+
}
|
|
311
|
+
// Informational
|
|
312
|
+
if (impactLower === 'informational' || impactLower === 'optimization') {
|
|
313
|
+
return 'informational';
|
|
314
|
+
}
|
|
315
|
+
// Default to medium for unknown impacts
|
|
316
|
+
return 'medium';
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Generate human-readable title from Slither check name
|
|
320
|
+
*/
|
|
321
|
+
static generateTitle(checkName, _description) {
|
|
322
|
+
// Common Slither check mappings
|
|
323
|
+
const titleMap = {
|
|
324
|
+
'reentrancy-eth': 'Reentrancy Vulnerability (ETH)',
|
|
325
|
+
'reentrancy-no-eth': 'Reentrancy Vulnerability (No ETH)',
|
|
326
|
+
'reentrancy-unlimited-gas': 'Reentrancy with Unlimited Gas',
|
|
327
|
+
'unchecked-transfer': 'Unchecked Transfer Return Value',
|
|
328
|
+
'unchecked-send': 'Unchecked Send Return Value',
|
|
329
|
+
'arbitrary-send-eth': 'Arbitrary Send of ETH',
|
|
330
|
+
'arbitrary-send-erc20': 'Arbitrary Send of ERC20',
|
|
331
|
+
'controlled-delegatecall': 'Controlled Delegatecall',
|
|
332
|
+
'delegatecall-loop': 'Delegatecall in Loop',
|
|
333
|
+
'msg-value-loop': 'msg.value in Loop',
|
|
334
|
+
'multiple-constructors': 'Multiple Constructors',
|
|
335
|
+
'name-reused': 'Name Reused',
|
|
336
|
+
'protected-vars': 'Protected Variables',
|
|
337
|
+
'public-mappings-nested': 'Public Nested Mappings',
|
|
338
|
+
rtlo: 'Right-To-Left Override Character',
|
|
339
|
+
'shadowing-state': 'State Variable Shadowing',
|
|
340
|
+
suicidal: 'Suicidal Contract',
|
|
341
|
+
'uninitialized-state': 'Uninitialized State Variables',
|
|
342
|
+
'uninitialized-storage': 'Uninitialized Storage Variables',
|
|
343
|
+
'unprotected-upgrade': 'Unprotected Upgrade',
|
|
344
|
+
codex: 'Missing Zero Address Check',
|
|
345
|
+
'incorrect-shift': 'Incorrect Shift Operation',
|
|
346
|
+
assembly: 'Assembly Usage',
|
|
347
|
+
'assert-state-change': 'Assert State Change',
|
|
348
|
+
'boolean-equal': 'Boolean Equality',
|
|
349
|
+
'cyclomatic-complexity': 'High Cyclomatic Complexity',
|
|
350
|
+
'deprecated-standards': 'Deprecated Standards',
|
|
351
|
+
'erc20-interface': 'ERC20 Interface Issues',
|
|
352
|
+
'erc721-interface': 'ERC721 Interface Issues',
|
|
353
|
+
'external-function': 'External Function Issues',
|
|
354
|
+
'function-init-state': 'Function Initializes State',
|
|
355
|
+
'low-level-calls': 'Low Level Calls',
|
|
356
|
+
'missing-inheritance': 'Missing Inheritance',
|
|
357
|
+
'naming-convention': 'Naming Convention',
|
|
358
|
+
pragma: 'Pragma Issues',
|
|
359
|
+
'redundant-statements': 'Redundant Statements',
|
|
360
|
+
'solc-version': 'Solidity Version Issues',
|
|
361
|
+
'unused-state': 'Unused State Variables',
|
|
362
|
+
'costly-loop': 'Costly Loop Operations',
|
|
363
|
+
'dead-code': 'Dead Code',
|
|
364
|
+
'reentrancy-benign': 'Benign Reentrancy',
|
|
365
|
+
'reentrancy-events': 'Reentrancy with Events',
|
|
366
|
+
timestamp: 'Timestamp Dependency',
|
|
367
|
+
'calls-loop': 'Calls in Loop',
|
|
368
|
+
'events-access': 'Missing Events for Access Control',
|
|
369
|
+
'events-maths': 'Missing Events for Math Operations',
|
|
370
|
+
'incorrect-equality': 'Incorrect Equality',
|
|
371
|
+
'locked-ether': 'Locked Ether',
|
|
372
|
+
'mapping-deletion': 'Mapping Deletion',
|
|
373
|
+
'shadowing-abstract': 'Shadowing of Abstract Functions',
|
|
374
|
+
'shadowing-builtin': 'Shadowing of Builtin Symbols',
|
|
375
|
+
'shadowing-local': 'Local Variable Shadowing',
|
|
376
|
+
'uninitialized-local': 'Uninitialized Local Variables',
|
|
377
|
+
'unused-return': 'Unused Return Values',
|
|
378
|
+
'void-cst': 'Void Constructor',
|
|
379
|
+
'write-after-write': 'Write After Write',
|
|
380
|
+
};
|
|
381
|
+
if (titleMap[checkName]) {
|
|
382
|
+
return titleMap[checkName];
|
|
383
|
+
}
|
|
384
|
+
// Fallback: convert kebab-case to Title Case
|
|
385
|
+
return checkName
|
|
386
|
+
.split('-')
|
|
387
|
+
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
|
388
|
+
.join(' ');
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Generate recommendation based on Slither check name
|
|
392
|
+
*/
|
|
393
|
+
static generateRecommendation(checkName) {
|
|
394
|
+
const recommendationMap = {
|
|
395
|
+
'reentrancy-eth': 'Use the checks-effects-interactions pattern. Consider using ReentrancyGuard modifier.',
|
|
396
|
+
'reentrancy-no-eth': 'Use the checks-effects-interactions pattern. Update state before external calls.',
|
|
397
|
+
'unchecked-transfer': 'Check the return value of transfer() calls or use SafeERC20.',
|
|
398
|
+
'unchecked-send': 'Check the return value of send() calls or use transfer() instead.',
|
|
399
|
+
'arbitrary-send-eth': 'Validate the recipient address and amount before sending ETH.',
|
|
400
|
+
'controlled-delegatecall': 'Avoid delegatecall with user-controlled data. Use a whitelist of approved contracts.',
|
|
401
|
+
suicidal: 'Remove selfdestruct functionality or add proper access controls.',
|
|
402
|
+
'uninitialized-state': 'Initialize all state variables in the constructor or at declaration.',
|
|
403
|
+
'shadowing-state': 'Rename variables to avoid shadowing state variables.',
|
|
404
|
+
timestamp: 'Avoid using block.timestamp for critical logic. Consider using block numbers or oracles.',
|
|
405
|
+
'locked-ether': 'Add a withdraw function or prevent accidental ETH deposits.',
|
|
406
|
+
'missing-zero-check': 'Add require() statements to check for zero addresses.',
|
|
407
|
+
'low-level-calls': 'Use high-level calls when possible. If using low-level calls, handle failures properly.',
|
|
408
|
+
pragma: 'Use a specific pragma version to ensure consistent compilation.',
|
|
409
|
+
'naming-convention': 'Follow Solidity naming conventions for better readability.',
|
|
410
|
+
'unused-state': 'Remove unused state variables to optimize gas usage.',
|
|
411
|
+
'external-function': 'Make functions external if they are only called externally.',
|
|
412
|
+
'costly-loop': 'Optimize loops to reduce gas costs. Consider pagination for large datasets.',
|
|
413
|
+
};
|
|
414
|
+
return (recommendationMap[checkName] ||
|
|
415
|
+
'Review the code and apply appropriate security measures based on the finding description.');
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Get available Slither checks
|
|
419
|
+
*/
|
|
420
|
+
static async getAvailableChecks() {
|
|
421
|
+
try {
|
|
422
|
+
const stdout = await this.execWithTimeout(['--list-detectors'], 10000);
|
|
423
|
+
// Parse the detector list output
|
|
424
|
+
const lines = stdout.split('\n');
|
|
425
|
+
const checks = [];
|
|
426
|
+
for (const line of lines) {
|
|
427
|
+
// Look for lines that start with detector names (usually indented)
|
|
428
|
+
const match = line.match(/^\s*([a-z-]+)\s+/);
|
|
429
|
+
if (match && match[1]) {
|
|
430
|
+
checks.push(match[1]);
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
return checks.filter((check) => check.length > 0);
|
|
434
|
+
}
|
|
435
|
+
catch (error) {
|
|
436
|
+
console.warn('Could not retrieve Slither detector list:', error);
|
|
437
|
+
return [];
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* Validate Slither configuration file
|
|
442
|
+
*/
|
|
443
|
+
static validateConfig(configPath) {
|
|
444
|
+
const errors = [];
|
|
445
|
+
if (!fs.existsSync(configPath)) {
|
|
446
|
+
errors.push(`Config file does not exist: ${configPath}`);
|
|
447
|
+
return { valid: false, errors };
|
|
448
|
+
}
|
|
449
|
+
try {
|
|
450
|
+
const configContent = fs.readFileSync(configPath, 'utf8');
|
|
451
|
+
// Basic JSON validation
|
|
452
|
+
JSON.parse(configContent);
|
|
453
|
+
return { valid: true, errors: [] };
|
|
454
|
+
}
|
|
455
|
+
catch (error) {
|
|
456
|
+
errors.push(`Invalid config file format: ${error}`);
|
|
457
|
+
return { valid: false, errors };
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
exports.SlitherAnalyzer = SlitherAnalyzer;
|
|
462
|
+
exports.default = SlitherAnalyzer;
|
|
463
|
+
//# sourceMappingURL=slither.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slither.js","sourceRoot":"","sources":["../../src/lib/slither.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAoD;AACpD,uCAAyB;AAyDzB,MAAa,eAAe;IAClB,MAAM,CAAU,eAAe,GAAG,MAAM,CAAC,CAAC,YAAY;IACtD,MAAM,CAAU,qBAAqB,GAAG,kBAAkB,CAAC;IAEn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,CAAC;QAED,IAAI,CAAC;YACH,MAAM,aAAa,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;YAE1D,wBAAwB;YACxB,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;YAE1B,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;QACrC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,IAAI,CAAC,+BAA+B,KAAK,EAAE,CAAC,CAAC;YACpD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QAClC,CAAC;IACH,CAAC;;AAlfH,0CAmfC;AAED,kBAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare class Logger {
|
|
2
|
+
private static debugMode;
|
|
3
|
+
static setDebugMode(enabled: boolean): void;
|
|
4
|
+
static info(message: string, ...args: any[]): void;
|
|
5
|
+
static success(message: string, ...args: any[]): void;
|
|
6
|
+
static warn(message: string, ...args: any[]): void;
|
|
7
|
+
static error(message: string, ...args: any[]): void;
|
|
8
|
+
static debug(message: string, ...args: any[]): void;
|
|
9
|
+
static log(message: string, ...args: any[]): void;
|
|
10
|
+
static highlight(text: string): string;
|
|
11
|
+
static dim(text: string): string;
|
|
12
|
+
static bold(text: string): string;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAEA,qBAAa,MAAM;IACjB,OAAO,CAAC,MAAM,CAAC,SAAS,CAAS;IAEjC,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAI3C,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAIlD,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAIrD,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAIlD,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAInD,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAMnD,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,IAAI;IAIjD,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAItC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAIhC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAGlC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Logger = void 0;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
class Logger {
|
|
9
|
+
static debugMode = false;
|
|
10
|
+
static setDebugMode(enabled) {
|
|
11
|
+
Logger.debugMode = enabled;
|
|
12
|
+
}
|
|
13
|
+
static info(message, ...args) {
|
|
14
|
+
console.log(chalk_1.default.blue('ℹ'), message, ...args);
|
|
15
|
+
}
|
|
16
|
+
static success(message, ...args) {
|
|
17
|
+
console.log(chalk_1.default.green('✓'), message, ...args);
|
|
18
|
+
}
|
|
19
|
+
static warn(message, ...args) {
|
|
20
|
+
console.warn(chalk_1.default.yellow('⚠'), message, ...args);
|
|
21
|
+
}
|
|
22
|
+
static error(message, ...args) {
|
|
23
|
+
console.error(chalk_1.default.red('✗'), message, ...args);
|
|
24
|
+
}
|
|
25
|
+
static debug(message, ...args) {
|
|
26
|
+
if (Logger.debugMode) {
|
|
27
|
+
console.log(chalk_1.default.gray('🐛'), chalk_1.default.gray(message), ...args);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
static log(message, ...args) {
|
|
31
|
+
console.log(message, ...args);
|
|
32
|
+
}
|
|
33
|
+
static highlight(text) {
|
|
34
|
+
return chalk_1.default.cyan(text);
|
|
35
|
+
}
|
|
36
|
+
static dim(text) {
|
|
37
|
+
return chalk_1.default.dim(text);
|
|
38
|
+
}
|
|
39
|
+
static bold(text) {
|
|
40
|
+
return chalk_1.default.bold(text);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.Logger = Logger;
|
|
44
|
+
//# sourceMappingURL=logger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,MAAa,MAAM;IACT,MAAM,CAAC,SAAS,GAAG,KAAK,CAAC;IAEjC,MAAM,CAAC,YAAY,CAAC,OAAgB;QAClC,MAAM,CAAC,SAAS,GAAG,OAAO,CAAC;IAC7B,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,OAAe,EAAE,GAAG,IAAW;QACzC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,OAAe,EAAE,GAAG,IAAW;QAC5C,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,GAAG,IAAI,CAA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