[eric] ci: fix mcp-bundles node path and whitelist wheel sboms in host-leakage

This commit is contained in:
ciregenz
2026-06-01 15:01:13 -07:00
parent e1101d4c2c
commit 04faff315a
2 changed files with 6 additions and 2 deletions
+1
View File
@@ -67,6 +67,7 @@ function shouldScan(file) {
const DEFAULT_ALLOW = [
/\.dist-info[\\/]direct_url\.json$/, // PEP 610 install provenance, not read at runtime
/\.dist-info[\\/]RECORD$/, // wheel file list, lists relative paths only
/\.dist-info[\\/]sboms[\\/]/, // CycloneDX SBOMs bake the wheel PUBLISHER's CI path (e.g. /Users/runner/work), never ours
];
function walk(dir, out = []) {
+5 -2
View File
@@ -22,14 +22,17 @@ function bundlesRoot(appExe) {
return path.join(path.dirname(appExe), 'resources', 'backend', 'mcp-bundles');
}
// POSIX ships node under bin/ (node/<arch>/bin/node); Windows drops it (node.exe
// straight under arch). Must mirror electron/main.js getBundledNodePath() or this
// gate cant find the binary it bundled and false-fails a perfectly good build.
function bundledNode(appExe) {
if (process.platform === 'win32') return path.join(path.dirname(appExe), 'resources', 'node', 'x64', 'node.exe');
if (process.platform === 'darwin') {
const i = appExe.indexOf('.app');
const appRoot = i === -1 ? appExe : appExe.slice(0, i + 4);
return path.join(appRoot, 'Contents', 'Resources', 'node', process.arch, 'node');
return path.join(appRoot, 'Contents', 'Resources', 'node', process.arch, 'bin', 'node');
}
return path.join(path.dirname(appExe), 'resources', 'node', process.arch, 'node');
return path.join(path.dirname(appExe), 'resources', 'node', process.arch, 'bin', 'node');
}
// Locate the JS entry for each bundle. Single-file bundles ship as <name>.js;