Co-authored-by: alvinfei <alvinfei@tencent.com> Co-authored-by: Cursor <cursoragent@cursor.com>
23 lines
595 B
JavaScript
23 lines
595 B
JavaScript
import assert from "node:assert/strict";
|
|
import { readFile } from "node:fs/promises";
|
|
import test from "node:test";
|
|
|
|
test("self-contained verifier poisons system build/runtime tools", async () => {
|
|
const source = await readFile(
|
|
new URL("./verify-self-contained-runtime.mjs", import.meta.url),
|
|
"utf8",
|
|
);
|
|
for (const marker of [
|
|
'"python"',
|
|
'"python3"',
|
|
'"sqlite3"',
|
|
'"pnpm"',
|
|
'"uv"',
|
|
"PATH: `${poisonBin}:/usr/bin:/bin`",
|
|
'child.kill("SIGTERM")',
|
|
"no_system_python_sqlite_build_tools",
|
|
]) {
|
|
assert.ok(source.includes(marker), marker);
|
|
}
|
|
});
|