worker: pin Jython-era Ghidra (11.2.1) for headless .py post-script
Ghidra 11.4+/12.x dropped the bundled Jython, so the .py extractor fails headless with "Ghidra was not started with PyGhidra. Python is not available" — analysis succeeds but the post-script never runs, so no snapshot is produced. Default GHIDRA_URL now points at 11.2.1 (Jython); README documents the constraint and the PyGhidra path for staying on 12.x. Keeps the local Dockerfile fixes (pip upgrade, non-editable install). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
12
README.md
12
README.md
@@ -63,11 +63,19 @@ Ghidra headless + `extract_engine_surface.py` → snapshot → import do Postgre
|
||||
Worker (`docker/worker.Dockerfile`, `eclipse-temurin:21-jdk`) pobiera Ghidrę i ustawia
|
||||
`GHIDRA_HOME=/opt/ghidra`. Wersja jest przypięta w `ARG GHIDRA_URL`. Jeśli build padnie na pobieraniu,
|
||||
nadpisz URL realnym wydaniem z [releases NSA](https://github.com/NationalSecurityAgency/ghidra/releases)
|
||||
(nazwa pliku: `ghidra_<wer>_PUBLIC_<data>.zip`):
|
||||
(nazwa pliku: `ghidra_<wer>_PUBLIC_<data>.zip`).
|
||||
|
||||
> **Musi to być Ghidra ≤ 11.3.x.** Ekstraktor to skrypt **Pythona (`.py`)**, który Ghidra w trybie
|
||||
> headless uruchamia przez wbudowanego **Jythona**. Ghidra **11.4+ / 12.x usunęły Jythona** — tam
|
||||
> `.py` headless wymaga **PyGhidry** (CPython), której ten obraz nie inicjalizuje, i dostaniesz
|
||||
> `Ghidra was not started with PyGhidra. Python is not available` (analiza przejdzie, ale post-skrypt
|
||||
> nie wyemituje snapshotu). Domyślny `GHIDRA_URL` celuje w 11.2.1 (z Jythonem). Chcesz zostać na 12.x?
|
||||
> Trzeba doinstalować `pyghidra` i odpalać headless przez PyGhidrę — sam skrypt jest CPython-kompatybilny,
|
||||
> więc zadziała, gdy interpreter wstanie (patrz dokumentacja PyGhidra w danej wersji Ghidry).
|
||||
|
||||
```bash
|
||||
docker compose build worker \
|
||||
--build-arg GHIDRA_URL=https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_11.3.2_build/ghidra_11.3.2_PUBLIC_20250415.zip
|
||||
--build-arg GHIDRA_URL=https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_11.2.1_build/ghidra_11.2.1_PUBLIC_20241105.zip
|
||||
docker compose up
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user