Repository navigation
Conversation
|
Nice catch on the underlying bug — the Two concerns before this merges: 1. The single-quote escape in "'\(url.path.replacingOccurrences(of: "'", with: "'\\\"'\\\"'"))'"The standard bash trick for embedding a single quote inside a single-quoted string is 2. There's no safety allow-list before Both concerns disappear if you reuse
An uninstall-aware allow-list could extend Two smaller things while you're in there:
Drafted with Claude Code; happy to send a follow-up PR on top of this one if useful. |
…ne for admin removal, add minimal uninstall allow-list, and tighten permission checks
|
Thanks, I fixed the quoting/injection issue by removing the ad-hoc osascript shell-building and now call CleaningEngine.cleanWithAdminPrivileges (inherits NUL+xargs staging and per-path re-validation). I also tightened permission checks and added a minimal uninstall allow-list for /Applications/.app, /var/db/receipts/.{plist,bom}, and /Library/Launch{Agents,Daemons}/*.plist. Happy to add a small test for quoted filenames or further tighten the allow-list if reviewers prefer |
Distinguishes Full Disk Access failures from administrator-required uninstall artifacts. - Routes narrow allow-listed uninstall artifacts (app bundles under /Applications and ~/Applications, package receipts under /var/db/receipts and /private/var/db/receipts, LaunchDaemons/LaunchAgents plists) through the existing administrator cleaner. - CleaningEngine re-validates each escalation path against the allow-list before invoking the privileged removal. - Hardens the AppleScript shell payload by single-quoting the temp-file path (no longer trusting NSTemporaryDirectory to be free of metacharacters). - AppState distinguishes missing-file, FDA-blocked, and admin-required failures, and the AppFilesView alert only offers the Open System Settings button when FDA is actually the blocker. Fixes #93. Closes #95, #97, #102. Supersedes #100.
|
Thanks for the patch and the fast turnaround on #93 / #95 / #97. Closing as superseded by #103, which landed first. For context on the choice — both PRs took the same approach (route permission-denied trash failures through the existing CleaningEngine admin path with a narrow allow-list for app bundles, package receipts, and launch plists). #103 went a bit further on three points that mattered for the merge:
The allow-list shape is identical, so the security envelope ends up in the same place. Really appreciate the contribution - please keep them coming. |
Distinguishes Full Disk Access failures from administrator-required uninstall artifacts. - Routes narrow allow-listed uninstall artifacts (app bundles under /Applications and ~/Applications, package receipts under /var/db/receipts and /private/var/db/receipts, LaunchDaemons/LaunchAgents plists) through the existing administrator cleaner. - CleaningEngine re-validates each escalation path against the allow-list before invoking the privileged removal. - Hardens the AppleScript shell payload by single-quoting the temp-file path (no longer trusting NSTemporaryDirectory to be free of metacharacters). - AppState distinguishes missing-file, FDA-blocked, and admin-required failures, and the AppFilesView alert only offers the Open System Settings button when FDA is actually the blocker. Fixes #93. Closes #95, #97, #102. Supersedes #100.
What does this PR do?
Addresses the issue where uninstalling apps fails, with a warning that FDA has not been granted, even though it has been.
It basically fixes the uninstall flow for protected items by retrying with administrator privileges when needed, treating missing files as already removed, and removing deleted apps from the list. Addresses issues #93, #95, #97.
Type of change
Testing
AI assistance disclosure
Drafted using Claude Code. Built the project locally to confirm my version compiles and the issue is addressed.