fix(desktop): inherit app TCC identity in sidecar entitlements#2785
Open
mattalldianhr wants to merge 1 commit into
Open
fix(desktop): inherit app TCC identity in sidecar entitlements#2785mattalldianhr wants to merge 1 commit into
mattalldianhr wants to merge 1 commit into
Conversation
Sidecars ship as loose executables in `Contents/MacOS/` and are signed
with their own code-signing identifiers rather than the app's:
buzz-desktop Identifier=xyz.block.buzz.app
buzz-acp Identifier=buzz-acp
buzz-agent Identifier=buzz-agent
buzz-dev-mcp Identifier=buzz-dev-mcp
buzz Identifier=buzz
git-credential-nostr Identifier=git-credential-nostr
When a sidecar spawns a subprocess that triggers a TCC-gated access, the
consent prompt is raised under the sidecar's identity. The user's "Allow"
is recorded against `xyz.block.buzz.app`, so the next request — arriving
under a different identity — prompts again. `tccd` logs `DB Action:None`
on every request: no decision is ever persisted.
The result is an unkillable consent loop, and Buzz never appears in
System Settings > Privacy & Security > Files and Folders, so there is no
way to grant the permission manually.
Add `com.apple.security.inherit` so child processes adopt the app's
sandbox/TCC identity and a single grant covers the sidecars.
Refs block#2783
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2783.
Problem
Sidecars ship as loose executables in
Contents/MacOS/and are signed with their own code-signing identifiers rather than the app's:When a sidecar spawns a subprocess that triggers a TCC-gated access, macOS raises the consent prompt under the sidecar's identity. The user's "Allow" is recorded against
xyz.block.buzz.app, so the next request — arriving under a different identity — prompts again, indefinitely.Observed in the wild: a managed agent under
buzz-acpinvokingop(1Password CLI, which reads its own group container) produced ~110 consent prompts in 58 seconds.tccdlogsDB Action:Noneon every request — no decision is ever persisted — and Buzz never appears in System Settings › Privacy & Security › Files and Folders, so the permission cannot be granted manually.opis incidental. Any sidecar-spawned tool that touches another app's data hits this.Implementation
Add
com.apple.security.inherittoEntitlements.plistso child processes adopt the parent app's sandbox/TCC identity, letting a single grant cover the sidecars.I could not test this. Verifying it requires a signed + notarized build from the release pipeline, which I can't produce locally. The diagnosis is thoroughly confirmed (see #2783 for the
tccdtraces and a table of six ruled-out workarounds); the fix is not.Specifically worth a maintainer's judgement:
com.apple.security.inheritis primarily an App Sandbox inheritance mechanism. Buzz is hardened-runtime but not sandboxed, so it may be a no-op here.--identifier xyz.block.buzz.app) inblock/apple-codesign-action, rather than relying on entitlement inheritance.inheritis honored, it may require the sidecars to also carry it, or to be signed as part of the parent bundle.I'd suggest whoever owns the signing pipeline confirm which mechanism applies before this ships. Happy to close this in favour of a pipeline-side fix.
How to test
On a signed build:
op read).