Updates and signing¶
Checking and applying updates¶
plasma update check # exit 0 = current, 2 = update available
plasma update apply # download → verify SHA-256 → verify signer → install → rotate
The repository is public, so both commands work anonymously. A token is
still accepted (--token-env) for private forks.
What apply does, in order:
- fetches the latest release metadata,
- downloads the exe and
SHA256SUMS, - verifies the SHA-256 of the downloaded bytes,
- verifies the Authenticode signer against thumbprints pinned inside the installed binary — mismatch or unsigned aborts with exit 2 and the staged installer is never executed,
- runs the new exe's own
install --force --root <same root>, - rotates the canonical bin copy (rename-while-running is legal on Windows; overwriting a running exe is not).
--allow-unsigned exists for development only.
Automatic updates¶
The installer registers PlasmaUpdate, a daily SYSTEM task with a
random minute inside the 02:00–05:00 local maintenance window. It runs:
plasma update auto --root C:\ProgramData\Plasma
What the automatic path does:
- skips if automatic updates are disabled, the kill switch is engaged, the host is outside its ring, or it is outside the maintenance window;
- fetches the latest release and compares versions;
- on
broad, waits for the canary hold (24 hours after publication); oncanary, updates immediately; onrollback, never auto-updates; - downloads, verifies SHA-256, and verifies the pinned Authenticode signer;
- runs the same
install --forcepath, stops the tasks that hold the binary (PlasmaServe,PlasmaWatch,PlasmaWhidsWatchdog,PlasmaIdentityPull), stops every otherplasma*process so PyInstaller's child cannot keep port 9999, rotates the running binary and the canonicalplasma.exe, then restarts those tasks. A locked image is retried five times; a stale.oldbackup is preserved under a unique name; a failed swap restores the previous binary. A serve-launched update skipsPlasmaServeso it cannot kill its own process tree; an explicit host ring assignment wins over the configured default; - writes
update-journal.jsonlandupdate-state.json; - keeps the previous binary beside the current one, so
plasma rollbackstill works.
plasma update auto --check-only # exit 2 when an update is available
plasma update auto # apply if due
plasma update auto --force # reinstall even if the version matches
plasma update auto --ring canary # override the configured ring
Configuration lives in config.json:
{
"update": {
"auto": true,
"repo": "DrOlu/plasma",
"ring": "broad",
"every_hours": 24,
"window_start_hour": 2,
"window_end_hour": 5,
"canary_hold_hours": 24,
"allow_unsigned": false,
"restart_serve": true,
"notify": true,
"task": "PlasmaUpdate"
}
}
--no-autoupdate on install removes the task and disables the feature. The
kill switch pauses updates without disabling the task; the next run after
the switch is released picks up the release.
The two trust anchors¶
| Anchor | What it protects against |
|---|---|
SHA256SUMS published with the release |
corrupted download, truncated transfer |
| Pinned signer thumbprint baked into the installed exe | a compromised release page / repository: an attacker who can replace both the exe and the sums still cannot forge a signature matching the pin |
Default pin (self-signed project certificate, valid to 2036):
BC67B990A783702D0C4761D557A58F9AD4534A68
Rotate or extend the set without rebuilding:
$env:PLASMA_SIGNER_THUMBPRINTS = "BC67...,AB12...,CD34..."
plasma update apply
Verification reports the signer thumbprint and the chain status. Trust-chain status is informational: a lab box may not have the signer's root imported, but the pin is what matters.
Release signing in CI¶
release.yml signs the Windows exe and the MSI with Authenticode
before SHA-256 sums are computed, when repository secrets exist:
| Secret | Purpose |
|---|---|
SIGNING_PFX_BASE64 |
the PKCS#12 bundle, base64-encoded |
SIGNING_PFX_PASSWORD |
its password |
The workflow imports the certificate into the ephemeral runner's trust
stores (so signtool verify /pa exercises the real chain), signs with a
DigiCert RFC 3161 timestamp, verifies, then hashes the signed files.
The MSI is built with -arch x64, so it installs under
C:\Program Files\Plasma rather than Program Files (x86).
Without secrets, the release proceeds unsigned.
Signpath Foundation (publicly trusted signing)¶
The project has applied to SignPath Foundation for free OSS code signing. Once approved:
- Plasma's certificate is issued to the Foundation (HSM-held key), the publisher shown by Windows becomes SignPath Foundation, and SmartScreen reputation can accrue;
release.ymlswitches tosignpath/github-action-submit-signing-request(the wiring is prepared indocs/SIGNPATH_APPLICATION.md);- the Foundation thumbprint is added to the pin set above (or passed via
PLASMA_SIGNER_THUMBPRINTSduring the overlap).
Note the honest caveat: a publicly trusted certificate removes the "Unknown publisher" warning and lets reputation build — it does not guarantee instant SmartScreen silence for a brand-new publisher.
Verifying a build yourself¶
Windows:
Get-AuthenticodeSignature .\plasma-<version>-windows-x64.exe |
Select-Object Status, SignerCertificate
Any OS with osslsigncode:
osslsigncode verify -in plasma-<version>-windows-x64.exe
Both should show the Hyperspace (or SignPath Foundation) signer and a verified timestamp.