Skip to content

fix(desktop): inherit app TCC identity in sidecar entitlements#2785

Open
mattalldianhr wants to merge 1 commit into
block:mainfrom
mattalldianhr:fix/sidecar-tcc-identity-inherit
Open

fix(desktop): inherit app TCC identity in sidecar entitlements#2785
mattalldianhr wants to merge 1 commit into
block:mainfrom
mattalldianhr:fix/sidecar-tcc-identity-inherit

Conversation

@mattalldianhr

Copy link
Copy Markdown

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:

buzz-desktop           Identifier=xyz.block.buzz.app
buzz-acp               Identifier=buzz-acp              ← mismatch
buzz-agent             Identifier=buzz-agent            ← mismatch
buzz-dev-mcp           Identifier=buzz-dev-mcp          ← mismatch
buzz                   Identifier=buzz                  ← mismatch
git-credential-nostr   Identifier=git-credential-nostr  ← mismatch

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-acp invoking op (1Password CLI, which reads its own group container) produced ~110 consent prompts in 58 seconds. tccd logs DB Action:None on 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.

op is incidental. Any sidecar-spawned tool that touches another app's data hits this.

Implementation

Add com.apple.security.inherit to Entitlements.plist so child processes adopt the parent app's sandbox/TCC identity, letting a single grant cover the sidecars.

⚠️ Please verify before merging

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 tccd traces and a table of six ruled-out workarounds); the fix is not.

Specifically worth a maintainer's judgement:

  1. com.apple.security.inherit is primarily an App Sandbox inheritance mechanism. Buzz is hardened-runtime but not sandboxed, so it may be a no-op here.
  2. The more robust fix may be to sign the sidecars with the app's identifier (--identifier xyz.block.buzz.app) in block/apple-codesign-action, rather than relying on entitlement inheritance.
  3. If inherit is 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:

  1. Configure a managed agent that shells out to a tool reading another app's container (e.g. op read).
  2. Run the agent; click Allow once at the prompt.
  3. Expected: no further prompts, and Buzz appears in Privacy & Security › Files and Folders.
  4. Pre-fix: the prompt recurs on every invocation and Buzz never appears in that list.

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
@mattalldianhr
mattalldianhr requested a review from a team as a code owner July 24, 2026 23:13
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] macOS: sidecar code-signing identifier mismatch causes an unkillable TCC consent loop — Buzz never appears in Privacy & Security

2 participants