fix(desktop): require passkey signing material only when Clerk is configured - #8136
fix(desktop): require passkey signing material only when Clerk is configured#8136Xalior wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…figured Signed macOS builds resolved the passkey signing configuration unconditionally, so they demanded a provisioning profile and either an RP domain or a Clerk publishable key. All three serve passkey sign-in, which serves T3 Connect, so a build with cloud features disabled was refused for material it had no use for. .env.example says the cloud identifiers are optional and that removing them builds with cloud features disabled. That held for unsigned builds only, and a signed build is the only kind that can auto-update. The error named a provisioning profile and mentioned neither Clerk nor T3 Connect, so it did not lead anywhere useful. The gate accepts either source of an RP domain, matching resolveMacPasskeySigningConfiguration, which takes explicit domains in preference to deriving one from the publishable key. Verified by building a signed macOS artifact with only T3CODE_APPLE_TEAM_ID set: it now completes, is signed by a Developer ID identity, and carries no associated-domains entitlement. Co-Authored-By: Claude Fable 5.0 <noreply@anthropic.com>
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This change alters signed macOS artifact generation by conditionally including passkey authentication entitlements based on Clerk configuration. Although the diff is small and focused, authentication-sensitive behavior in shipped artifacts warrants human review. You can add or adjust custom eligibility rules. Learn more. |
531ba62 to
2d9eadb
Compare
A signed macOS build resolves the passkey signing configuration unconditionally, so it demands
T3CODE_MACOS_PROVISIONING_PROFILEand eitherT3CODE_CLERK_PASSKEY_RP_DOMAINSorT3CODE_CLERK_PUBLISHABLE_KEY. All three serve passkey sign-in, which serves T3 Connect. With cloud features off there is no domain for the Associated Domains entitlement to claim, but the build still refuses..env.examplesays the cloud identifiers are optional and that removing them builds with cloud features disabled. That holds for unsigned builds only, and a signed build is the only kind that can auto-update. The failure names a provisioning profile and mentions neither Clerk nor T3 Connect, so it does not lead anywhere useful.The fix gates the passkey configuration on
T3CODE_CLERK_PUBLISHABLE_KEY. That key is the root of the chain, andresolveMacPasskeySigningConfigurationalready derives the RP domain from it. With a key present nothing changes.Testing
Built a signed macOS artifact from this branch with only
T3CODE_APPLE_TEAM_IDset. It completes, the app is signed by a Developer ID identity, andcodesign -d --entitlementsshows noassociated-domainsentry. Before the change the same build threwMissingMacPasskeyProvisioningProfileErrorimmediately after staging.vp run --filter scripts typecheckis clean.vp test run scripts/build-desktop-artifact.test.tsgives 48 passed and 1 failed; that one failure, "skips the primary native probe for cross-architecture Windows payloads", also fails on an unmodified checkout ofmain, so it is not from this change.Written by Claude Fable 5.0 running as an agent in Claude Code.
Note
Medium Risk
Changes when signed mac builds apply passkey entitlements; misconfigured CI (signed mac + Clerk expected but env vars missing) would skip Associated Domains signing instead of failing loudly.
Overview
Signed macOS desktop builds no longer always resolve passkey signing (Associated Domains provisioning profile + Clerk RP domains). In
buildDesktopArtifact, passkey setup now runs only when the build is mac, signing is enabled, andT3CODE_CLERK_PUBLISHABLE_KEYorT3CODE_CLERK_PASSKEY_RP_DOMAINSis set in repo env.Repo env is loaded once as
repoEnvForSigningand passed intoresolveMacPasskeySigningConfigurationinstead of callingloadRepoEnvinside the resolver path. Signed mac builds without Clerk/T3 Connect config can complete with Developer ID signing and without passkey entitlements, matching optional cloud identifiers in.env.example.Reviewed by Cursor Bugbot for commit 2d9eadb. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Require passkey signing material only when Clerk env vars are set in
buildDesktopArtifactUpdates the mac signed build path so
resolveMacPasskeySigningConfigurationruns only whenT3CODE_CLERK_PUBLISHABLE_KEYorT3CODE_CLERK_PASSKEY_RP_DOMAINSis present. Repo environment variables are loaded once intorepoEnvForSigningand reused for both the configuration check and the resolution call.Macroscope summarized 2d9eadb.