|
@@ -20,6 +20,7 @@ const suspiciousPathPatterns = [
|
|
|
/\/Users\/[^\s'"`]+(?:node_modules|oh-my-opencode-slim)[^\s'"`]*/,
|
|
/\/Users\/[^\s'"`]+(?:node_modules|oh-my-opencode-slim)[^\s'"`]*/,
|
|
|
/\/home\/[^\s'"`]+(?:node_modules|oh-my-opencode-slim)[^\s'"`]*/,
|
|
/\/home\/[^\s'"`]+(?:node_modules|oh-my-opencode-slim)[^\s'"`]*/,
|
|
|
];
|
|
];
|
|
|
|
|
+const suspiciousImportPatterns = [/from\s+["']vscode-jsonrpc\/node["']/];
|
|
|
|
|
|
|
|
const packagedRequiredFiles = [
|
|
const packagedRequiredFiles = [
|
|
|
'package.json',
|
|
'package.json',
|
|
@@ -101,6 +102,11 @@ function verifyDistHasNoLeakedPaths() {
|
|
|
if (!match) continue;
|
|
if (!match) continue;
|
|
|
leaks.push(`${path.relative(repoRoot, file)}: ${match[0]}`);
|
|
leaks.push(`${path.relative(repoRoot, file)}: ${match[0]}`);
|
|
|
}
|
|
}
|
|
|
|
|
+ for (const pattern of suspiciousImportPatterns) {
|
|
|
|
|
+ const match = content.match(pattern);
|
|
|
|
|
+ if (!match) continue;
|
|
|
|
|
+ leaks.push(`${path.relative(repoRoot, file)}: ${match[0]}`);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (leaks.length > 0) {
|
|
if (leaks.length > 0) {
|