feat(native): add investigation features (#486)
* feat(native): add UI and dispatch investigation workflows * feat(ghidra): support macOS host validation * docs: update native investigation capabilities * feat(artifacts): decode compiled Interface Builder archives * feat(ghidra): expose bounded p-code value flow * test(ghidra): split host and cross-format verification * fix(verify): follow complete result contracts * refactor: remove unused authorization and schema helpers * refactor: remove unused evidence result alias * fix(ghidra): report jump-table evidence precisely * fix(verify): align browser scenario fixture schema * fix(setup): compare parsed client config structurally * test(ghidra): verify AArch64 jump-table mappings * fix(ghidra): recover AArch64 byte jump tables * test(artifacts): verify compiled interface builder archives * feat(native): trace UI actions through handlers * fix(tests): update native trace and shutdown fixtures * fix(verification): diagnose browser scenario failures * fix(browser): wrap scenario snapshots in capture state * fix(native): bind and bound investigation workflows * fix(artifacts): preserve bounded interface builder evidence * fix(ghidra): enforce admitted hosts and preflight tools * fix(native): preserve trace cancellation and bounds * test(application): expect bound analysis target evidence * fix(native): preserve investigation bounds and cancellation * fix(application): preserve bundle and unresolved trace evidence * style(test): format artifact subject fixture
This commit is contained in:
@@ -59,7 +59,7 @@ const verifyManagedMembers = async ({ cli, managedPath, environment }) => {
|
||||
);
|
||||
if (
|
||||
managedMembers.operation !== "inspect_managed_members" ||
|
||||
managedMembers.normalized_result?.methods?.total !== 1
|
||||
managedMembers.normalized_result?.methods?.length !== 1
|
||||
)
|
||||
throw new Error("packaged managed member CLI failed");
|
||||
return managedMembers;
|
||||
@@ -183,9 +183,9 @@ const verifyManagedBoundaries = async ({ cli, managedPath, environment }) => {
|
||||
);
|
||||
if (
|
||||
managedBoundaries.operation !== "inspect_managed_native_boundaries" ||
|
||||
managedBoundaries.normalized_result?.pinvoke_imports?.total !== 1 ||
|
||||
managedBoundaries.normalized_result?.pinvoke_imports?.items?.[0]
|
||||
?.verification !== "managed-declaration-only"
|
||||
managedBoundaries.normalized_result?.pinvoke_imports?.length !== 1 ||
|
||||
managedBoundaries.normalized_result?.pinvoke_imports?.[0]?.verification !==
|
||||
"managed-declaration-only"
|
||||
)
|
||||
throw new Error("packaged managed native-boundary CLI failed");
|
||||
return managedBoundaries;
|
||||
@@ -199,16 +199,15 @@ const verifyManagedApplicationGraph = async ({
|
||||
environment,
|
||||
}) => {
|
||||
const managedApplicationGraphInput = {
|
||||
managed_artifact: managedArtifact,
|
||||
managed_members: managedMembers,
|
||||
managed_native_boundaries: managedBoundaries,
|
||||
limits: {
|
||||
max_types: 100,
|
||||
max_methods: 100,
|
||||
max_fields: 100,
|
||||
max_pinvoke_imports: 100,
|
||||
max_native_implementations: 100,
|
||||
},
|
||||
managed_artifact: managedEvidence(
|
||||
managedArtifact,
|
||||
"inspect_managed_artifact",
|
||||
),
|
||||
managed_members: managedEvidence(managedMembers, "inspect_managed_members"),
|
||||
managed_native_boundaries: managedEvidence(
|
||||
managedBoundaries,
|
||||
"inspect_managed_native_boundaries",
|
||||
),
|
||||
};
|
||||
const managedApplicationGraph = json(
|
||||
await run(
|
||||
@@ -232,7 +231,33 @@ const verifyManagedApplicationGraph = async ({
|
||||
({ kind }) => kind === "managed-pinvoke-import",
|
||||
)
|
||||
)
|
||||
throw new Error("packaged managed application-graph CLI failed");
|
||||
throw new Error(
|
||||
`packaged managed application-graph CLI failed: ${JSON.stringify(managedApplicationGraph).slice(0, 3000)}`,
|
||||
);
|
||||
};
|
||||
|
||||
const managedEvidence = (output, operation) => {
|
||||
const result = output.normalized_result;
|
||||
return createEvidence(
|
||||
{
|
||||
path: result.artifact.path,
|
||||
sha256: result.artifact.sha256,
|
||||
format: "pe",
|
||||
},
|
||||
{
|
||||
id: "rea-dotnet-static",
|
||||
name: "REA managed static analysis provider",
|
||||
version: "1",
|
||||
},
|
||||
{
|
||||
operation,
|
||||
parameters: {},
|
||||
result,
|
||||
rawResult: null,
|
||||
limitations: result.limitations ?? [],
|
||||
locations: [],
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
const verifyManagedNativeVerification = async ({
|
||||
@@ -241,7 +266,10 @@ const verifyManagedNativeVerification = async ({
|
||||
environment,
|
||||
}) => {
|
||||
const managedNativeVerificationInput = {
|
||||
managed_boundaries: managedBoundaries,
|
||||
managed_boundaries: managedEvidence(
|
||||
managedBoundaries,
|
||||
"inspect_managed_native_boundaries",
|
||||
),
|
||||
native_observations: [
|
||||
createEvidence(
|
||||
{
|
||||
@@ -265,10 +293,6 @@ const verifyManagedNativeVerification = async ({
|
||||
},
|
||||
),
|
||||
],
|
||||
limits: {
|
||||
max_native_observations: 20,
|
||||
max_candidates_per_import: 25,
|
||||
},
|
||||
};
|
||||
const managedNativeVerification = json(
|
||||
await run(
|
||||
|
||||
Reference in New Issue
Block a user