feat(electron): map static process and IPC boundaries

This commit is contained in:
N0zoM1z0
2026-07-16 07:56:13 +09:00
committed by N0zoM1z0
parent 3988a866f1
commit 3fa2304bc7
279 changed files with 7481 additions and 775 deletions
+33
View File
@@ -11,6 +11,7 @@ import {
startFakeCdpBrowser,
type FakeCdpBrowser,
} from "./fixtures/fakeCdpBrowser.js";
import { writeElectronBoundaryFixture } from "./fixtures/electronBoundaryApplication.js";
const execute = promisify(execFile);
const INTEGRATION_TEST_TIMEOUT_MS = 20_000;
@@ -82,6 +83,38 @@ describe("Electron CLI parity", () => {
},
INTEGRATION_TEST_TIMEOUT_MS,
);
it(
"returns the static JavaScript application Evidence contract",
async () => {
const root = await mkdtemp(join(tmpdir(), "rea-electron-static-cli-"));
temporary.push(root);
await writeElectronBoundaryFixture(root);
const environment = {
...process.env,
REA_INVESTIGATION_INPUT_ROOTS_JSON: JSON.stringify([root]),
};
const analyzed = await runCli(
["analyze-javascript-application", root, "--approved", "--json"],
environment,
);
expect(analyzed).toMatchObject({
operation: "analyze_javascript_application",
provider: { id: "rea-javascript-application" },
normalized_result: {
input_path: root,
summary: {
browser_windows: 3,
context_bridge_apis: 2,
ipc: { paired_renderer_transmissions: 4 },
},
},
});
},
INTEGRATION_TEST_TIMEOUT_MS,
);
});
const runCli = async (