Skip to content

fix(desktop): require Developer ID team without a pinned identity - #221

Open
nillikechatchat wants to merge 7 commits into
higress-group:mainfrom
nillikechatchat:fix/desktop-developer-id-team
Open

nillikechatchat wants to merge 7 commits into
higress-group:mainfrom
nillikechatchat:fix/desktop-developer-id-team

Conversation

@nillikechatchat

@nillikechatchat nillikechatchat commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Desktop update callers always pass expected_team=None. For developer-id packages that treated None as UPGRADE_SIGNATURE_IDENTITY_UNCONFIGURED and skipped TeamIdentifier, Developer ID Application, and spctl checks.

Change

  • expected_team=None requires a present TeamIdentifier plus Authority=Developer ID Application: before spctl.
  • A pinned team, when supplied, must still match exactly.
  • Extract developer_id_signature_ok so the identity rules are testable without codesign.
  • Compile that helper only on macOS and in tests, so Linux clippy does not treat it as dead code.

Fixes #218

Validation

  • cargo test --locked -p hiroute-host-runtime --lib desktop_package::
  • 3 passed, including developer_id_signature_requires_present_team_without_pinning
  • cargo clippy --locked -p hiroute-host-runtime --all-targets -- --deny warnings passed locally
  • SHA: d5b8aba
  • Follow-up CI: quality shard passed; unit shard was still running at handoff

Desktop update callers always pass expected_team=None. For developer-id
packages that treated None as UPGRADE_SIGNATURE_IDENTITY_UNCONFIGURED
and skipped TeamIdentifier, Developer ID Application, and spctl checks.

None now requires a present TeamIdentifier plus Developer ID Application
authority before spctl. A pinned team, when supplied, must still match.

Fixes higress-group#218

Signed-off-by: nillikechatchat <yuanhenglizhen2050@163.com>
Co-authored-by: monkeycode-ai <monkeycode-ai@chaitin.com>
Linux clippy builds the host-runtime lib without macos, so the helper
was unused outside tests and failed -D warnings.

Fixes higress-group#218

Signed-off-by: nillikechatchat <yuanhenglizhen2050@163.com>
Co-authored-by: monkeycode-ai <monkeycode-ai@chaitin.com>
@nillikechatchat

Copy link
Copy Markdown
Contributor Author

@johnlanni ready for review.

Fixes #218. Candidate SHA d5b8aba5.

Follow-up commit gates developer_id_signature_ok with cfg(any(target_os = "macos", test)) so Linux clippy -D warnings stays clean. quality shard passed on that follow-up.

@johnlanni

Copy link
Copy Markdown
Contributor

Review: real Developer ID upgrade blocker; preserve trusted publisher identity

Reviewed commit: d5b8aba5e86d78d528291a287df65616b00ca0b9.

Importance of the original issue: low immediate urgency for the current self-signed release channel, but a release-readiness blocker before distributing Developer ID packages. The current v0.3.1 macOS artifacts are self-signed and use the unaffected controlled-trial branch. For Developer ID packages, the defect is real: all updater callers pass expected_team=None, so verification returns UPGRADE_SIGNATURE_IDENTITY_UNCONFIGURED. This happens during package preparation/verification after download; the catalog-only update check does not call this verifier. The old behavior fails closed, making affected upgrades unavailable.

Change needed before merge (P1 review finding): the patch resolves the availability problem by weakening the publisher-identity requirement. In developer_id_signature_ok, None now accepts any nonempty team with Developer ID Application authority. Every real updater call still passes None, so exact team matching is unused throughout download/staging, revalidation and installation. A different valid Developer ID publisher is accepted by this identity check.

The native HTTPS source and package digest checks remain in place. However, valid Apple signing/Gatekeeper assessment alone does not establish the expected HiRoute publisher. The existing upgrade requirement retains signature-identity verification. The P1 finding concerns the trust-policy weakening introduced by this fix; it does not classify the original report as a demonstrated P1 production incident.

Please:

  1. Provide the expected publisher identity from a trusted native/build configuration and pass it through every relevant verification entry, including installer revalidation. Preserve explicit failure when a Developer ID identity is unconfigured or mismatched. Any supported team rotation should have an explicit trusted transition rule; the candidate package must not define its own trusted team.
  2. Cover the actual caller wiring, including a valid expected-team package, an otherwise valid different-team package being rejected, missing team configuration, and continued self-signed behavior. Helper-only tests with an explicit Some(team) cannot prove production enforcement while callers still pass None.
  3. Exercise real macOS signature/Gatekeeper validation through the preparation and installation-revalidation paths. The green backend/Windows checks and synthetic signature-text test do not establish a successful Developer ID upgrade; no real signed-package upgrade was executed in this review.

