Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
ci(installers): add a dormant SignPath Foundation signing path for Windows (#433)
Ruben Lütkea7a19a0160b8
diff --git a/.github/workflows/desktop-installers.yml b/.github/workflows/desktop-installers.ymlindex b364a767f6..67e5efc0cd 100644--- a/.github/workflows/desktop-installers.yml+++ b/.github/workflows/desktop-installers.yml@@ -18,7 +18,8 @@# Signing is optional and secret-gated. GitHub forbids secrets in a job-level# `if:`, so the credentials are exported as job-level `env` and the steps test# the environment variable instead. Without the secrets the build still-# produces a working, unsigned installer and says so.+# produces a working, unsigned installer and says so. Windows can sign through+# SignPath Foundation (docs/code-signing-policy.md) or Azure Trusted Signing.## Action SHAs are pinned to 40-char commits (CVE-2025-30066 hardening), matching# the rest of this repo's workflows.@@ -83,10 +84,18 @@ jobs:name: Windows installer (x64)runs-on: windows-latesttimeout-minutes: 90+ permissions:+ contents: read+ # SignPath reads this job's metadata and downloads the unsigned artifact+ # with the job token.+ actions: readenv:# Exported here (not per step) so the `if:` guards below can read them.# An empty value means "this fork has no signing secrets" - not an error.HAS_AZURE_SIGNING: ${{ github.ref_type == 'tag' && secrets.AZURE_CLIENT_ID != '' }}+ # SignPath Foundation (free OSS certificate). Needs the API token secret+ # plus three repository variables; any one missing leaves the path dormant.+ HAS_SIGNPATH_SIGNING: ${{ github.ref_type == 'tag' && secrets.SIGNPATH_API_TOKEN != '' && vars.SIGNPATH_ORGANIZATION_ID != '' && vars.SIGNPATH_PROJECT_SLUG != '' && vars.SIGNPATH_SIGNING_POLICY_SLUG != '' }}steps:- name: Checkoutuses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2@@ -149,8 +158,75 @@ jobs:# Signs the SETUP executable. Windows attaches Mark-of-the-Web to the# downloaded installer, so this signature is the one SmartScreen weighs;# files the installer then writes inherit no MOTW.+ #+ # Two interchangeable paths; SignPath wins when both are configured so a+ # file never carries two publishers' signatures.+ #+ # SignPath (docs/code-signing-policy.md): the unsigned setup is uploaded as+ # a workflow artifact, SignPath fetches it from GitHub, checks it came from+ # this workflow on a GitHub-hosted runner, waits for a human approval in+ # SignPath, and hands back the signed file. The signature is verified+ # before the signed file replaces the unsigned one.+ - name: Stage the unsigned installer for SignPath+ id: signpath-unsigned+ if: env.HAS_SIGNPATH_SIGNING == 'true'+ uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3+ with:+ # Deliberately outside the `installer-*` pattern the release job+ # downloads: only the verified, signed file may ship.+ name: signpath-unsigned-windows-x64+ path: dist/installers/PersonalJarvis-Setup-x64.exe+ if-no-files-found: error+ retention-days: 1++ - name: Sign the installer (SignPath Foundation)+ if: env.HAS_SIGNPATH_SIGNING == 'true'+ # pin: signpath/[email protected] - pinned by commit SHA.+ uses: signpath/github-action-submit-signing-request@f6d04783b4569d051e0c80105fe66e82819d0092+ with:+ api-token: ${{ secrets.SIGNPATH_API_TOKEN }}+ organization-id: ${{ vars.SIGNPATH_ORGANIZATION_ID }}+ project-slug: ${{ vars.SIGNPATH_PROJECT_SLUG }}+ signing-policy-slug: ${{ vars.SIGNPATH_SIGNING_POLICY_SLUG }}+ # Empty means the project's default artifact configuration.+ artifact-configuration-slug: ${{ vars.SIGNPATH_ARTIFACT_CONFIGURATION_SLUG }}+ github-artifact-id: ${{ steps.signpath-unsigned.outputs.artifact-id }}+ wait-for-completion: true+ # Every SignPath Foundation release needs a manual approval; give the+ # approver an hour before the job gives up.+ wait-for-completion-timeout-in-seconds: 3600+ output-artifact-directory: ${{ runner.temp }}/signpath-signed++ - name: Verify the SignPath signature before it replaces the unsigned file+ if: env.HAS_SIGNPATH_SIGNING == 'true'+ shell: pwsh+ run: |+ $ErrorActionPreference = 'Stop'+ $signed = Join-Path $env:RUNNER_TEMP 'signpath-signed/PersonalJarvis-Setup-x64.exe'+ if (-not (Test-Path -LiteralPath $signed)) {+ Write-Host "::error::SignPath returned no PersonalJarvis-Setup-x64.exe"+ Get-ChildItem -Recurse (Split-Path $signed) | ForEach-Object { Write-Host $_.FullName }+ exit 1+ }+ $signature = Get-AuthenticodeSignature -LiteralPath $signed+ Write-Host "status=$($signature.Status) signer=$($signature.SignerCertificate.Subject)"+ if ($signature.Status -ne 'Valid') {+ Write-Host "::error::Authenticode signature is not valid: $($signature.StatusMessage)"+ exit 1+ }+ if ($signature.SignerCertificate.Subject -notmatch 'SignPath Foundation') {+ Write-Host "::error::Unexpected signer: $($signature.SignerCertificate.Subject)"+ exit 1+ }+ if ($null -eq $signature.TimeStamperCertificate) {+ Write-Host "::error::The signature carries no timestamp and would expire with the certificate"+ exit 1+ }+ Copy-Item -LiteralPath $signed -Destination dist/installers/PersonalJarvis-Setup-x64.exe -Force+ Write-Host "::notice::Installer signed by SignPath Foundation and verified."+- name: Sign the installer (Azure Trusted Signing)- if: env.HAS_AZURE_SIGNING == 'true'+ if: env.HAS_AZURE_SIGNING == 'true' && env.HAS_SIGNPATH_SIGNING != 'true'# pin: azure/[email protected] - pinned by commit SHA.uses: azure/trusted-signing-action@c7ab2a863ab5f9a846ddb8265964877ef296ee82with:@@ -167,10 +243,10 @@ jobs:timestamp-digest: SHA256- name: Report the signing state honestly- if: env.HAS_AZURE_SIGNING != 'true'+ if: env.HAS_AZURE_SIGNING != 'true' && env.HAS_SIGNPATH_SIGNING != 'true'shell: bashrun: |- echo "::notice::AZURE_* signing secrets are not configured - the installer is UNSIGNED."+ echo "::notice::Neither SignPath (SIGNPATH_API_TOKEN + SIGNPATH_ORGANIZATION_ID/PROJECT_SLUG/SIGNING_POLICY_SLUG) nor AZURE_* signing is configured - the installer is UNSIGNED."- name: Upload the installeruses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3diff --git a/README.md b/README.mdindex 7043da56c8..33b45094b2 100644--- a/README.md+++ b/README.md@@ -174,6 +174,11 @@ If you prefer a regular desktop installer, download one here:- [macOS on Intel](https://github.com/PersonalJarvis/PersonalJarvis/releases/latest/download/PersonalJarvis-macOS-x64.dmg)- [Linux AppImage](https://github.com/PersonalJarvis/PersonalJarvis/releases/latest/download/PersonalJarvis-Linux-x86_64.AppImage)+Windows installers are signed under our+[code signing policy](https://github.com/PersonalJarvis/PersonalJarvis/blob/main/docs/code-signing-policy.md)+once the SignPath Foundation program approves the project. Free code signing+provided by SignPath.io, certificate by SignPath Foundation.+The macOS disk image is not notarized by Apple yet. The first time you open iton macOS 15, go to **System Settings > Privacy & Security** and click **OpenAnyway**. Up to macOS 14, right-click the app and choose **Open**. The one-linediff --git a/README.zh-CN.md b/README.zh-CN.mdindex 71b7e75de3..3c00ceae91 100644--- a/README.zh-CN.md+++ b/README.zh-CN.md@@ -143,6 +143,8 @@ curl -fsSL https://raw.githubusercontent.com/PersonalJarvis/PersonalJarvis/main/[macOS(Intel)](https://github.com/PersonalJarvis/PersonalJarvis/releases/latest/download/PersonalJarvis-macOS-x64.dmg) ·[Linux AppImage](https://github.com/PersonalJarvis/PersonalJarvis/releases/latest/download/PersonalJarvis-Linux-x86_64.AppImage)+> **Windows:** SignPath Foundation 开源项目批准后,Windows 安装程序将按照[代码签名政策(Code signing policy)](https://github.com/PersonalJarvis/PersonalJarvis/blob/main/docs/code-signing-policy.md)签名。Free code signing provided by SignPath.io, certificate by SignPath Foundation.+> **macOS:** 磁盘映像尚未经过 Apple 公证,因此首次启动时需要前往> **系统设置 > 隐私与安全性 > 仍要打开**(macOS 15;在 macOS 14 及更早版本上可以右键点按 > 打开)。> 上面的一行安装命令不需要这一步。diff --git a/docs/code-signing-policy.md b/docs/code-signing-policy.mdnew file mode 100644index 0000000000..797edadf41--- /dev/null+++ b/docs/code-signing-policy.md@@ -0,0 +1,100 @@+# Code signing policy++Free code signing provided by [SignPath.io](https://signpath.io), certificate by+[SignPath Foundation](https://signpath.org).++> **Status:** Personal Jarvis has applied to the SignPath Foundation open-source+> program. Until the application is approved and the first signed release ships,+> the Windows installer on the+> [Releases page](https://github.com/PersonalJarvis/PersonalJarvis/releases) is+> **unsigned**. Each release's workflow log states whether it was signed.++## What is signed++| Artifact | Platform | Signed by |+| --- | --- | --- |+| `PersonalJarvis-Setup-x64.exe` | Windows 10/11 x64 | SignPath Foundation certificate, via SignPath.io |++Only files built from this repository's source code by the+[`Desktop installers`](../.github/workflows/desktop-installers.yml) GitHub Actions+workflow are submitted for signing. The workflow runs on GitHub-hosted runners+for a release tag. SignPath.io verifies that each submitted file was produced by+that workflow before it signs anything. Third-party components bundled in the+installer keep their own publishers' signatures (or none). They are never signed+with this project's certificate.++The macOS disk images and the Linux AppImage are not covered by this policy.++## Team roles++| Role | Who |+| --- | --- |+| Committers and reviewers | [Members of the PersonalJarvis organization](https://github.com/orgs/PersonalJarvis/people) |+| Approvers | [Owners of the PersonalJarvis organization](https://github.com/orgs/PersonalJarvis/people?query=role%3Aowner) |++- **Committers** may change the source code in this repository.+- **Reviewers** review every pull request from people outside the team before it+ is merged.+- **Approvers** approve each signing request in SignPath by hand. No release is+ signed without that approval.++All team members use multi-factor authentication for GitHub and SignPath.++## How a release gets signed++1. A maintainer pushes a `v*.*.*` release tag.+2. The workflow builds the installer and uploads the unsigned file as a workflow+ artifact.+3. The workflow sends a signing request to SignPath.io, which checks the file's+ origin.+4. An approver reviews the request and approves it in SignPath.+5. The workflow downloads the signed installer, checks that its Authenticode+ signature is valid, timestamped and issued to SignPath Foundation, and only+ then publishes it.++## Privacy++This program will not transfer any information to other networked systems+unless specifically requested by the user or the person installing or operating+it. Personal Jarvis contacts a service only when you connect and use it, for+example a model provider, a speech provider or a plugin you configured. Those+services handle data under their own privacy policies. Details are in+[Privacy and Local Data](product/privacy-safety-and-support/privacy-and-local-data.md)+and the privacy section of [SECURITY.md](../SECURITY.md#privacy).++## Report a problem++If you believe a file signed with this project's certificate is malicious or+breaks this policy, report it privately as described in+[SECURITY.md](../SECURITY.md). You can also contact SignPath at++## Maintainer setup++The signing path in the workflow stays dormant until these are set in the+repository settings:++| Kind | Name | Value |+| --- | --- | --- |+| Secret | `SIGNPATH_API_TOKEN` | API token of a SignPath user with submitter rights |+| Variable | `SIGNPATH_ORGANIZATION_ID` | SignPath organization ID |+| Variable | `SIGNPATH_PROJECT_SLUG` | SignPath project slug |+| Variable | `SIGNPATH_SIGNING_POLICY_SLUG` | Signing policy slug, usually `release-signing` |+| Variable (optional) | `SIGNPATH_ARTIFACT_CONFIGURATION_SLUG` | Artifact configuration slug; empty uses the project default |++The workflow uploads the installer as a ZIP workflow artifact, so the SignPath+artifact configuration wraps the setup file in a ZIP and pins its metadata:++```xml+<artifact-configuration xmlns="http://signpath.io/artifact-configuration/v1">+ <zip-file>+ <pe-file path="PersonalJarvis-Setup-x64.exe" product-name="Personal Jarvis">+ <authenticode-sign />+ </pe-file>+ </zip-file>+</artifact-configuration>+```++Without these settings the workflow prints a notice and publishes an unsigned+installer. If both SignPath and Azure Trusted Signing are configured, SignPath+is used.diff --git a/docs/desktop-installers.md b/docs/desktop-installers.mdindex 939bd6b36c..7ff87a0f67 100644--- a/docs/desktop-installers.md+++ b/docs/desktop-installers.md@@ -204,7 +204,8 @@ working installer and says, in one line, that it is unsigned.| Platform | Mechanism | Secrets || -------- | ---------------------------- | ----------------------------------------------------------------------------------------------------------- |-| Windows | Azure Trusted Signing | `AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`, `AZURE_SIGNING_ENDPOINT`, `AZURE_CODE_SIGNING_ACCOUNT`, `AZURE_CERTIFICATE_PROFILE` |+| Windows | SignPath Foundation (preferred) | secret `SIGNPATH_API_TOKEN`; variables `SIGNPATH_ORGANIZATION_ID`, `SIGNPATH_PROJECT_SLUG`, `SIGNPATH_SIGNING_POLICY_SLUG` (optional `SIGNPATH_ARTIFACT_CONFIGURATION_SLUG`) |+| Windows | Azure Trusted Signing (alternative) | `AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`, `AZURE_SIGNING_ENDPOINT`, `AZURE_CODE_SIGNING_ACCOUNT`, `AZURE_CERTIFICATE_PROFILE` || macOS | Developer ID + notarization | `APPLE_ID`, `APPLE_TEAM_ID`, `APPLE_APP_SPECIFIC_PASSWORD`, `APPLE_CERTIFICATE_P12_BASE64`, `APPLE_CERTIFICATE_PASSWORD` (and optionally `APPLE_SIGNING_IDENTITY`; `build.sh` reads it from the imported certificate) || Linux | none (AppImage is unsigned) | - |@@ -224,6 +225,14 @@ A run started by hand from a branch (`workflow_dispatch`) builds the installerswithout publishing a release, which is the way to try the macOS job, itscertificate import and the app probe before tagging.+The Windows SignPath path and its team roles are described in+[`code-signing-policy.md`](code-signing-policy.md). The workflow uploads the+unsigned setup as a workflow artifact, waits up to an hour for the manual+approval in SignPath, then refuses the signed file unless+`Get-AuthenticodeSignature` reports a valid, timestamped signature issued to+SignPath Foundation. When both SignPath and Azure are configured, SignPath+is used.+On Windows the workflow signs the **setup executable**. That is the file thebrowser marks with Mark-of-the-Web, so it is the signature SmartScreen weighs;files the installer then writes carry no MOTW of their own. Signing the innerdiff --git a/tests/unit/ci/test_pipeline_audit.py b/tests/unit/ci/test_pipeline_audit.pyindex 8e55aea4f9..fc948ed229 100644--- a/tests/unit/ci/test_pipeline_audit.py+++ b/tests/unit/ci/test_pipeline_audit.py@@ -597,6 +597,40 @@ def test_normal_full_run_does_not_require_release_only_evidence():assert required_results.evaluate(needs, pipeline=True, strict=True)["ok"]+def test_signpath_signing_is_dormant_gated_and_verified_before_shipping():+ windows = workflows()["desktop-installers.yml"]["jobs"]["windows"]+ gate = windows["env"]["HAS_SIGNPATH_SIGNING"]+ for needed in (+ "github.ref_type == 'tag'",+ "secrets.SIGNPATH_API_TOKEN",+ "vars.SIGNPATH_ORGANIZATION_ID",+ "vars.SIGNPATH_PROJECT_SLUG",+ "vars.SIGNPATH_SIGNING_POLICY_SLUG",+ ):+ assert needed in gate+ assert "SIGNPATH_API_TOKEN" not in str(windows["env"]).replace(+ "secrets.SIGNPATH_API_TOKEN != ''", ""+ )+ steps = windows["steps"]+ names = [s.get("name", "") for s in steps]+ stage = steps[names.index("Stage the unsigned installer for SignPath")]+ sign = steps[names.index("Sign the installer (SignPath Foundation)")]+ verify = next(s for s in steps if "Get-AuthenticodeSignature" in s.get("run", ""))+ upload = steps[names.index("Upload the installer")]+ for step in (stage, sign, verify):+ assert step["if"] == "env.HAS_SIGNPATH_SIGNING == 'true'"+ # The unsigned file must never match the release job's download pattern.+ assert not stage["with"]["name"].startswith("installer-")+ artifact_id = "${{ steps.signpath-unsigned.outputs.artifact-id }}"+ assert sign["with"]["github-artifact-id"] == artifact_id+ order = [steps.index(s) for s in (stage, sign, verify, upload)]+ assert order == sorted(order)+ assert "SignPath Foundation" in verify["run"] and "'Valid'" in verify["run"]+ azure = steps[names.index("Sign the installer (Azure Trusted Signing)")]+ assert "env.HAS_SIGNPATH_SIGNING != 'true'" in azure["if"]+ assert windows["permissions"] == {"contents": "read", "actions": "read"}++def test_native_signing_keys_are_imported_only_on_admitted_tags_and_always_removed():desktop = workflows()["desktop-installers.yml"]["jobs"]mac = desktop["macos"]