Repository navigation
Claude FMA: skip _mbsetupuser and report chown failures - #55151
Merged
Merged
Conversation
Reject _mbsetupuser even when it comes from the lastUserName fallback, and only log that ownership was assigned when chown succeeds.
fleet-release
approved these changes
Oct 8, 2026
allenhouchins
temporarily deployed
to
Docker Hub
October 8, 2026 18:14 — with
GitHub Actions
Inactive
Contributor
Script Diff Resultsee/maintained-apps/outputs/claude/darwin.json=== Install // 98321e4d -> 57886481 ===
--- /tmp/old.Ai1fY1 2026-10-08 18:15:36.314939418 +0000
+++ /tmp/new.ykbfo4 2026-10-08 18:15:36.314939418 +0000
@@ -122,9 +122,12 @@
# last user that logged in.
target_user=$(defaults read /Library/Preferences/com.apple.loginwindow lastUserName 2>/dev/null)
fi
-if [[ -n "$target_user" && "$target_user" != "root" ]] && id -u "$target_user" >/dev/null 2>&1; then
- sudo chown -R "$target_user":staff "$APPDIR/Claude.app"
- echo "Assigned ownership of Claude.app to '$target_user' so Claude can auto-update."
+if [[ -n "$target_user" && "$target_user" != "root" && "$target_user" != "_mbsetupuser" ]] && id -u "$target_user" >/dev/null 2>&1; then
+ if sudo chown -R "$target_user":staff "$APPDIR/Claude.app"; then
+ echo "Assigned ownership of Claude.app to '$target_user' so Claude can auto-update."
+ else
+ echo "Failed to assign ownership of Claude.app to '$target_user'; Claude will prompt the user to fix ownership before it can auto-update."
+ fi
else
echo "No logged-in (or last logged-in) user found; Claude.app stays owned by root and Claude will prompt the user to fix ownership before it can auto-update."
fi
=== Uninstall Script (no changes) === |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The user-visible bug fix is missing the required changes file.
1 open finding
What changed in this PR
Hardens Claude’s macOS maintained-app installer ownership handling.
Changes:
- Excludes
_mbsetupuserafter fallback user resolution. - Reports
chownfailures accurately and regenerates the manifest reference.
| File | Description |
|---|---|
claude-install.sh |
Improves ownership validation and failure reporting. |
darwin.json |
Embeds the regenerated installer script and hash. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This branch was previously deployed
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.

Related issue: N/A
Checklist for submitter
SELECT *is avoided, SQL injection is prevented (using placeholders for values in statements), JS inline code is prevented especially for url redirects, and untrusted data interpolated into shell scripts/commands is validated against shell metacharacters.Testing
Ran the ownership block with stubbed
stat/defaults/id/sudoacross five cases: console user, console user withchownfailing,_mbsetupuserfrom thelastUserNamefallback, a real user from the fallback, and no user. Each produced the expected command and message.bash -npasses andgo test ./ee/maintained-apps/...passes. Not run on a real Mac.AI
AI: Claude Code (claude-opus-5-5)
Summary
Applies two hardening fixes from the Wispr Flow FMA review (#54708) to the Claude FMA's install script, which uses the same ownership step (#51680):
_mbsetupuserafter thelastUserNamefallback, not only when it's the console user, so the bundle is never assigned to the Setup Assistant account.chownsucceeds. A failure logs a message but doesn't fail the install: the app is installed correctly, and a root-owned bundle is the behavior before chown Claude.app to console user so Claude Desktop auto-updates keep working #51680.Regenerated
ee/maintained-apps/outputs/claude/darwin.jsonwithgo run ./cmd/maintained-apps --slug=claude/darwin. Only the install script ref changed; the version, queries, and uninstall script are untouched.Summary by CodeRabbit