v1.122.4: stamp the EXE with its own identity - #101
Merged
Conversation
Every release through v1.122.3 shipped a binary whose CompanyName, ProductName, FileDescription and LegalCopyright were empty. Verified by reading the version resource straight out of the published v1.122.3 artifact, not inferred from the build script. Two costs. An empty version resource is a mild heuristic-AV signal, because legitimate software populates it and commodity malware often does not. More concretely, the build passes -RequireAdmin, so launching the tool raises a UAC prompt, and UAC displays FileDescription as the program name: users were being asked to elevate a blank. The values match the identity already published in RackStack.psd1, the Chocolatey nuspec and the Scoop manifest, so nothing new is asserted about who ships this. Run-Tests section 209 pins the whole build surface: the compiler stays pinned to an exact version, the ps2exe invocation keeps setting title, product, company, copyright and description, and the EXE's CompanyName must equal RackStack.psd1's so the published identity cannot drift apart across manifests. Section 209 applies the lesson from section 208: it asserts the Invoke-PS2EXE regex actually matched before trusting what the match did or did not contain, so renaming a nearby variable fails the section instead of silently passing it. Mutation-verified six ways, including breaking that anchor. Structural tests 5474 -> 5485.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
Cuts v1.122.4, shipping the interpreter guard from #100 (merged unreleased) plus the fix below.
The EXE has been shipping without a name
Every release through v1.122.3 embedded an empty version resource. Read straight out of the
published v1.122.3 binary:
Two costs:
-RequireAdmin, so the tool raises an elevationprompt on launch, and UAC displays
FileDescriptionas the program name. Users have beenasked to grant administrator rights to an unnamed executable.
an empty one is a (mild) contributor to the ML detections on v1.122.3.
Values match the identity already published in
RackStack.psd1(CompanyName = 'TheAbider'),the Chocolatey nuspec and the Scoop manifest — nothing new is asserted about who ships this.
Deliberately not included
Switching to a 64-bit build. The binary compiles as PE32/i386 today. I considered
-x64as a further heuristic tweak and rejected it: the AV benefit is speculative, while dropping
32-bit support is a real compatibility change. Not worth trading a certainty for a maybe.
Tests
Section 209, 11 assertions covering the build surface: ps2exe stays pinned to an exact version,
the invocation keeps setting
title/product/company/copyright/description,-Versionsurvives, and the EXE's
CompanyNamemust equalRackStack.psd1's so the published identitycannot drift across manifests.
Section 209 applies the lesson #100 learned the hard way — it asserts the
Invoke-PS2EXEregexmatched before trusting what the match contained. Mutation-verified six ways: dropping
-company, dropping-title, drifting company away from the manifest, reverting to an unpinnedinstall, unpinning the version variable, and breaking the regex anchor. All caught, with a
non-vacuous all-true baseline.
Structural tests 5474 → 5485. Full gate: 42 passed / 0 failed / 0 warnings, suite 5485/5485.
On merge
This cuts a release: EXE build, GitHub release, cosign + SLSA attestation, PowerShell
Gallery, and a fresh Chocolatey submission.