check-my-toolkit 0.16.0 → 0.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.
|
@@ -1,23 +1,30 @@
|
|
|
1
1
|
import { type CheckResult } from "../../types/index.js";
|
|
2
2
|
import { BaseToolRunner } from "./base.js";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Dependency audit tool runner for detecting vulnerabilities.
|
|
5
|
+
* Supports npm and pnpm (auto-detected based on lock file).
|
|
5
6
|
*/
|
|
6
7
|
export declare class NpmAuditRunner extends BaseToolRunner {
|
|
7
8
|
readonly name = "npmaudit";
|
|
8
9
|
readonly rule = "code.security";
|
|
9
10
|
readonly toolId = "npmaudit";
|
|
10
11
|
readonly configFiles: string[];
|
|
12
|
+
/**
|
|
13
|
+
* Detect which package manager is being used
|
|
14
|
+
*/
|
|
15
|
+
private detectPackageManager;
|
|
11
16
|
run(projectRoot: string): Promise<CheckResult>;
|
|
12
17
|
private processAuditResult;
|
|
13
18
|
private handleRunError;
|
|
14
19
|
private parseOutput;
|
|
20
|
+
private parseNpmOutput;
|
|
21
|
+
private parsePnpmOutput;
|
|
15
22
|
private mapSeverity;
|
|
16
|
-
private
|
|
17
|
-
private
|
|
23
|
+
private getNpmVulnerabilityTitle;
|
|
24
|
+
private getNpmFixInfo;
|
|
18
25
|
private createErrorViolation;
|
|
19
26
|
/**
|
|
20
|
-
* Audit - check if
|
|
27
|
+
* Audit - check if a lock file exists (npm or pnpm)
|
|
21
28
|
*/
|
|
22
29
|
audit(projectRoot: string): Promise<CheckResult>;
|
|
23
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npmaudit.d.ts","sourceRoot":"","sources":["../../../src/code/tools/npmaudit.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"npmaudit.d.ts","sourceRoot":"","sources":["../../../src/code/tools/npmaudit.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAqE3C;;;GAGG;AACH,qBAAa,cAAe,SAAQ,cAAc;IAChD,QAAQ,CAAC,IAAI,cAAc;IAC3B,QAAQ,CAAC,IAAI,mBAAmB;IAChC,QAAQ,CAAC,MAAM,cAAc;IAC7B,QAAQ,CAAC,WAAW,WAA2C;IAE/D;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAStB,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAyBpD,OAAO,CAAC,kBAAkB;IAqB1B,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,WAAW;IAWnB,OAAO,CAAC,cAAc;IAsBtB,OAAO,CAAC,eAAe;IAyBvB,OAAO,CAAC,WAAW;IAanB,OAAO,CAAC,wBAAwB;IAShC,OAAO,CAAC,aAAa;IAWrB,OAAO,CAAC,oBAAoB;IAS5B;;OAEG;IACG,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CAkBvD"}
|
|
@@ -1,74 +1,120 @@
|
|
|
1
|
+
import * as fs from "node:fs";
|
|
2
|
+
import * as path from "node:path";
|
|
1
3
|
import { execa } from "execa";
|
|
2
4
|
import { BaseToolRunner } from "./base.js";
|
|
5
|
+
/** Package manager configurations */
|
|
6
|
+
const PACKAGE_MANAGERS = [
|
|
7
|
+
{ name: "pnpm", lockFile: "pnpm-lock.yaml", command: "pnpm", args: ["audit", "--json"] },
|
|
8
|
+
{ name: "npm", lockFile: "package-lock.json", command: "npm", args: ["audit", "--json"] },
|
|
9
|
+
];
|
|
3
10
|
/**
|
|
4
|
-
*
|
|
11
|
+
* Dependency audit tool runner for detecting vulnerabilities.
|
|
12
|
+
* Supports npm and pnpm (auto-detected based on lock file).
|
|
5
13
|
*/
|
|
6
14
|
export class NpmAuditRunner extends BaseToolRunner {
|
|
7
15
|
name = "npmaudit";
|
|
8
16
|
rule = "code.security";
|
|
9
17
|
toolId = "npmaudit";
|
|
10
|
-
configFiles = ["package-lock.json"];
|
|
18
|
+
configFiles = ["package-lock.json", "pnpm-lock.yaml"];
|
|
19
|
+
/**
|
|
20
|
+
* Detect which package manager is being used
|
|
21
|
+
*/
|
|
22
|
+
detectPackageManager(projectRoot) {
|
|
23
|
+
for (const pm of PACKAGE_MANAGERS) {
|
|
24
|
+
if (fs.existsSync(path.join(projectRoot, pm.lockFile))) {
|
|
25
|
+
return pm;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
11
30
|
async run(projectRoot) {
|
|
12
31
|
const startTime = Date.now();
|
|
13
32
|
const elapsed = () => Date.now() - startTime;
|
|
14
|
-
|
|
15
|
-
|
|
33
|
+
const pm = this.detectPackageManager(projectRoot);
|
|
34
|
+
if (!pm) {
|
|
35
|
+
return this.fail([this.createErrorViolation("No lock file found (package-lock.json or pnpm-lock.yaml)")], elapsed());
|
|
16
36
|
}
|
|
17
37
|
try {
|
|
18
|
-
const result = await execa(
|
|
38
|
+
const result = await execa(pm.command, pm.args, {
|
|
19
39
|
cwd: projectRoot,
|
|
20
40
|
reject: false,
|
|
21
41
|
timeout: 5 * 60 * 1000,
|
|
22
42
|
});
|
|
23
|
-
return this.processAuditResult(result, elapsed);
|
|
43
|
+
return this.processAuditResult(result, pm, elapsed);
|
|
24
44
|
}
|
|
25
45
|
catch (error) {
|
|
26
|
-
return this.handleRunError(error, elapsed);
|
|
46
|
+
return this.handleRunError(error, pm, elapsed);
|
|
27
47
|
}
|
|
28
48
|
}
|
|
29
|
-
processAuditResult(result, elapsed) {
|
|
49
|
+
processAuditResult(result, pm, elapsed) {
|
|
30
50
|
const output = String(result.stdout ?? result.stderr ?? "");
|
|
31
|
-
const violations = this.parseOutput(output);
|
|
51
|
+
const violations = this.parseOutput(output, pm);
|
|
32
52
|
if (violations === null) {
|
|
33
53
|
if (result.exitCode !== 0) {
|
|
34
|
-
return this.fail([this.createErrorViolation(
|
|
54
|
+
return this.fail([this.createErrorViolation(`${pm.name} audit error: ${result.stderr ?? "Unknown error"}`)], elapsed());
|
|
35
55
|
}
|
|
36
56
|
return this.pass(elapsed());
|
|
37
57
|
}
|
|
38
58
|
return this.fromViolations(violations, elapsed());
|
|
39
59
|
}
|
|
40
|
-
handleRunError(error, elapsed) {
|
|
60
|
+
handleRunError(error, pm, elapsed) {
|
|
41
61
|
if (this.isNotInstalledError(error)) {
|
|
42
62
|
return this.skipNotInstalled(elapsed());
|
|
43
63
|
}
|
|
44
64
|
const message = error instanceof Error ? error.message : "Unknown error";
|
|
45
|
-
return this.fail([this.createErrorViolation(
|
|
65
|
+
return this.fail([this.createErrorViolation(`${pm.name} audit error: ${message}`)], elapsed());
|
|
46
66
|
}
|
|
47
|
-
parseOutput(output) {
|
|
67
|
+
parseOutput(output, pm) {
|
|
48
68
|
try {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
for (const [pkgName, vuln] of Object.entries(result.vulnerabilities)) {
|
|
52
|
-
const severity = this.mapSeverity(vuln.severity);
|
|
53
|
-
const title = this.getVulnerabilityTitle(vuln);
|
|
54
|
-
const fixInfo = this.getFixInfo(vuln);
|
|
55
|
-
violations.push({
|
|
56
|
-
rule: `${this.rule}.${this.toolId}`,
|
|
57
|
-
tool: this.toolId,
|
|
58
|
-
file: "package-lock.json",
|
|
59
|
-
message: `${pkgName}: ${title}${fixInfo}`,
|
|
60
|
-
code: vuln.severity,
|
|
61
|
-
severity,
|
|
62
|
-
});
|
|
69
|
+
if (pm.name === "pnpm") {
|
|
70
|
+
return this.parsePnpmOutput(output, pm);
|
|
63
71
|
}
|
|
64
|
-
return
|
|
72
|
+
return this.parseNpmOutput(output, pm);
|
|
65
73
|
}
|
|
66
74
|
catch {
|
|
67
75
|
return null;
|
|
68
76
|
}
|
|
69
77
|
}
|
|
70
|
-
|
|
71
|
-
|
|
78
|
+
parseNpmOutput(output, pm) {
|
|
79
|
+
const result = JSON.parse(output);
|
|
80
|
+
const violations = [];
|
|
81
|
+
for (const [pkgName, vuln] of Object.entries(result.vulnerabilities)) {
|
|
82
|
+
const severity = this.mapSeverity(vuln.severity);
|
|
83
|
+
const title = this.getNpmVulnerabilityTitle(vuln);
|
|
84
|
+
const fixInfo = this.getNpmFixInfo(vuln);
|
|
85
|
+
violations.push({
|
|
86
|
+
rule: `${this.rule}.${this.toolId}`,
|
|
87
|
+
tool: this.toolId,
|
|
88
|
+
file: pm.lockFile,
|
|
89
|
+
message: `${pkgName}: ${title}${fixInfo}`,
|
|
90
|
+
code: vuln.severity,
|
|
91
|
+
severity,
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
return violations;
|
|
95
|
+
}
|
|
96
|
+
parsePnpmOutput(output, pm) {
|
|
97
|
+
const result = JSON.parse(output);
|
|
98
|
+
const violations = [];
|
|
99
|
+
// pnpm audit uses "advisories" instead of "vulnerabilities"
|
|
100
|
+
if (!result.advisories) {
|
|
101
|
+
return violations;
|
|
102
|
+
}
|
|
103
|
+
for (const [, advisory] of Object.entries(result.advisories)) {
|
|
104
|
+
const severity = this.mapSeverity(advisory.severity);
|
|
105
|
+
violations.push({
|
|
106
|
+
rule: `${this.rule}.${this.toolId}`,
|
|
107
|
+
tool: this.toolId,
|
|
108
|
+
file: pm.lockFile,
|
|
109
|
+
message: `${advisory.module_name}: ${advisory.title}`,
|
|
110
|
+
code: advisory.severity,
|
|
111
|
+
severity,
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
return violations;
|
|
115
|
+
}
|
|
116
|
+
mapSeverity(auditSeverity) {
|
|
117
|
+
switch (auditSeverity) {
|
|
72
118
|
case "critical":
|
|
73
119
|
case "high":
|
|
74
120
|
return "error";
|
|
@@ -79,8 +125,7 @@ export class NpmAuditRunner extends BaseToolRunner {
|
|
|
79
125
|
return "warning";
|
|
80
126
|
}
|
|
81
127
|
}
|
|
82
|
-
|
|
83
|
-
// Try to get a descriptive title from the via field
|
|
128
|
+
getNpmVulnerabilityTitle(vuln) {
|
|
84
129
|
for (const v of vuln.via) {
|
|
85
130
|
if (typeof v === "object" && v.title) {
|
|
86
131
|
return v.title;
|
|
@@ -88,7 +133,7 @@ export class NpmAuditRunner extends BaseToolRunner {
|
|
|
88
133
|
}
|
|
89
134
|
return `${vuln.severity} severity vulnerability`;
|
|
90
135
|
}
|
|
91
|
-
|
|
136
|
+
getNpmFixInfo(vuln) {
|
|
92
137
|
if (vuln.fixAvailable === false) {
|
|
93
138
|
return " (no fix available)";
|
|
94
139
|
}
|
|
@@ -107,15 +152,16 @@ export class NpmAuditRunner extends BaseToolRunner {
|
|
|
107
152
|
};
|
|
108
153
|
}
|
|
109
154
|
/**
|
|
110
|
-
* Audit - check if
|
|
155
|
+
* Audit - check if a lock file exists (npm or pnpm)
|
|
111
156
|
*/
|
|
112
157
|
async audit(projectRoot) {
|
|
113
158
|
const startTime = Date.now();
|
|
114
|
-
|
|
159
|
+
const pm = this.detectPackageManager(projectRoot);
|
|
160
|
+
if (!pm) {
|
|
115
161
|
return this.fail([{
|
|
116
162
|
rule: `${this.rule}.${this.toolId}`,
|
|
117
163
|
tool: "audit",
|
|
118
|
-
message: "package-lock.json
|
|
164
|
+
message: "No lock file found (package-lock.json or pnpm-lock.yaml required)",
|
|
119
165
|
severity: "error",
|
|
120
166
|
}], Date.now() - startTime);
|
|
121
167
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npmaudit.js","sourceRoot":"","sources":["../../../src/code/tools/npmaudit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAG9B,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"npmaudit.js","sourceRoot":"","sources":["../../../src/code/tools/npmaudit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,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