feat(electron): add autonomous Electron runtime analysis (#464)
* feat: add autonomous Electron runtime analysis * feat(electron): add lifecycle and boundary telemetry * feat(electron): capture runtime boundary evidence * fix(electron): package boundary hook helper * feat(electron): report active capture coverage * fix(electron): account for bring-your-own runtime * feat(electron): expand agent-owned runtime scenarios * fix(ghidra): keep fixture credentials out of argv * perf(test): serialize local test and docs workloads * fix(electron): harden active runtime capture * fix(inspector): require exact runtime target authorization * fix(docs): make managed manifest host independent * fix(ci): make generated catalog portable * fix: unblock autonomous command and electron flows * fix(electron): close popup and detached helper gaps
This commit is contained in:
@@ -93,6 +93,43 @@ describe("passive V8 Inspector provider", () => {
|
||||
}
|
||||
});
|
||||
|
||||
test("excludes an Electron main target that reports only bare file://", async () => {
|
||||
const fixture = await runtimeFixture();
|
||||
const fake = await startFakeV8Inspector({
|
||||
targetUrl: "file://",
|
||||
scriptUrls: [pathToFileURL(fixture.entry).href],
|
||||
});
|
||||
try {
|
||||
const provider = new V8InspectorProvider();
|
||||
const listed = await provider.listTargets({
|
||||
inspector_endpoint: fake.endpoint,
|
||||
allowed_file_roots: [fixture.root],
|
||||
allowed_origins: [],
|
||||
approved: true,
|
||||
offset: 0,
|
||||
limit: 100,
|
||||
});
|
||||
expect(listed.ok).toBe(true);
|
||||
if (!listed.ok) return;
|
||||
expect(listed.value.targets.total).toBe(0);
|
||||
expect(listed.value.targets.items).toEqual([]);
|
||||
|
||||
const observed = await provider.observe(
|
||||
observeInput(
|
||||
fake.endpoint,
|
||||
fake.targetId,
|
||||
fixture.root,
|
||||
"electron-main",
|
||||
),
|
||||
);
|
||||
expect(observed.ok).toBe(false);
|
||||
if (observed.ok) return;
|
||||
expect(observed.error.message).toMatch(/outside_file_roots|target/u);
|
||||
} finally {
|
||||
await fake.close();
|
||||
}
|
||||
});
|
||||
|
||||
test.each([
|
||||
["node", "node"],
|
||||
["electron-main", "node"],
|
||||
|
||||
Reference in New Issue
Block a user