Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

fix(release): publish _signed.exe copies of the Windows agent for older loaders - #251

Open
swarit-stepsecurity wants to merge 2 commits into
step-security:mainfrom
swarit-stepsecurity:swarit/fix/wt/windows-signed-asset-alias
Open

swarit-stepsecurity wants to merge 2 commits into
step-security:mainfrom
swarit-stepsecurity:swarit/fix/wt/windows-signed-asset-alias

Conversation

@swarit-stepsecurity

Copy link
Copy Markdown
Member

Problem

Windows loaders already on customer devices still ask for stepsecurity-dev-machine-guard-<ver>-windows_<arch>_signed.exe. That covers the single-binary loaders generated May 12–28 2026 (agent-api 138bb7da2…dc6b3ac5f) and the pinned 1.11.7 / 1.13.0 Windows templates served May 29 – Sep 18. Releases stopped publishing that name at 1.11.4, so every run gets a 404 and fails (download_failed, exit 1). Those failures are also reported under a device ID the console doesn't show, so nobody sees them.

How the old loaders verify a download (dc6b3ac5f:scripts/windows-device-agent/stepsecurity-loader.ps1):

  1. GET /v1/<tenant>/developer-mdm-agent/latest-binary?os=windows&arch=<arch> and read checksum + signed_checksum (they ignore any extra launcher fields).
  2. Check that signed_checksum is a valid Ed25519 signature of the checksum with ssh-keygen -Y verify (namespace stepsecurity-mdm-checksum, using the release key built into the loader).
  3. Download https://github.com/step-security/dev-machine-guard/releases/download/v<ver>/stepsecurity-dev-machine-guard-<ver>-windows_<arch>_signed.exe. They have no mirror fallback.
  4. Check that the file's SHA-256 matches checksum.

For 1.11.4 and later, the backend serves the checksum and signature of …-windows_<arch>.exe (windowsBinaryAssetName). The pinned templates bake in that same checksum.

Change

  • release.yml: after Authenticode signing, upload …-windows_{amd64,arm64}_signed.exe as byte-identical copies of the signed agents. Because the bytes are identical, the SHA-256, Authenticode signature, out-of-band .sha256.sig and attestation digest are all the same as the .exe, so old loaders verify and install without any change and nothing changes on the backend. The old loaders don't fetch a separate .sha256.sig for this name.
  • verify-release.yml: fail if a copy is not identical to the signed .exe. A missing copy only produces a warning, so older releases can still be verified.
  • Docs and CHANGELOG.

Re-pushing current loaders through MDM is still the main fix. This change only stops the existing old copies from failing.

Backfill (manual, not part of this PR)

Future releases get the copies automatically. Existing releases need a one-off upload: the current latest (for old latest-mode loaders) and v1.11.7 / v1.13.0 (for the pinned templates):

for tag in v1.17.0 v1.13.0 v1.11.7; do
  v=${tag#v}; d=$(mktemp -d)
  for arch in amd64 arm64; do
    gh release download "$tag" -R step-security/dev-machine-guard -D "$d" -p "stepsecurity-dev-machine-guard-$v-windows_$arch.exe"
    cp "$d/stepsecurity-dev-machine-guard-$v-windows_$arch.exe" "$d/stepsecurity-dev-machine-guard-$v-windows_${arch}_signed.exe"
    gh release upload "$tag" -R step-security/dev-machine-guard "$d/stepsecurity-dev-machine-guard-$v-windows_${arch}_signed.exe"
  done
done

Testing

  • actionlint v1.7.7 on release.yml and verify-release.yml: clean.
  • Ran the upload step locally with a stub gh: both copies were created byte-identical (cmp), all 10 listed files exist, and both _signed.exe names are uploaded.
  • Ran the new verify block locally: identical copies pass, a modified copy fails (fail=1), and missing copies only warn.
  • No other workflow's asset glob (*-windows_<arch>.exe) matches the new names.
  • Not tested: a real release run (needs the release environment), and an end-to-end install by an old loader against a backfilled release.

…er loaders

Windows loaders generated in May 2026 and the pinned 1.11.7/1.13.0 loaders
download <name>-windows_<arch>_signed.exe, which releases stopped publishing
at 1.11.4, so every run fails with a 404. Upload byte-identical copies of
the signed agents under that name; the checksum the backend serves for the
.exe matches them, so those loaders verify and install unchanged.
verify-release fails if a copy differs from the signed .exe.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes preserve signed bytes and check copy integrity, with only a non-blocking documentation correction remaining.

1 open issue
What changed in this PR

Restores compatibility with older Windows loaders by publishing the filenames they expect without changing signed agent bytes or backend checksums. Existing releases still require manual backfilling.

Changes:

  • Publish byte-identical _signed.exe agent copies for Windows amd64 and arm64.
  • Reject mismatched copies during release verification, while warning when copies are absent.
  • Document compatibility assets and the fix in release notes.
File Description
docs/​release-process.md Documents the compatibility assets.
CHANGELOG.md Records the older Windows loader fix.
.github/​workflows/​verify-release.yml Checks compatibility copies against signed agents.
.github/​workflows/​release.yml Creates and uploads both compatibility copies after signing.

Review effort: Balanced

Comment thread docs/release-process.md
| `stepsecurity-dev-machine-guard-windows_amd64.exe.bundle` | Sigstore cosign bundle (covers the signed bytes) |
| `stepsecurity-dev-machine-guard-VERSION-windows_arm64.exe` | Authenticode-signed Windows ARM64 agent |
| `stepsecurity-dev-machine-guard-windows_arm64.exe.bundle` | Sigstore cosign bundle (covers the signed bytes) |
| `stepsecurity-dev-machine-guard-VERSION-windows_{amd64,arm64}_signed.exe` | Byte-identical copies of the signed agents, for Windows loaders generated before v1.11.4 that still download the `_signed.exe` name |
1.18.0 and 1.18.1 shipped without this change, so its CHANGELOG entry moves
to [Unreleased].

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The release documentation incorrectly excludes supported pinned 1.11.7 and 1.13.0 templates by using a v1.11.4 loader-generation cutoff instead of describing compatibility by the downloaded filename.

2 open issues

Review effort: Balanced

Comment thread docs/release-process.md
| `stepsecurity-dev-machine-guard-windows_amd64.exe.bundle` | Sigstore cosign bundle (covers the signed bytes) |
| `stepsecurity-dev-machine-guard-VERSION-windows_arm64.exe` | Authenticode-signed Windows ARM64 agent |
| `stepsecurity-dev-machine-guard-windows_arm64.exe.bundle` | Sigstore cosign bundle (covers the signed bytes) |
| `stepsecurity-dev-machine-guard-VERSION-windows_{amd64,arm64}_signed.exe` | Byte-identical copies of the signed agents, for Windows loaders generated before v1.11.4 that still download the `_signed.exe` name |

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants