Embed Windows VERSIONINFO resource in datui.exe - #54
Closed
derekwisong wants to merge 1 commit into
Closed
Conversation
The shipped Windows binary had an empty resource directory - no product name, company, description, or version in the file's Properties dialog. Add a winresource-driven VERSIONINFO block in build.rs, and fail the CI and release Windows jobs if any of the fields come back empty.
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.
What
The shipped Windows binary has an empty PE resource directory. Parsing the data directories of the released
datui.exefrom v0.2.56:No ProductName, CompanyName, FileDescription, FileVersion or LegalCopyright — the Properties dialog in Explorer shows nothing, and users have no way to confirm what they downloaded.
This adds a
winresource-driven VERSIONINFO block tobuild.rs, gated to Windows hosts (the MSVC toolchain supplies the resource compiler; the release workflow builds natively onwindows-latest, so the gate is always satisfied there).FileVersion/ProductVersionare derived fromCARGO_PKG_VERSION, so they track releases automatically.Guardrail
Both the CI and release Windows jobs now read the metadata back off the built exe and fail if any field is empty, so this can't silently regress. The release check runs before the zip is created, so an anonymous binary can never be published.
Context
Not a fix for the winget 0.2.56 Defender block — that traces to microsoft/winget-pkgs#399077, an open winget validation-pipeline bug where Defender fails during dynamic analysis and the failure is reported as a detection. Defender-error PRs in winget-pkgs went from ~10/month through June to 548 in August. This is general hardening: publisher metadata is worth having on its own, and anonymous binaries score worse with reputation-based scanners.
Test plan
Verify version resourcestep prints non-emptyProductName/CompanyName/FileVersionbuild.rsno-ops off-Windows)cargo check --locked --workspaceclean (verified locally; Cargo.lock only gainswinresource+ itstomlstack, no existing versions changed)