Skip to content

windows legs: the spec 34 §8.2 Azure Trusted Signing lane - #107

Merged
ronaldtse merged 1 commit into
mainfrom
feat/windows-signing
Nov 24, 2026
Merged

ronaldtse merged 1 commit into
mainfrom
feat/windows-signing

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Windows legs: the spec 34 §8.2 Azure Trusted Signing lane

Ports the ruby factory's proven windows sign block to this factory's two
windows legs (windows-2022 x86_64 and windows-11-arm arm64 — the
matrix's ucrt64/clangarm64 rows). Until now both legs shipped unsigned:
the repo had no signgate/signtool/Azure anywhere (the arm64-signing
survey's finding); only the macOS spec 31 lane and the OpenPGP release
signing existed.

What lands

  • ci/windows-sign-gate.sh — the spec 34 §4 enablement gate, ported
    from the ruby factory's same-named script. WINDOWS_SIGNING_ENABLED=true
    arms; anything else is a loud unsigned notice (spec 00 invariant 7:
    unsigned stays first-class); armed with an unresolved secret/variable
    is a fast named failure before any signing call (§7.5).
  • _build-platform.yml, build job — the six sign steps, in-leg after
    the build and before the symbol-provenance check + boot smoke, so the
    smoke and the publish-time .sha256 sidecars anchor the SIGNED bytes
    (sign-then-hash, §1.3):
    1. arm check (gated matrix.os == 'windows' + the rc-107 skip output);
    2. stage the PE set (<runtime>.exe + the libpython <runtime>.dll)
      under sign-staging/ — COPY, never move (§7.3);
    3. azure/login over OIDC workload identity (no stored client secret;
      the federated credential is scoped to this repo × the
      windows-signing environment);
    4. TrustedSigning module preflight (CurrentUser scope — the ruby
      factory's poisoned-cache lesson);
    5. Azure/artifact-signing-action@v1 (sha-pinned) on the staging dir,
      exe,dll extension enumeration, SHA256 digests, RFC 3161 timestamp
      (http://timestamp.acs.microsoft.com) mandatory (§1.4);
    6. move the signed bytes back over the contract paths and
      signtool verify /pa /v + Get-AuthenticodeSignature (Valid +
      TimeStamperCertificate present) in place (§7.1/§7.2).
  • The build job declares id-token: write (the OIDC boundary) and
    environment: windows-signing (all legs carry it; only windows arms —
    the environment must never gain required reviewers). The four
    build-<platform>.yml triggers grant contents/attestations/id-token
    — the same superset publish.yml's callers already grant (a reusable
    workflow never elevates past its caller).
  • AGENTS.md records the lane.

Wiring (verified 2026-11-24)

  • Environment windows-signing exists on this repo with EMPTY
    protection rules (gh api repos/.../environments/windows-signing).
  • Org secrets AZURE_CLIENT_ID / AZURE_TENANT_ID /
    AZURE_SUBSCRIPTION_ID and org variables AZURE_ENDPOINT /
    AZURE_SIGNING_ACCOUNT_NAME / AZURE_SIGNING_CERT_PROFILE all list
    this repo in their repository selection.
  • Repo variable WINDOWS_SIGNING_ENABLED=true is SET, so this PR's CI
    runs the lane armed (the ruby/jruby precedent: armed in PR CI,
    signtool-verified at the contract path, CN=Ribose Limited).

Gate-off posture

With the variable unset/!= true every sign step skips and the legs ship
unsigned, byte-identically to today (spec 00 invariant 7, §7.4 gate-off
parity) — the arm check emits a loud ::notice:: and nothing else
changes.

Evidence

This PR's windows legs carry the proof in their logs: azure/login OK →
TrustedSigning sign (Successfully signed ...) → signtool verify /pa /v pass → signed+timestamped: <name> — CN=Ribose Limited, ...
(+ RFC 3161 countersignature), on both the x86_64 and the arm64 legs
(the arm64 leg when compute_matrix's link-unit asset gate admits it).

Local gates green: the full spec suite (90 examples, 0 failures —
including the workflow lang_infix lock) and every authored YAML parses.

Mirror of the ruby factory's windows sign block: the arm check
(ci/windows-sign-gate.sh, gated on the WINDOWS_SIGNING_ENABLED repo
variable — gate off ships unsigned byte-identically, spec 00 invariant
7), the sign-staging copy, the OIDC azure/login in the windows-signing
environment, the TrustedSigning module preflight, the
Azure/artifact-signing-action sign (RFC 3161 timestamp mandatory), and
the signtool verify /pa at the contract paths — in-leg before the
symbol-provenance check and the boot smoke, so the smoke and the
publish-time .sha256 sidecars anchor the signed bytes
(sign-then-hash, §1.3).

The build job declares id-token:write (the OIDC boundary) and the
windows-signing environment; the four build-<platform>.yml triggers
grant the same superset the publish job already needed (a reusable
workflow never elevates past its caller).
@ronaldtse
ronaldtse marked this pull request as ready for review November 24, 2026 04:05
@ronaldtse
ronaldtse merged commit 40c1585 into main Nov 24, 2026
57 checks passed
@ronaldtse
ronaldtse deleted the feat/windows-signing branch November 24, 2026 04:05

This branch was previously deployed

1 inactive deployment
windows-signing — 9868bbee Deployed Nov 24, 2026 by ronaldtse via linux-musl / 3.11.16 / linux-musl-arm64 #234
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