fix: uninstall protected items with admin fallback#100
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 |
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.