Headless Ghidra Intake — P0
P0 prepares a target for the rest of the workflow. It is responsible for turning an input binary or archive path into a valid ghidra-agent-cli workspace target and recording the initial analysis scope.
Required ghidra-agent-cli Commands
ghidra-agent-cli workspace initghidra-agent-cli ghidra discoverghidra-agent-cli inspect binaryghidra-agent-cli scope showghidra-agent-cli scope setghidra-agent-cli scope add-entryghidra-agent-cli scope remove-entryghidra-agent-cli gate check --phase P0
Archive normalization and any target-specific bootstrap scripts may still run as backend details until the CLI exposes them directly.
Inputs
- User-provided binary or archive path
- Workspace root
- Local environment needed for Ghidra discovery
Outputs
targets/<target-id>/ghidra-projects/artifacts/<target-id>/pipeline-state.yamlartifacts/<target-id>/scope.yaml- Optional phase-owned intake records under
artifacts/<target-id>/intake/
Exit Expectations
- Target workspace exists and is addressable through
--target <id>. pipeline-state.yamlrecords the selected binary path.scope.yamlrecords the selected functions, addresses, symbols, or explicit whole-target scope.- Ghidra discovery and binary inspection have been run and reviewed.
Constraints
- Do not run actual Ghidra analysis in this phase.
- Do not write baseline, evidence, decompilation, or verification outputs.
- Do not bypass
ghidra-agent-cli workspace init,ghidra discover, orinspect binaryfor supported steps. - Do not create or run a new Ghidra script if the CLI lacks a capability; pause and ask the user first.
Next Step
- P0 gate passes →
headless-ghidra-baseline