Repository navigation
fix: secure runtime paths and launcher setup - #745
Open
MohamedElGhandour wants to merge 1 commit into
Open
MohamedElGhandour wants to merge 1 commit into
MohamedElGhandour wants to merge 1 commit into
Conversation
MohamedElGhandour
marked this pull request as ready for review
October 28, 2026 11:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In plain words
MetalSharp could load replacement runtime code without checking who supplied it, and some FEX paths were inserted into shell commands. Steam API keys could also be saved with permissions that exposed them to another local account. These fixes close those paths and preserve existing game prefixes, saves, and login data.
Summary
Harden runtime setup, launcher dependency installation, and credential storage in the C backend. The normal in-app updater already checks the publisher signature; these changes address separate setup and repair paths.
Changes
Why this approach
Regular app packaging already requires all six runtime archives. Removing the network fallback keeps those resources covered by the app's signature without adding another checksum publication mechanism. The FEX build already carries its runtime and skips those downloads.
The standalone GOG helper removes the Git, virtualenv, and unpinned package-install steps. Its existing command-line interface matches MetalSharp's callers. Failed verification leaves the previous helper and user data intact.
Verification
make -C app/src-c testmake -C app/src-c VARIANT=fex BUILD_DIR="$PWD/app/src-c/build-fex" testcargo fmt --manifest-path app-gpui/Cargo.toml --checkcargo test --manifest-path app-gpui/Cargo.toml --locked --offlinepython3 tools/ci/verify-dmg-workflow.pygit diff --check; shell syntaxcodesign --verify --deep --stricton both built backend binariesBackend tests used isolated temporary homes. Regression cases cover crafted paths, invalid CDHashes, old-wrapper regeneration, missing or shadowed bundles, tampered helper downloads, initialized GOG upgrades, legacy credential permissions, and symlink target preservation.
Real-game launch smoke — 28 October 2026
Tested commit
753bb86with Deadlock (1422450), D3DMetal, regular/Rosetta, using the existing Steam library on the internal drive. Both the frontend and backend were compiled from the PR; unchanged icons and runtime resources were copied from the installed 1.0.0 app into a separate, locally ad-hoc-signed test app. Full deep/strict signature verification passed. The installed application bundle was not modified.deadlock.exestarted; backend reported appid 1422450 and the same game PID. D3DMetal was loaded.This was a launch/rendering smoke test, not a multiplayer match, input/audio qualification, performance benchmark, or FEX game test. Existing Steam authentication was reused; no new store login was performed.
PR Readiness (MANDATORY)
/Users/...paths introduced.Risk and remaining checks
A damaged installation now needs the full official app reinstalled instead of downloading replacement runtime archives. Future GOGDL upgrades must update the pinned asset and digest together. Reverting this commit restores the previous behavior.
FEX game launching, standard full-Xcode packaging, release DMG signing/notarization, and real store login remain untested. The separate local regular app was assembled and its full code signature verified for the launch test above. Wine's broad file access and compatibility-related browser sandbox flags need separate isolation/compatibility work; this PR does not claim to make untrusted Windows executables safe.
Created by Codex (GPT-6).