YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix(ci): refresh Windows signing trust and coverage reports (#7212)
Louis Beaumont63bdc7c77645
diff --git a/.github/actions/refresh-windows-signing-trust/SigningTlsProbe.java b/.github/actions/refresh-windows-signing-trust/SigningTlsProbe.javanew file mode 100644index 000000000..de34417ad--- /dev/null+++ b/.github/actions/refresh-windows-signing-trust/SigningTlsProbe.java@@ -0,0 +1,26 @@+// screenpipe — AI that knows everything you've seen, said, or heard+// https://screenpipe.com++import java.net.URL;+import javax.net.ssl.HttpsURLConnection;++/** Validate certificate chains and hostnames without credentials or signing. */+public final class SigningTlsProbe {+ public static void main(String[] args) throws Exception {+ if (args.length == 0) throw new IllegalArgumentException("Expected HTTPS endpoints");+ for (String endpoint : args) {+ HttpsURLConnection connection = (HttpsURLConnection) new URL(endpoint).openConnection();+ connection.setConnectTimeout(15000);+ connection.setReadTimeout(15000);+ connection.setInstanceFollowRedirects(false);+ connection.setRequestMethod("HEAD");+ try {+ // A 401/404/405 is fine: only TLS is tested, not authentication.+ int status = connection.getResponseCode();+ System.out.println("TLS verified: " + endpoint + " (HTTP " + status + ")");+ } finally {+ connection.disconnect();+ }+ }+ }+}diff --git a/.github/actions/refresh-windows-signing-trust/action.yml b/.github/actions/refresh-windows-signing-trust/action.ymlnew file mode 100644index 000000000..7b77f044a--- /dev/null+++ b/.github/actions/refresh-windows-signing-trust/action.yml@@ -0,0 +1,21 @@+# screenpipe — AI that knows everything you've seen, said, or heard+# https://screenpipe.com++name: Refresh Windows signing trust+description: Give CodeSignTool current Java CA roots and verify its actual JVM can reach SSL.com+runs:+ using: composite+ steps:+ - uses: actions/setup-java@v4+ with:+ distribution: temurin+ java-version: '11'+ check-latest: true+ # CodeSignTool bundles an x64 JVM on both Windows release architectures.+ architecture: x64+ - name: Refresh bundled roots and verify signing TLS+ shell: pwsh+ env:+ SIGNING_ACTION_PATH: ${{ github.action_path }}+ run: |+ & "$env:SIGNING_ACTION_PATH/refresh.ps1" -ToolPath $env:CODESIGNTOOL_PATH -TrustedJavaHome $env:JAVA_HOMEdiff --git a/.github/actions/refresh-windows-signing-trust/refresh.ps1 b/.github/actions/refresh-windows-signing-trust/refresh.ps1new file mode 100644index 000000000..53e3e29fc--- /dev/null+++ b/.github/actions/refresh-windows-signing-trust/refresh.ps1@@ -0,0 +1,42 @@+# screenpipe — AI that knows everything you've seen, said, or heard+# https://screenpipe.com++param(+ [Parameter(Mandatory = $true)][string]$ToolPath,+ [Parameter(Mandatory = $true)][string]$TrustedJavaHome+)+$ErrorActionPreference = 'Stop'++# CodeSignTool 1.3.2 ships Java 11.0.2 roots, which predate SSL.com's 2022+# root used by cs.ssl.com since September 2026. Refresh from maintained+# Temurin, never from an unverified server chain. Keep this in the workflow+# revision so recovery builds of older app SHAs use the same repair.+$javaFiles = @(Get-ChildItem -LiteralPath $ToolPath -Recurse -File -Filter java.exe)+if ($javaFiles.Count -ne 1) { throw 'Expected exactly one bundled signing JVM' }+$java = $javaFiles[0].FullName+$javaHome = Split-Path (Split-Path $java -Parent) -Parent+$trustStore = Join-Path $javaHome 'lib/security/cacerts'+$sourceStore = Join-Path $TrustedJavaHome 'lib/security/cacerts'+foreach ($path in @($trustStore, $sourceStore)) {+ if (-not (Test-Path -LiteralPath $path -PathType Leaf)) { throw "Missing Java CA store: $path" }+}+# JSSE prefers jssecacerts over cacerts. Do not silently refresh an unused file.+if (Test-Path -LiteralPath (Join-Path $javaHome 'lib/security/jssecacerts')) {+ throw 'Unexpected jssecacerts override in bundled signing JVM'+}+Copy-Item -LiteralPath $sourceStore -Destination $trustStore -Force+if ((Get-FileHash $sourceStore).Hash -ne (Get-FileHash $trustStore).Hash) {+ throw 'Bundled signing CA store does not match maintained Temurin roots'+}++$probeDir = Join-Path ([System.IO.Path]::GetTempPath()) ("signing-tls-" + [guid]::NewGuid())+New-Item -ItemType Directory -Path $probeDir | Out-Null+try {+ & (Join-Path $TrustedJavaHome 'bin/javac.exe') --release 11 -d $probeDir (Join-Path $PSScriptRoot 'SigningTlsProbe.java')+ if ($LASTEXITCODE -ne 0) { throw 'Could not compile signing TLS preflight' }+ # Use the exact executable and default trust store selected by sign-ssl.ps1.+ & $java -cp $probeDir SigningTlsProbe https://login.ssl.com/ https://cs.ssl.com/+ if ($LASTEXITCODE -ne 0) { throw 'Bundled signing JVM cannot validate SSL.com TLS' }+} finally {+ Remove-Item -LiteralPath $probeDir -Recurse -Force+}diff --git a/.github/scripts/release-workflows.test.ts b/.github/scripts/release-workflows.test.tsindex 3c8538812..590e6d092 100644--- a/.github/scripts/release-workflows.test.ts+++ b/.github/scripts/release-workflows.test.ts@@ -167,3 +167,22 @@ test("production packaging enables localization without changing development defexpect(config(flavor).build.beforeDevCommand).toBe("bun run dev");}});++test("consumer and enterprise signing refresh trust before any Windows signing", () => {+ const actionPath = ".github/actions/refresh-windows-signing-trust";+ for (const job of [app.jobs["publish-tauri"], enterprise.jobs["release-enterprise-windows"]]) {+ const checkout = job.steps.find((step: any) => step.with?.["sparse-checkout"]?.includes(actionPath));+ expect(checkout.with.ref).toBe("${{ github.workflow_sha }}");+ expect(checkout.with.path).toBe(".release-workflow");+ const refresh = job.steps.findIndex((step: any) => step.uses === `./.release-workflow/${actionPath}`);+ const install = job.steps.findIndex((step: any) => step.run?.includes("CodeSignTool-v1.3.2-windows.zip"));+ const sign = job.steps.findIndex((step: any) => step.env?.ESIGNER_PASSWORD);+ expect(refresh).toBeGreaterThan(install);+ expect(sign).toBeGreaterThan(refresh);+ expect(job.steps[refresh]["continue-on-error"]).toBeUndefined();+ }+ const appRefresh = app.jobs["publish-tauri"].steps.find((step: any) => step.uses === `./.release-workflow/${actionPath}`);+ expect(appRefresh.if).toBe("matrix.os_type == 'windows'");+ const contracts = readYaml(".github/workflows/test-release-workflows.yml");+ expect(contracts.jobs["windows-signing-trust"].strategy.matrix.os).toEqual(["windows-latest", "windows-11-arm"]);+});diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.ymlindex 70dbff34a..5eb245e75 100644--- a/.github/workflows/release-app.yml+++ b/.github/workflows/release-app.yml@@ -298,6 +298,7 @@ jobs:sparse-checkout: |.github/actions/setup-persistent-windows-cache.github/actions/install-windows-frontend-dependencies+ .github/actions/refresh-windows-signing-trust.github/scripts- name: Attach persistent Azure Windows cache@@ -1097,6 +1098,10 @@ jobs:}}+ - name: Refresh Windows signing trust+ if: matrix.os_type == 'windows'+ uses: ./.release-workflow/.github/actions/refresh-windows-signing-trust+# Tauri's bundler fetches the NSIS toolchain from github.com at bundle# time, with no retry. Those two unauthenticated requests get their TLS# connection reset from Azure runners often enough to have failed 2 ofdiff --git a/.github/workflows/release-enterprise.yml b/.github/workflows/release-enterprise.ymlindex eefe097b8..f47aa283d 100644--- a/.github/workflows/release-enterprise.yml+++ b/.github/workflows/release-enterprise.yml@@ -154,6 +154,7 @@ jobs:sparse-checkout: |.github/actions/setup-persistent-windows-cache.github/actions/install-windows-frontend-dependencies+ .github/actions/refresh-windows-signing-trust.github/scripts- name: Attach persistent Azure Windows cache@@ -365,6 +366,9 @@ jobs:echo "CODESIGNTOOL_PATH=$cstDest" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -AppendWrite-Host "CodeSignTool installed at $cstDest"+ - name: Refresh Windows signing trust+ uses: ./.release-workflow/.github/actions/refresh-windows-signing-trust+- name: Build and sign Windows persistence helpersworking-directory: apps/screenpipe-app-taurishell: pwshdiff --git a/.github/workflows/test-release-workflows.yml b/.github/workflows/test-release-workflows.ymlindex 39689d5df..9b936e941 100644--- a/.github/workflows/test-release-workflows.yml+++ b/.github/workflows/test-release-workflows.yml@@ -12,6 +12,7 @@ on:- .github/workflows/release-enterprise.yml- .github/workflows/test-release-workflows.yml- .github/actions/install-windows-frontend-dependencies/**+ - .github/actions/refresh-windows-signing-trust/**- .github/scripts/release-workflows.test.ts- .github/scripts/enterprise-release.cjs- .github/actions/prepare-desktop-localization/**@@ -34,6 +35,7 @@ on:- .github/workflows/release-enterprise.yml- .github/workflows/test-release-workflows.yml- .github/actions/install-windows-frontend-dependencies/**+ - .github/actions/refresh-windows-signing-trust/**- .github/scripts/release-workflows.test.ts- .github/scripts/enterprise-release.cjs- .github/actions/prepare-desktop-localization/**@@ -133,3 +135,22 @@ jobs:EXPECTED_DIGEST: ${{ needs.localization-generation.outputs.snapshot-digest }}run: |echo "$EXPECTED_DIGEST .release-localization/snapshot.json" | sha256sum --check++ windows-signing-trust:+ strategy:+ fail-fast: false+ matrix:+ os: [windows-latest, windows-11-arm]+ runs-on: ${{ matrix.os }}+ timeout-minutes: 10+ steps:+ - uses: actions/checkout@v4+ - name: Download the release signing tool without credentials+ shell: pwsh+ run: |+ $tool = Join-Path $env:RUNNER_TEMP 'CodeSignTool'+ $zip = Join-Path $env:RUNNER_TEMP 'codesigntool.zip'+ Invoke-WebRequest -Uri 'https://github.com/SSLcom/CodeSignTool/releases/download/v1.3.2/CodeSignTool-v1.3.2-windows.zip' -OutFile $zip -TimeoutSec 120+ Expand-Archive -LiteralPath $zip -DestinationPath $tool -Force+ "CODESIGNTOOL_PATH=$tool" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append+ - uses: ./.github/actions/refresh-windows-signing-trust