Sign sbd with a stable identity so a Full Disk Access grant survives updates
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
Research direction
Start with bin/build, bin/update, and the launch agent setup for com.haacked.switchboard.sbd; inspect how the app and binaries are signed and how the tmux server starts. The proposal also calls for README changes and possibly SMAppService registration with AssociatedBundleIdentifiers. Done means a Full Disk Access grant remains effective after bin/update, with the restart steps documented.
Written by the indexing model from the issue text.
Description
A command run in a Switchboard shell can't read files that macOS protects with Full Disk Access, and there's no lasting way to grant that access.
Example: bin/hogli metabase:login --region eu --browser chrome in a Switchboard shell fails with "chrome cookie data can't be read (the OS is blocking this terminal from it)". The same command works in a terminal app that has Full Disk Access.
Why: Switchboard's shells and sessions run in a tmux server that sbd starts. sbd runs as the launch agent com.haacked.switchboard.sbd, so macOS treats sbd as the process responsible for those shells, not the app or the user's terminal. Both Switchboard.app and Contents/MacOS/sbd are ad-hoc signed (codesign -dv shows Signature=adhoc, no team identifier, and an sbd-<hash> identifier for sbd). macOS ties a privacy grant for an ad-hoc signed binary to that exact build. So a user could add sbd under Full Disk Access, but the next bin/update builds a new binary and the grant stops applying.
Proposal:
- Sign Switchboard.app, sbd and sb with a stable identity in
bin/buildandbin/update: an Apple Development or Developer ID certificate when one is in the keychain, or otherwise a self-signed code-signing certificate that the build creates once and reuses. Give sbd a fixed identifier, such ascom.haacked.switchboard.sbd. - Consider registering sbd with
SMAppServiceandAssociatedBundleIdentifiers, so macOS attributes sbd to Switchboard.app. Then one Full Disk Access grant on the app covers sbd and the shells it starts. - Document in the README how to grant Full Disk Access, and that sbd and the tmux server have to restart afterwards.
- Check that a grant survives a
bin/update.
- Dominant language
- Swift
- Stars
- 0
- Forks
- 0
- Avg merge
- 6h 15m
- Merged PRs (30d)
- 308
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from haacked/switchboard
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
haacked/switchboard#420 ·
Maintainers usually reply within 1 day
-
priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
haacked/switchboard#403 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
haacked/switchboard#395 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
haacked/switchboard#391 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 66/100
haacked/switchboard#419 ·
Maintainers usually reply within 1 day
All issues in haacked/switchboard
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Enzoo404/gravitybox#21 ·
Maintainers usually reply within 1 day
-
area: sidebar enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ZigaoWang/zigzag#351 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
manaflow-ai/cmux#46584 ·
Maintainers usually reply within 1 day
-
android:core ios:core
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day