Repository navigation
Add default-off Windows GoReleaser before-hook script input - #150
Conversation
Preserve default release config bytes and run explicitly opted-in caller scripts after GoReleaser tag validation, before Windows compilation. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Superseded — see the current review report for commit
|
Superseded — see the current review report for commit
|
Keep the existing predicate, guards, diagnostics and default config bytes while sharing one helper after the already-pinned workflow checkout. Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
Superseded — see the current review report for commit
|
General PR Review: Add default-off Windows GoReleaser before-hook script inputBlocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0 Review SummaryThe new commit ( I scanned the full PR diff for security and correctness, including the opt-in
No trusted repo-local criteria loaded, so only the base criteria were applied. The incremental diff was complete (not partial). No GoReleaser or Windows runner execution was verified (out of scope for a read-only review). Security IssuesNone found. Correctness IssuesNone found. SuggestionsNone. Reviewed commit: |
Why
Windows Active Directory artifacts can carry stale PE File/Product versions even when the release tag and
--versionare correct. The Windows build links the committed.sysowithout refreshing it; caller pre-jobs cannot supply files to the shared job's fresh tag checkout.Change
windows_pre_build_script; only opted-in Windows configs execute the tagged caller script through GoReleaserbefore.hooks, in_callerwith validatedRELEASE_TAG.scripts/validate-safe-relative-path.shacross the three path-input checks, the Windows renderer, and the extra-files loop. Preserve the previous empty guards, trimming, diagnostics, streams and exit behavior.validate-inputshas no files to invoke. No new jobs, dependencies, permissions or unpinned fetches; non-path prerequisites remain early checks.Local validation
make test workflow-validatepasses: existing Go/shell/Python rig, pinned-tag/config contracts, new legacy-equivalence corpus for every path-validator caller, and the hook present/absent/failure tests.c56b99f1025946c8af8adb4da4c8e33fe21a6761e8142f9632f94ea40497b9a7).pwshis absent. YAML parsing passes; actionlint is not installed locally. No live GoReleaser Pro release or native Windows execution was performed.Consumer verification story
The AD companion generates and verifies the amd64 COFF resource from the tag, retaining icon/manifest resources and checking numeric and string File/Product fields. Its original real-hook/Windows cross-build check passed with
v0.5.13-rc.1+build.2; the companion now also adds an automatic CI executable-verification smoke withv1.2.3-ci.0, preserving source VERSION and the local fallback resource. Verify the resulting executable with:python scripts/windows_pe_version.py verify --tag "$TAG" --file path/to/baton-active-directory.exeAfter release, obtain the Windows ZIP from the published manifest, verify its hash/signature/provenance under normal policy, extract the executable, and repeat that check. Check the MSI-installed payload separately.
--versionand MSI ProductVersion are not PE-resource proof. The verifier was also exercised against the existing published v0.5.12 ZIP and rejected a mismatched tag; this is not evidence of a deployed new hook.Related drafts and rollout order
Land and publish the shared input at the normal
@v4reference first, then land AD and baton-admin together. These PRs remain drafts; no release/tag publication is part of this change.