feat(ghidra): make the startup deadline configurable (#974)
* feat(ghidra): make the startup deadline configurable Large binaries (an 8 MB PE with about 20,000 functions) need more than the fixed 330 s for import and full auto-analysis, so every first request timed out. REA_GHIDRA_STARTUP_TIMEOUT_MS overrides the deadline in milliseconds; absent, empty or invalid values keep the 330 s default. * docs(ghidra): document REA_GHIDRA_STARTUP_TIMEOUT_MS * fix(ghidra): parse startup deadlines through runtime configuration --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
This commit is contained in:
@@ -14,7 +14,7 @@ import {
|
||||
type ProviderProcessSnapshot,
|
||||
ProviderProcessSupervisor,
|
||||
} from "../process/ProviderProcess.js";
|
||||
import { GHIDRA_STARTUP_TIMEOUT_MS } from "./GhidraDefaults.js";
|
||||
import { DEFAULT_GHIDRA_STARTUP_TIMEOUT_MS } from "../config/ghidraStartupTimeout.js";
|
||||
import type {
|
||||
GhidraClientOptions,
|
||||
GhidraRequestOptions,
|
||||
@@ -124,7 +124,8 @@ export class GhidraClient {
|
||||
constructor(options: GhidraClientOptions) {
|
||||
this.#options = {
|
||||
...options,
|
||||
startupTimeoutMs: options.startupTimeoutMs ?? GHIDRA_STARTUP_TIMEOUT_MS,
|
||||
startupTimeoutMs:
|
||||
options.startupTimeoutMs ?? DEFAULT_GHIDRA_STARTUP_TIMEOUT_MS,
|
||||
platform: options.platform ?? process.platform,
|
||||
transport: options.transport ?? "unix-socket",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user