Conversation
|
This is very interesting and educational for me. When I have responsibly reviewed this and understood it, I will go ahead and merge this. I will need to have an intimate understanding before I can stamp my approval on this, because this is effectively a certificate of trust. As an aside, I use GCC and mingw-w64 along with POSIX sh and make for my own builds. This workflow uses MSVC, PowerShell, and CMake. I'm a little torn on which to use for this workflow. I will continue developing using my stack, so the binaries I will be testing locally will not be MSVC-produced binaries. This could cause subtle issues. I also like that you have set up a Microsoft-native workflow, since cmdtab is, after all, a completely Windows application. Any thoughts on this? |
fbf08dd to
393dfbd
Compare
Release binaries are currently built and uploaded from a local machine, so users have no way to prove a download corresponds to the published source. This makes cmdtab hard to adopt in security-conscious and corporate environments, where third-party binaries must be traceable to auditable source through a transparent build pipeline. This adds a GitHub Actions workflow that: - Builds cmdtab.exe from source with mingw-w64 GCC on GitHub-hosted runners on every push, PR, and version tag, mirroring the flags of the Makefile's release target so the published binary matches local development builds - Fails a tagged build if the tag disagrees with the FileVersion in res/cmdtab.rc - Packages the release zip and a SHA256SUMS file - Signs SLSA build provenance attestations for the exe and zip, verifiable with 'gh attestation verify' - Drafts a GitHub Release with the artifacts on v* tags, leaving publishing in the maintainer's hands The toolchain is the MSYS2 preinstalled on GitHub's Windows runners; no third-party toolchain actions are added, all actions are pinned to full commit SHAs, and jobs run with least-privilege permissions. README gains a 'Verifying releases' section documenting verification, and a Dependabot config keeps the SHA-pinned actions current by opening a PR whenever a pinned action publishes a new release.
393dfbd to
3ec18b7
Compare
|
Yeah, I went back and forth on this too. I've switched the PR to build with your stack 😊 The workflow now uses the One thing to flag: I used the While setting this up I also hit an unrelated Since you mentioned this is new territory, here's a walkthrough of the four parts that actually carry the trust. Each one links to the exact lines in this PR and the doc I'd read for it.
No rush on any of this. Here's a green run of the workflow on my fork so you can poke at a real one, including the attestation step: https://github.com/BillSkiCO/cmdtab/actions/runs/29281871729 |
- Add zip, install, start, stop recipes to Makefile - Grab version number from .rc file. Inspired by #40, thanks @BillSkiCO! - Build with Os instead of Oz
Release binaries are currently built and uploaded from a local machine, so users have no way to prove a download corresponds to the published source. This makes
cmdtabhard to adopt in security-conscious and corporate environments, where third-party binaries must be traceable to auditable source through a transparent build pipeline.This adds a GitHub Actions workflow that:
cmdtab.exefrom source with MSVC on GitHub-hosted runners on every push, PR, and version tagres/cmdtab.rcgh attestation verifyThe workflow follows supply-chain best practices: all third-party actions pinned to full commit SHAs, least-privilege permissions per job, and no third-party release action in the trust chain.
Also passes
/MANIFEST:NOto the MSVC linker:cmdtab.rcalready embedscmdtab.manifestasRT_MANIFEST id 1, and current MSVC toolchains fail the link with CVT1100 (duplicate resource) when the CMake-default linker manifest is also embedded.README gains a
Verifying releasessection documenting verification.