mirror of
https://github.com/morluto/rea.git
synced 2026-11-14 10:43:30 +00:00
fix(cli): preserve caller paths in format inspections (#7855)
* fix(cli): preserve caller paths in format inspections * fix(cli): retain caller path on partial evidence * test(cli): preserve caller path in adapter parity checks * test(rust): account for retained caller path * fix(wasm): compare shared cli and mcp evidence
This commit is contained in:
1 parent
63f05d1cad
commit
419a211304
36 files changed
+453
-96
No files matched your search
@@ -32,7 +32,8 @@ import { inspectElfNotesInputSchema } from "../domain/native/elfNotes.js";
|
||||
import { inspectAppleIpsInputSchema } from "../domain/native/appleIps.js";
|
||||
import { inspectKernelModuleInputSchema } from "../domain/native/kernelModule.js";
|
||||
import { projectAnalysisError } from "../domain/analysisErrorProjection.js";
|
||||
import { finishAnalysisCommand } from "./finishAnalysisCommand.js";
|
||||
import { finishCliEvidenceCommand } from "./cliEvidenceCallerPath.js";
|
||||
import { withEvidenceCallerInputPath } from "../domain/evidence.js";
|
||||
import { localPathStringSchema } from "../domain/localPath.js";
|
||||
import { absoluteCallerPath } from "../filesystem/callerPath.js";
|
||||
import {
|
||||
@@ -63,7 +64,8 @@ export const registerBinaryDiagnosticsCommands = (
|
||||
logger,
|
||||
CLI_COMMANDS.inspectElfNotes,
|
||||
async () =>
|
||||
finishAnalysisCommand(
|
||||
finishCliEvidenceCommand(
|
||||
args.path,
|
||||
() =>
|
||||
elf.inspect(
|
||||
{
|
||||
@@ -103,7 +105,8 @@ export const registerBinaryDiagnosticsCommands = (
|
||||
logger,
|
||||
CLI_COMMANDS.inspectAppleIps,
|
||||
async () =>
|
||||
finishAnalysisCommand(
|
||||
finishCliEvidenceCommand(
|
||||
args.path,
|
||||
() =>
|
||||
ips.inspect(
|
||||
{
|
||||
@@ -144,7 +147,8 @@ export const registerBinaryDiagnosticsCommands = (
|
||||
logger,
|
||||
CLI_COMMANDS.inspectKernelModule,
|
||||
async () =>
|
||||
finishAnalysisCommand(
|
||||
finishCliEvidenceCommand(
|
||||
args.path,
|
||||
() =>
|
||||
kernelModule.inspect(
|
||||
{
|
||||
@@ -179,7 +183,8 @@ export const registerBinaryDiagnosticsCommands = (
|
||||
logger,
|
||||
CLI_COMMANDS.inspectPeLoadConfig,
|
||||
async () =>
|
||||
finishAnalysisCommand(
|
||||
finishCliEvidenceCommand(
|
||||
args.path,
|
||||
() =>
|
||||
elf.inspect(
|
||||
{
|
||||
@@ -216,7 +221,8 @@ export const registerBinaryDiagnosticsCommands = (
|
||||
run: ({ args, options }) =>
|
||||
withCommandCancellation((signal) =>
|
||||
logCliCommand(logger, CLI_COMMANDS.inspectByteEntropy, async () => {
|
||||
return await finishAnalysisCommand(
|
||||
return await finishCliEvidenceCommand(
|
||||
args.path,
|
||||
() =>
|
||||
entropy.inspect(
|
||||
{
|
||||
@@ -252,7 +258,8 @@ export const registerBinaryDiagnosticsCommands = (
|
||||
logger,
|
||||
CLI_COMMANDS.inspectPeCertificates,
|
||||
async () =>
|
||||
finishAnalysisCommand(
|
||||
finishCliEvidenceCommand(
|
||||
args.path,
|
||||
() =>
|
||||
pe.inspect(
|
||||
{
|
||||
@@ -286,7 +293,8 @@ export const registerBinaryDiagnosticsCommands = (
|
||||
logger,
|
||||
CLI_COMMANDS.inspectPeImports,
|
||||
async () =>
|
||||
finishAnalysisCommand(
|
||||
finishCliEvidenceCommand(
|
||||
args.path,
|
||||
() =>
|
||||
pe.inspect(
|
||||
{
|
||||
@@ -322,7 +330,8 @@ export const registerBinaryDiagnosticsCommands = (
|
||||
logger,
|
||||
CLI_COMMANDS.inspectPeResources,
|
||||
async () =>
|
||||
finishAnalysisCommand(
|
||||
finishCliEvidenceCommand(
|
||||
args.path,
|
||||
() =>
|
||||
pe.inspect(
|
||||
{
|
||||
@@ -368,6 +377,7 @@ export const registerBinaryDiagnosticsCommands = (
|
||||
CLI_COMMANDS.inspectDevicetree,
|
||||
async () =>
|
||||
deliverCliAnalysisEvidence({
|
||||
callerInputPath: args.path,
|
||||
run: () =>
|
||||
devicetree.inspect(
|
||||
{
|
||||
@@ -407,6 +417,7 @@ export const registerBinaryDiagnosticsCommands = (
|
||||
CLI_COMMANDS.inspectNativeExports,
|
||||
async () =>
|
||||
deliverCliAnalysisEvidence({
|
||||
callerInputPath: args.path,
|
||||
run: () =>
|
||||
exports.inspect(
|
||||
{
|
||||
@@ -450,7 +461,9 @@ export const registerBinaryDiagnosticsCommands = (
|
||||
},
|
||||
{ signal },
|
||||
);
|
||||
return result.ok ? result.value : projectAnalysisError(result.error);
|
||||
return result.ok
|
||||
? withEvidenceCallerInputPath(result.value, args.path)
|
||||
: projectAnalysisError(result.error);
|
||||
}),
|
||||
),
|
||||
});
|
||||
@@ -484,7 +497,9 @@ export const registerBinaryDiagnosticsCommands = (
|
||||
},
|
||||
{ signal },
|
||||
);
|
||||
return result.ok ? result.value : projectAnalysisError(result.error);
|
||||
return result.ok
|
||||
? withEvidenceCallerInputPath(result.value, args.path)
|
||||
: projectAnalysisError(result.error);
|
||||
}),
|
||||
),
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user