mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:45:54 +01:00
[PR #1899] check_no_game_data: inspect legacy V7 tar archives #1910
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1910
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1899
Author: @XeNS1
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:codex/check-no-game-data-v7-tar-20261125📝 Commits (1)
7dcca92fix(check-no-game-data): inspect legacy V7 tar archives📊 Changes
2 files changed (+73 additions, -2 deletions)
View changed files
📝
scripts/check_no_game_data.py(+9 -2)📝
tests/test_check_no_game_data.py(+64 -0)📄 Description
Claimed in the coordination issue as: CHECK-NO-GAME-DATA-V7-TAR
https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7166283601
Related: #1024 handles explicit-path validation in the same files; that separate behavior is unchanged here.
What and why
A valid V7 tar archive has no
ustarmarker. Saved under a harmless name such as.bin, it previously passedcheck_no_game_data.pywithout its members being inspected, even if a member started with a prohibited binary-format header.Recognize legacy archives by validating their first 512-byte header through
tarfile.TarInfo.frombuf. The existingustardetection still identifies damaged modern tar archives as unchecked. Member inspection continues through the existing depth, expanded-byte and member-count budgets.Add generated synthetic fixtures covering raw V7 tar, gzip/bzip2/xz compression, ZIP nesting, a clean first member followed by a synthetic DDS header, clean text-only archives, and non-archive controls. All binary fixture bytes are generated in temporary directories; no game files are included or needed.
Tested
Linux x86-64, Python 3.14.8, CPU only:
python3 -I tests/test_check_no_game_data.py: 15 tests passed.python3 -I tests/test_no_game_data_workflow.py: 3 tests passed.tests/test_text_write_line_endings.py: 3 tests passed.runtime/CMakeLists.txtandruntime/test/d3d12_title_va_test.cpp, so the Python sources and semantic fixtures are identical.compileallformake_game.py,tools,testsand the changed scanner;make_game.py --help; changed-file game-data scan;git diff --check: passed.test_runner_calls_all_tests.pyreports the uncalledtest_feature_scan.py::test_out_named_like_the_optional_spirv_index. The same failure was reproduced on a separate clean upstream worktree. Neither file is changed here.GPUs tested: n/a; CPU-only checks. No game installation was accessed.
AI-assisted: yes, OpenAI Codex.
Checklist
mainwithout conflicts.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.