fix(cli): remove ignored result limits
This commit is contained in:
@@ -32,7 +32,7 @@ const endpointTargetSchema = z.object({
|
||||
attached: z.boolean().default(false),
|
||||
webSocketDebuggerUrl: z.string().min(1).max(2_048).optional(),
|
||||
});
|
||||
const endpointTargetsSchema = z.array(endpointTargetSchema).max(1_000);
|
||||
const endpointTargetsSchema = z.array(endpointTargetSchema);
|
||||
|
||||
/** Validated direct CDP WebSocket bound to one discovered page target. */
|
||||
interface CdpPageWebSocketEndpoint {
|
||||
|
||||
@@ -30,7 +30,7 @@ const targetSchema = z
|
||||
webSocketDebuggerUrl: z.string().min(1).max(2_048),
|
||||
})
|
||||
.passthrough();
|
||||
const targetsSchema = z.array(targetSchema).max(1_000);
|
||||
const targetsSchema = z.array(targetSchema);
|
||||
|
||||
export interface V8InspectorTarget {
|
||||
readonly id: string;
|
||||
|
||||
@@ -250,26 +250,12 @@ const registerInstructionsCommand = (
|
||||
logger: Logger,
|
||||
): void => {
|
||||
cli.command(CLI_COMMANDS.instructions, {
|
||||
description: "Read one bounded raw-instruction window without decompiling",
|
||||
description: "Read every raw instruction without decompiling",
|
||||
args: z.object({
|
||||
path: z.string().describe("App or program path"),
|
||||
address: z.string().describe("Procedure name or address"),
|
||||
}),
|
||||
options: z.object({
|
||||
offset: z
|
||||
.number()
|
||||
.int()
|
||||
.min(0)
|
||||
.max(100_000)
|
||||
.default(0)
|
||||
.describe("Zero-based instruction offset"),
|
||||
limit: z
|
||||
.number()
|
||||
.int()
|
||||
.min(1)
|
||||
.max(500)
|
||||
.default(64)
|
||||
.describe("Maximum raw instructions to return"),
|
||||
snapshot: z
|
||||
.string()
|
||||
.min(1)
|
||||
@@ -284,8 +270,6 @@ const registerInstructionsCommand = (
|
||||
"read_function_instructions",
|
||||
{
|
||||
procedure: args.address,
|
||||
offset: options.offset,
|
||||
limit: options.limit,
|
||||
},
|
||||
directAnalysisOptions(logger, options.snapshot, options.provider),
|
||||
),
|
||||
@@ -295,7 +279,7 @@ const registerInstructionsCommand = (
|
||||
|
||||
const registerSearchCommand = (cli: CliInstance, logger: Logger): void => {
|
||||
cli.command(CLI_COMMANDS.search, {
|
||||
description: "Search analyzed strings or procedure names",
|
||||
description: "Search every analyzed string or procedure name",
|
||||
args: z.object({
|
||||
path: z.string().describe("App or program path"),
|
||||
pattern: z.string().min(1).describe("Literal text or regex pattern"),
|
||||
@@ -313,19 +297,6 @@ const registerSearchCommand = (cli: CliInstance, logger: Logger): void => {
|
||||
.boolean()
|
||||
.default(false)
|
||||
.describe("Match the pattern with exact letter case"),
|
||||
offset: z
|
||||
.number()
|
||||
.int()
|
||||
.min(0)
|
||||
.default(0)
|
||||
.describe("Zero-based matching-item offset"),
|
||||
limit: z
|
||||
.number()
|
||||
.int()
|
||||
.min(1)
|
||||
.max(100)
|
||||
.default(100)
|
||||
.describe("Maximum matching items to return"),
|
||||
snapshot: z
|
||||
.string()
|
||||
.min(1)
|
||||
@@ -343,8 +314,6 @@ const registerSearchCommand = (cli: CliInstance, logger: Logger): void => {
|
||||
pattern: args.pattern,
|
||||
mode: options.mode,
|
||||
case_sensitive: options.caseSensitive,
|
||||
offset: options.offset,
|
||||
limit: options.limit,
|
||||
},
|
||||
directAnalysisOptions(logger, options.snapshot, options.provider),
|
||||
),
|
||||
|
||||
@@ -85,13 +85,12 @@ const registerNativeCommands = (cli: CliInstance, logger: Logger): void => {
|
||||
),
|
||||
});
|
||||
cli.command(CLI_COMMANDS.demangleSwift, {
|
||||
description: "Demangle a bounded Swift symbol batch without Hopper",
|
||||
description: "Demangle Swift symbols without Hopper",
|
||||
args: z.object({
|
||||
path: z.string().describe("Artifact path used for evidence identity"),
|
||||
symbols: z
|
||||
.array(z.string().min(1))
|
||||
.min(1)
|
||||
.max(500)
|
||||
.describe("Swift mangled symbols to demangle"),
|
||||
}),
|
||||
run: ({ args }) =>
|
||||
|
||||
@@ -308,7 +308,7 @@ describe("reconstruction verification", () => {
|
||||
createEvidenceBundle([left, comparison, right]),
|
||||
);
|
||||
expect(result.status).toBe("unknown");
|
||||
expect(result.recommended_probes[0]?.operation).toBe("inventory_artifact");
|
||||
expect(result.recommended_probes[0]?.operation).toBe("inspect_artifact");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ describe("compiled CLI output boundary", () => {
|
||||
await writeFile(join(`${archive}.unpacked`, "main.js"), "changed();\n");
|
||||
|
||||
const result = await cli.run({
|
||||
arguments: ["--json", "inventory-artifact", archive],
|
||||
arguments: ["--json", "inspect-artifact", archive],
|
||||
});
|
||||
expect(result.exitCode).toBe(1);
|
||||
const output = JSON.stringify(result.json);
|
||||
|
||||
@@ -36,7 +36,6 @@ type FixtureMode =
|
||||
| "wrong_identity"
|
||||
| "malformed"
|
||||
| "contradictory"
|
||||
| "oversized_whitespace"
|
||||
| "future_id"
|
||||
| "analysis_timeout"
|
||||
| "remote_error"
|
||||
@@ -208,7 +207,6 @@ describe("GhidraClient", () => {
|
||||
["wrong_identity", "protocol"],
|
||||
["malformed", "protocol"],
|
||||
["contradictory", "protocol"],
|
||||
["oversized_whitespace", "protocol"],
|
||||
["future_id", "protocol"],
|
||||
["analysis_timeout", "analysis_timeout"],
|
||||
["exit", "process"],
|
||||
|
||||
Vendored
-4
@@ -143,10 +143,6 @@ const handlePing = (socket, request, state) => {
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (state.mode === "oversized_whitespace") {
|
||||
socket.write(`${" ".repeat(1024 * 1024 + 1)}\n`);
|
||||
return;
|
||||
}
|
||||
if (state.mode === "future_id") {
|
||||
socket.write(
|
||||
`${JSON.stringify({ id: request.id + 10, ok: true, result: null })}\n`,
|
||||
|
||||
Reference in New Issue
Block a user