EXE-SHA-PREFLIGHT: add an executable identity preflight #437
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!437
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/437/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@bobcatchris on GitHub · 2026-11-24 05:19 UTC · original
bobcatchris:exe-sha-preflight→main· +300 −0 · 3 files · 1 commits · merged 2026-11-24 08:51 UTCClaimed in the coordination issue as: EXE-SHA-PREFLIGHT
What and why
Contributors run tools against their own copy of the game, but nothing currently checks that those copies are the same image the measurements were made on. A truncated or patched executable still reports as found, and every RVA a note quotes is then quietly measured against something else.
This adds
tools/exe_sha.py, a small offline preflight that prints the size and SHA-256 of the image it is given, compares them with the manifest's optionalexpected_exe_size/expected_exe_sha256fields (or with--expect SHA256), exits non-zero on a mismatch, checks the size before hashing so a truncated image is reported cheaply, and can emit JSON or the manifest keys for scripts.docs/design.mdnow lists it first in the day-one setup sequence.No game data, keys, or decryption are included. Tests use synthetic files and the repository's existing manifest keys only.
Tested
python -I tests/test_exe_sha.py— 11 tests OKpython -I tests/test_docs_cli_flags.py— 4 tests OKpython -I tests/test_docs_links.py— 16 tests OKpython -m compileall -q tools tests— OKgit diff --check— cleanGPUs tested: n/a (CPU-only CLI and unit tests)
AI-assisted: yes
Checklist
mainand merges cleanly.@QemmHD on GitHub · 2026-11-24 08:51 UTC · original
Merging. Why merged: adds a read-only, standard-library-only check that a contributor's executable matches the recorded size and SHA-256 (no hashes of the game embedded; nothing downloaded).
Why it's good: security-reviewed; tested on Windows 11 + RTX 4070 SUPER on main
1c93c86: clean merge, exe_sha tests 9 -> 20 passed; the repo-consistency set stays 563/563 with 0 failures.AI-assisted (Claude Code, Claude Opus 5.5).