xcl run: the title no longer inherits the PC's environment, so dumps carry no secrets (#702) #740
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!740
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-740"
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?
@dadnotdaddy on GitHub · 2026-11-24 04:21 UTC · original
dadnotdaddy:fix-702→main· +68 −0 · 2 files · 2 commits · openFixes #702: the title runs in xcl.exe's process and inherited the PC's whole environment, so its crash dumps carried any tokens or keys set there. Before the entry point, XCL now keeps only the standard Windows and user-profile variables plus
XCL_*and removes the rest.XCL_KEEP_ENV=1turns it off.What is in it
crates/xcl/src/host.rs:scrub_title_env()before the title's entry point (case-insensitive keep-list:PATH,APPDATA,LOCALAPPDATA,USERPROFILE,SystemRoot,TEMP,ProgramFiles*,CommonProgramFiles*and similar;XCL_*); logs how many were removed; two unit tests.README.md: a note on the scrub andXCL_KEEP_ENV=1.Tested
cargo test --workspace -- --test-threads=4: 662 passed, 0 failed, 21 ignored (aftercargo build --workspace).USERPROFILE,Path,ProgramFiles(x86)…), token-style names removed (GITHUB_TOKEN,AWS_SECRET_ACCESS_KEY…), a synthetic secret gone from the process environment.gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64).Regression run
scripts/smoke.ps1on. A smoke run from a tester would be appreciated, mainly to confirm no title needs a removed variable.Not tested
AI use
github-bot referenced this pull request2026-11-26 04:59:09 +00:00
@eizispark on GitHub · 2026-11-24 04:33 UTC · original
Hardware check of
5579aaca66256de17907590f66b75faed6e18a25(verified clean merge withmain64b3f35): pass.Tested
rustc 1.100.0 (0ef1bc386 2026-11-09), release + test profilecargo test --workspace -- --test-threads=4:703 passed, 0 failed, 41 ignored(GPU tests skipped on this adapter:none)host::tests(2 unit tests:title_env_keeps_only_system_and_xcl_variables,remove_env_except_strips_the_process_block): passed; the 60 s retail smoke run below ran cleanly with the scrubbed environment (no title or AMD D3D12 driver issue from removed variables)Regression run
main(f4ce27c):PR (
5579aac):Not tested
AI use
scripts/smoke.ps1harness on this machine and formatted this report.@mastrr9 on GitHub · 2026-11-24 04:45 UTC · original
Code audit + NVIDIA RTX 5080 test run on
5579aaca66256de17907590f66b75faed6e18a25:Review
Good security fix for #702 — scrubbing the Win32 PEB environment block before
run_mainkeeps custom tokens/keys out of crash minidumps. Two notes worth considering:title_env_keepscurrently stripsVKD3D_*,DXVK_*,WINE*,PROTON_*,MESA_*,RADV_*,VK_*,AMD_*,__NV_*,__GL_*,DISPLAY, andWAYLAND_DISPLAY. Any lazily loaded graphics/Wine library initialized afterrun_main(or child helper) loses those settings unlessXCL_KEEP_ENV=1is set; allowing those graphics/Wine prefixes (none of which carry secrets) would avoid breaking Linux/Wine or driver overrides.host.rs:154):KEEPstill retainsUSERNAME,USERDOMAIN,COMPUTERNAME, andUSERPROFILE(needed for profile paths), so the comment might say it strips custom vars/credentials rather than user names and profile paths.Tested
rustc 1.100.0(MSVC), debug build.cargo build --workspace && cargo test --workspace -- --test-threads=4: 703 passed, 0 failed, 41 ignored.host::tests::title_env_keeps_only_system_and_xcl_variablesandhost::tests::remove_env_except_strips_the_process_block: both passed.SKIPPEDGPU tests (2, wave32-only adapter):gpu_geometry_wave32_prefix_count_over_a_mask: no wave64,gpu_wave32_program_in_wave64_hardware: no wave64.Not tested
scripts/smoke.ps1run (test suite only); AMD / Intel / Wine.AI use: code review and test run orchestrated with Antigravity (Gemini 4 Neon) on the hardware listed above.
@throny on GitHub · 2026-11-24 06:26 UTC · original
Retail regression run for
5579aaca66256de17907590f66b75faed6e18a25(this PR's head) on NVIDIA, as asked for in #42. Uneditedscripts/smoke.ps1output; themainblock is this PR's merge basef4ce27c, so the two builds differ only by this PR.Tested
stable-x86_64-pc-windows-msvc; release builds (cargo build --release -p xcl), no uncommitted changes.scripts/smoke.ps1 -Game <folder> -Seconds 60, a retail title, warm shader cache. Each build ran twice in a row; the blocks are the second runs. The first runs:f4ce27c1630 frames, this PR 1639 frames, both exit 0x0, 0 device removals, 0 crashes.environment: 60 PC variables removed before the title starts. The title starts and reaches its menus without them on this NVIDIA driver.Regression run
main (
f4ce27c):PR (
5579aac):Not tested
XCL_KEEP_ENV=1.AI use
@upipibi on GitHub · 2026-11-24 14:07 UTC · original
This and #730 (opened 7 minutes earlier) both fix #702. They differ in what reaches the title:
USERNAME,USERPROFILE,HOMEDRIVE/HOMEPATH,USERDOMAIN,COMPUTERNAME,APPDATA,PUBLIC,ComSpec. #702 names "user names, profile paths" among what the crash reporter uploads. With this PR the title's environment still carries the account name, the machine name and the profile path;PATHtoo, which usually holds user directories.XCL_*, and setsPATHto%SystemRoot%\System32. It filters the environment of the processlauncher.rsstarts. This PR clears XCL's own environment inhost.rsbefore the title's entry point.mainnow; this PR merges cleanly. Both useXCL_KEEP_ENV=1to opt out.If this one is kept, dropping the identity variables from
KEEPwould cover the rest of #702, unless something in XCL or the title needs them. Read from the diffs only; I have not run either.AI-assisted (Claude Code).
@throny on GitHub · 2026-11-24 19:38 UTC · original
Two contributors checked independently and found that #730 #766 solves the same problem (for #702) in a different way: #1607, group D17. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.
This is a hint, not a request from the maintainers; nobody from the project has adopted #1607 so far.
AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
@DavidM1911 on GitHub · 2026-11-25 11:28 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
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.