Skip to content

Import headers from a .gzf without SARIF - #411

Merged
gynt merged 1 commit into
mainfrom
gzf-import
Nov 14, 2026
Merged

gynt merged 1 commit into
mainfrom
gzf-import

Conversation

@gynt

@gynt gynt commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

reimport-ghidra.ps1 -Gzf "Stronghold Crusader.exe.gzf" generates the headers straight from a Ghidra .gzf, with no SARIF export. It takes about half a minute instead of about ten, and the headers are the same.

& .\tools\import\reimport-ghidra.ps1 -OverwriteAll $true -Gzf "Stronghold Crusader.exe.gzf"

Changes

  • ghidra-importer.py --gzf reads the program with skink's Project.from_gzf, which uses pyghidra; gzftosarif.py already depends on it. GHIDRA_INSTALL_DIR must be set. Without --gzf, the SARIF route works as before.
  • reimport-ghidra.ps1 -Gzf passes it through and skips the SARIF generation.
  • Duplicates from find_all_by_location are removed with skink's unique(). It gives the same result as the obj not in objs loop without comparing every pair, which took about 25 s.
  • tools/import/README.md documents the gzf route.

Depends on gynt/ghidra-skink#10. requirements.txt installs skink from main, so that PR has to be merged first; until then the importer can't find Project.from_gzf or unique().

Verification: both routes give byte-identical headers (1932 files) and the same warnings as the current importer. skink ghidra verify reports all 143,367 records identical between the gzf and the SARIF export.

🤖 Generated with Claude Code

ghidra-importer.py --gzf (reimport-ghidra.ps1 -Gzf) reads the program
straight from the gzf with skink's Project.from_gzf, which needs pyghidra.
The headers are the same as from the SARIF route, in about half a minute
instead of about ten.

Duplicates from find_all_by_location are removed with skink's unique(),
which gives the same result as the `obj not in objs` loop without
comparing every pair.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XmXCmZDK7Sy2VkmmyZnN39
@gynt
gynt merged commit c785e2f into main Nov 14, 2026
5 checks passed
@gynt
gynt deleted the gzf-import branch November 14, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant