feat(native): add inspection primitives, dispatch traces and approved UI observation (#500)
* fix(hopper): normalize string-backed addresses and update verification * feat(native): add inspection primitives, dispatch traces and approved UI observation * test: prioritize real artifact E2E and captured golden regressions * fix(process): queue observed output before reactive rendering actions * test: prune redundant cases and strengthen boundary assertions * fix(cli): route native value tracing through shared workflows * test: replace synthetic success with real workflows and captured data * fix(catalog): separate portable metadata from native host availability
This commit is contained in:
@@ -10,28 +10,18 @@ import { analyzeJavaScriptApplicationInputSchema } from "../../../src/domain/jav
|
||||
import { writeElectronBoundaryFixture } from "../../fixtures/electronBoundaryApplication.js";
|
||||
|
||||
describe("static Electron application analysis", () => {
|
||||
it("accepts an absolute caller path without caller-selected analysis bounds", () => {
|
||||
it("rejects relative paths and caller-selected analysis bounds", () => {
|
||||
expect(
|
||||
analyzeJavaScriptApplicationInputSchema.safeParse({
|
||||
input_path: "relative/app.asar",
|
||||
}).success,
|
||||
).toBe(false);
|
||||
expect(
|
||||
analyzeJavaScriptApplicationInputSchema.safeParse({
|
||||
input_path: "/tmp/app.asar",
|
||||
}).success,
|
||||
).toBe(true);
|
||||
expect(
|
||||
analyzeJavaScriptApplicationInputSchema.safeParse({
|
||||
input_path: "/tmp/app.asar",
|
||||
limits: { max_findings: 200_000 },
|
||||
}).success,
|
||||
).toBe(false);
|
||||
expect(
|
||||
analyzeJavaScriptApplicationInputSchema.parse({
|
||||
input_path: "/tmp/app.asar",
|
||||
}),
|
||||
).toEqual({ input_path: "/tmp/app.asar", format: "auto" });
|
||||
});
|
||||
|
||||
it("maps windows, preload, contextBridge, IPC, validations, utility, and native boundaries without execution", async () => {
|
||||
|
||||
@@ -26,15 +26,6 @@ it("reconstructs package, Electron roles, Webpack/Rspack modules, and cross-laye
|
||||
|
||||
expect(Reflect.get(globalThis, "__rea_bundle_executed")).toBeUndefined();
|
||||
expect(result.input_path).toBe(root);
|
||||
const longPath = `/${"deep/".repeat(4_000)}application`;
|
||||
const { electron_summary: summary, ...analysisResult } = result;
|
||||
expect(
|
||||
javascriptApplicationAnalysisResultSchema.parse({
|
||||
...analysisResult,
|
||||
summary,
|
||||
input_path: longPath,
|
||||
}).input_path,
|
||||
).toBe(longPath);
|
||||
expect(result.statistics).toMatchObject({
|
||||
modules: 4,
|
||||
parse_failures: 0,
|
||||
@@ -127,7 +118,6 @@ it("produces deterministic ASAR graphs with unpacked native linkage and complete
|
||||
|
||||
expect(first.graph).toEqual(second.graph);
|
||||
expect(first.inventory_graph_sha256).toBe(second.inventory_graph_sha256);
|
||||
expect(first.graph.graph_id).toBe(second.graph.graph_id);
|
||||
expect(first.graph.nodes).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
|
||||
Reference in New Issue
Block a user