Recommendation: fix the missing identity configuration/wiring before enabling this upgrade path, rather than broadening acceptance to every Developer ID team.

Keep Developer ID verification fail-closed when the publisher team is
unconfigured. Pass the compile-time team from the packaging identity
through download, revalidation and install.

Fixes higress-group#218

Signed-off-by: nillikechatchat <yuanhenglizhen2050@163.com>
Co-authored-by: monkeycode-ai <monkeycode-ai@chaitin.com>
@johnlanni

Copy link
Copy Markdown
Contributor

Follow-up review (2026-10-29): publisher-identity finding remains unresolved

Reviewed commit: d5b8aba5e86d78d528291a287df65616b00ca0b9, unchanged since the previous review.

Original issue and urgency: Developer ID upgrades really do fail when callers provide no expected signing team. The original verifier fails closed with UPGRADE_SIGNATURE_IDENTITY_UNCONFIGURED, affecting upgrade availability. The current public stable release is still v0.3.1 with self-signed macOS artifacts, so the affected Developer ID path has low immediate urgency. It should be completed before enabling Developer ID distribution.

The P1 review finding still blocks this patch: developer_id_signature_ok accepts any Developer ID team when expected_team=None, while all production updater callers continue to pass None. This removes effective matching against the expected publisher throughout preparation and installer revalidation. HTTPS, artifact digests, and Gatekeeper checks remain, but they do not supply the missing expected team identity.

The requested correction remains:

  1. Obtain the expected HiRoute publisher identity from trusted native/build configuration and pass it through every verification/revalidation entry. Preserve explicit rejection for missing configuration and mismatched teams. Any team rotation needs an explicit trusted transition rule.
  2. Test the actual production caller wiring, including valid expected-team acceptance, different-team rejection, unconfigured identity, and unchanged self-signed behavior.
  3. Validate the real macOS signature/Gatekeeper preparation and installation-revalidation paths. Current green CI and synthetic signature strings do not establish that upgrade journey; no real Developer ID package upgrade was executed in this review.

Recommendation: changes required before merge. The P1 label describes the trust-policy weakening introduced by the proposed fix, rather than a demonstrated P1 incident in the original report. The branch also remains behind main and requires the normal final checks and code-owner approval.

nillikechatchat and others added 2 commits October 29, 2026 04:38
…er-id-team

Signed-off-by: nillikechatchat <yuanhenglizhen2050@163.com>
Co-authored-by: monkeycode-ai <monkeycode-ai@chaitin.com>
…er-id-team

Signed-off-by: nillikechatchat <yuanhenglizhen2050@163.com>
Co-authored-by: monkeycode-ai <monkeycode-ai@chaitin.com>
@nillikechatchat

Copy link
Copy Markdown
Contributor Author

@johnlanni Publisher-identity follow-up is on 96ccc3e2 (merged onto upstream/main 2b4456f5). Wiring commit de24874c.

Download, revalidate and install now pass trusted_developer_id_team() (option_env!("HIROUTE_DEVELOPER_ID_TEAM")) into verify_desktop_app. Packaging compiles that TeamIdentifier from the signing identity; a candidate package cannot supply it. Unconfigured or empty team fails closed with UPGRADE_SIGNATURE_IDENTITY_UNCONFIGURED; a mismatched TeamIdentifier fails with PACKAGE_SIGNATURE_IDENTITY_MISMATCH. Controlled-trial adhoc signatures stay allowed.

Linux tests at 96ccc3e2:

  • cargo test --locked -p hiroute-host-runtime --lib -- developer_id — 2 passed
  • python3 scripts/test-package-desktop.py — 22 passed

This checkout has no macOS validation target, so Gatekeeper/spctl and a real Developer ID upgrade were not executed here. Hosted CI after this push is the remaining remote evidence. Human review remains the default.

This branch has not been deployed

No deployments
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.

[Bug] Developer ID Desktop updates always fail with UPGRADE_SIGNATURE_IDENTITY_UNCONFIGURED

2 participants