v5.6 batch: signed releases + stronger passwords enforced + relay address-proof
The everyone-must-update release. Four coordinated changes, each from the security discussion Ed approved 2026-07-27, plus the remembered-apps polish: 1. SIGNED RELEASES. build-release.ps1 now signs the release zip (ECDSA P-256 / SHA-256, --sign-update verb) with a private key that lives ONLY at Ed's chosen location outside the repo; the matching public key is embedded (UpdateSignature) and the updater REFUSES any release whose .sig asset is missing or does not verify - a compromised GitHub account can no longer ship code to users. The signing verb self-checks against the embedded key so a key/embed mismatch fails the pipeline, and the gate proves the on-disk key matches the embed when present. 2. STRONGER PASSWORDS, ENFORCED (BREAKING). PBKDF2 raised 100k -> 600k (both peers must derive the same key, so 5.6 cannot stream with pre-5.6 AT ALL - release notes lead with it). New PasswordStrength rule (>= 8 chars, not an infamous password) enforced at EVERY door: both password dialogs block weak NEW entries with concrete plain-English advice; the streaming gate walks an existing weak password through strengthening; and ForPlainPassword - the single derivation choke-point shared with the service - refuses weak outright, so no path streams on a guessable password. Headless service logs the why. Per Ed: painful once, and this coordinated-update release is the cheapest moment it will ever have. 3. RELAY ADDRESS-PROOF (watch-only). The relay sends every new client address a random cookie and marks it verified when echoed - a forged source address can never echo, killing the reflection attack. 5.6 clients echo automatically (AddrCheck type 10, verbatim, self-limiting); the relay ships watch-only (logs would-blocks) until the fleet updates, then one flag (--require-addr-check) enforces. Per-IP entry cap (4) enforced immediately. Relay changes are committed but NOT deployed to the Pi - they ride the v5.6 release moment. 4. Remembered-apps empty state teaches its lifecycle + manual sentence; About/ release notes written; version bumped to 5.6. New gate steps: signing round-trip/tamper/wrong-key/embed-match; password rules incl. the exact "Games" case; AddrCheck verbatim echo. Gate 69/69. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+16
-2
@@ -204,6 +204,7 @@ if ($bad.Count -gt 0) {
|
||||
# 4. Zip it. Keep dist/ to a single artefact — drop any prior versioned zip.
|
||||
New-Item -ItemType Directory -Path $distDir -Force | Out-Null
|
||||
Get-ChildItem -Path $distDir -Filter 'RemSound-v*.zip' -ErrorAction SilentlyContinue | Remove-Item -Force
|
||||
Get-ChildItem -Path $distDir -Filter 'RemSound-v*.zip.sig' -ErrorAction SilentlyContinue | Remove-Item -Force
|
||||
Compress-Archive -Path (Join-Path $staging '*') -DestinationPath $zipPath -CompressionLevel Optimal -Force
|
||||
|
||||
# 5. SAFETY CHECK again, on the finished zip itself — belt and braces.
|
||||
@@ -225,10 +226,23 @@ if ($leaked.Count -gt 0) {
|
||||
}
|
||||
|
||||
Remove-Item $staging -Recurse -Force
|
||||
|
||||
# 6. SIGN the zip (2026-07-27). The updater REFUSES any release without a valid signature, so an
|
||||
# unsigned zip would be rejected by every 5.6+ install - failing the pipeline here is the kind
|
||||
# failure. --sign-update signs with the private key (outside the repo) and self-checks against
|
||||
# the public key embedded in this very build, so a key/embed mismatch also stops the release.
|
||||
$sigPath = "$zipPath.sig"
|
||||
& (Join-Path $repo 'publish\RemSound.exe') --sign-update $zipPath | Write-Host
|
||||
if ($LASTEXITCODE -ne 0 -or -not (Test-Path -LiteralPath $sigPath)) {
|
||||
Write-Host "RELEASE ABORTED - could not sign the zip (see message above). Nothing published." -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
Write-Host "Signed: $sigPath" -ForegroundColor Green
|
||||
|
||||
$size = [math]::Round((Get-Item $zipPath).Length / 1MB, 2)
|
||||
Write-Host ""
|
||||
Write-Host "OK - clean release zip verified: $zipPath ($size MB, $entryCount entries)" -ForegroundColor Green
|
||||
Write-Host " No logs / profiles / recordings / config present." -ForegroundColor Green
|
||||
Write-Host ""
|
||||
Write-Host "Next:" -ForegroundColor Cyan
|
||||
Write-Host " gh release create $Tag `"$zipPath`" --title `"RemSound $Tag`" --notes-file RELEASE_NOTES.md"
|
||||
Write-Host "Next (the .sig asset MUST ship with the zip - updaters refuse a release without it):" -ForegroundColor Cyan
|
||||
Write-Host " gh release create $Tag `"$zipPath`" `"$sigPath`" --title `"RemSound $Tag`" --notes-file RELEASE_NOTES.md"
|
||||
|
||||
Reference in New Issue
Block a user