feat(launcher): verify prebuilt runtime identity before launch #540
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/540"
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?
Imported from LooperSalty/AnyXboxX. Originally posted by mauroalvare on 2026-11-27T19:05:58Z.
Change
OPT-SEC-001.
--victory-exeaccepts a standalone prebuilt in the CLI and graphical launcher. SetANYXBOXX_VICTORY_MANIFEST_SHA256to opt in to checking the adjacent manifest against an independently trusted SHA-256 and checking the executable against that manifest. This detects changes to the selected executable even when its local manifest has been replaced. Schema 1 records the executable SHA-256 and size, full source commit, TomBox gitlink, target, profile, and translator version. Windows sharing guards keep the resolved executable and directories open through process creation. Warm and run recheck the file identity at the spawn boundary. The open directory handles block renames and moves while held. The CLI keeps them through the game process.Both launchers emit a
VICTORY_RUNTIME_IDENTITY=JSON record for a verified prebuilt. The graphical warm marker uses the manifest digest as its build identity. The CLI source-build path continues to select the executable from Cargo's artifact message. PR #315Updated to
ec3b7348after #545. The verified launcher keepsgame_command_asand the Series S arguments from #523. Tested commit5588a03fb0f5e5f896549b998caa45a03aca01f1.Verification
cargo test --locked --offline -p anyxboxx -p anyxboxx-launcherpassed on Windows x64. The CLI library passed 31 tests and the graphical launcher passed 221 tests with one ignored.tests/test_anyxboxx_run.py, including standalone warm and run and pinned Series S launch. The touched Python test file passed Ruff.Z:path with spaces. Both launch modes completed warm and run. The pinned path forwarded Series S and detected a changed executable before spawning it. Proton smoke testvictory-loader. Manifest testsc5d78244reported 1534 passed and 437 skipped.Oracle and test data
The prebuilt tests use inert bytes created in temporary directories and inspect planned commands. They cover a substituted manifest, an executable with altered bytes and unchanged length, malformed or ambiguous metadata, diagnostic profile selection, and attempts to write or rename the guarded file or its parent. The existing source-build tests exercise Cargo artifact selection with a helper compiled from test source.
AI assistance was used to implement and verify the change.
Imported from LooperSalty/AnyXboxX. Originally posted by LooperSalty on 2026-11-27T19:11:27Z.
Thanks. The check only covers
victory.exe(sha256 and size against<exe>.identity.json, itself pinned byANYXBOXX_VICTORY_MANIFEST_SHA256), so no game data is involved. Before merge:--victory-exe. It used to work with a bare exe, which is how Proton users run a cross-built VIctory. It now fails withMissingPinunless a sidecar and an out-of-band pin exist (steps.rs:57,identity.rs). Please explain the threat this protects against, and either make verification opt-in or add an explicit, loudly logged opt-out (e.g.--unverified). Then updatedocs/running-gta6.mdanddocs/fr/lancer-gta6.md, which still describe the old flow.locked_path.rsopens every ancestor directory withFILE_SHARE_READ | FILE_FLAG_BACKUP_SEMANTICSand rechecks beforespawn. Wine's sharing andZ:\paths are untested, and a failure would block the launch with an I/O error. Please report a run under Proton. Also note that holding every parent directory open blocks renaming or moving the folder while the game runs.docs/launcher.mdgets a new section, but its French copy underdocs/fr/is not updated (AGENTS.md: both together).identity.rslog_lineuses.expect(...)in production code; andidentity_testsiscfg(all(test, windows)), so the pure manifest parsing is not tested on Linux.Imported from LooperSalty/AnyXboxX. Originally posted by LooperSalty on 2026-11-27T19:43:44Z.
Thanks: verification is now opt-in (only when the pin is set), a bare
--victory-exeworks again, and the French docs are in. After #545 this conflicts with main incrates/anyxboxx/src/run/steps.rs(the--consolechange from #523 is in now). Please rebase, keepgame_command_asand the console arguments, and force-push. A Proton run with the pin set is still worth reporting, given the parent-directory handles.Imported from LooperSalty/AnyXboxX. Originally posted by mauroalvare on 2026-11-27T19:53:26Z.
Thanks, @LooperSalty. In
5588a03f,game_command_askeeps the Series S arguments from #523 and still holds the verified executable and directory handles through process creation. A standalone--victory-exeworks again, and settingANYXBOXX_VICTORY_MANIFEST_SHA256opts into verification. The English and French guides cover the trust model and how long the directory handles are held.I ran this commit under GE-Proton11-12 with an original test executable on a
Z:path that includes spaces. The standalone and pinned launches both completed warm and run. The pinned launch forwarded--console series-s, and changing the executable was rejected before launch. All 36 Windows CLI integration cases and the three isolated Linux manifest tests passed. Proton smoke test · Linux manifest testsImported from LooperSalty/AnyXboxX. Originally posted by LooperSalty on 2026-11-27T22:12:33Z.
#557 was just merged and this now conflicts in
crates/anyxboxx-launcher/src/app.rs,session.rsandui_pages.rs. Please rebase on main, keep the new DLSS / Frame Generation launch options alongside the identity check, and force-push; it is otherwise ready (#543 goes in after it).View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.