1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 18:34:46 +00:00

14 Commits

Author SHA1 Message Date
Andrei Murariu
e8f46a7a1c feat: Homebrew uninstall with --zap flag (#397)
Uninstalling mole with Zap will automatically remove also the directories that brew creates for it. -> More complete uninstallation

Also updated the test about uninstalling
2026-02-02 11:26:58 +08:00
tw93
3919a70300 fix: enhance uninstall security per audit review
- Validate bundle_id format (reverse-DNS) in stop_launch_services() to prevent glob injection attacks
    - Add common word exclusion list for LaunchAgents name search to avoid false positive matches (Music, Notes, Photos, etc.) - Add security comments explaining symlink handling in remove_file_list()
    - Improve brew_uninstall_cask() timeout handling: exit code 124 now returns failure immediately
    - Update SECURITY_AUDIT.md with remediation details
2026-01-26 20:27:46 +08:00
Tw93
587b127c01 chore: auto format code 2026-01-26 07:24:38 +00:00
tw93
864bade7c6 fix: improve uninstall guidance and timeouts 2026-01-26 15:22:16 +08:00
Tw93
fe296de814 chore: auto format code 2026-01-17 01:53:40 +00:00
Tw93
060c48c48d refactor: enhance uninstall safety and fix dock removal
- Add symlink/bundle_id/BOM validation to prevent injection attacks
- Fix Dock removal for /Applications symlink (use pwd not pwd -P)
- Fix brew uninstall test hanging (skip sudo in non-interactive mode)
- Remove unused SENSITIVE_DATA_REGEX
2026-01-17 09:49:42 +08:00
Tw93
7a46aa04db security: harden BOM processing and LaunchAgents detection
- Add path traversal protection in BOM receipt parsing
- Remove invalid ~/Library/LaunchDaemons path references
- Strengthen LaunchAgents matching (min 5 chars, exclude com.apple.*)
- Add 300s timeout to brew cask uninstall to prevent hangs
Addresses security review findings from V1.21.0 audit.
2026-01-17 09:08:41 +08:00
Tw93
a7ea5d94a0 chore: auto format code 2026-01-16 07:28:58 +00:00
Tw93
ffa46b03ee fix(uninstall): resolve hang during brew uninstall by exposing output and ensuring sudo 2026-01-16 12:54:21 +08:00
Tw93
2cecb881a9 docs: update SECURITY_AUDIT for receipt processing safety
- Document /private path exceptions for safe cleanup
- Add receipt file filtering details
- Auto-format shell scripts (shellcheck)
2026-01-15 21:02:13 +08:00
Tw93
30547c9c4c refactor(uninstall): enhance login item removal and brew UI
- Escape quotes/backslashes in app names for AppleScript safety
- Silence osascript stdout to prevent output noise
- Capture brew uninstall output to avoid spinner corruption
- Log brew errors to debug_log for troubleshooting
2026-01-15 15:13:51 +08:00
Tw93
7b14a3abd8 feat(uninstall): enhance brew UX and auto-cleanup dependencies
- Auto-run 'brew autoremove' after uninstalling casks
- Fix spinner interference during brew operations
- Add safety check for cask token detection
2026-01-15 14:31:36 +08:00
Tw93
dbf036fdaa refactor: simplify brew.sh with native macOS tools
- resolve_path: use realpath (macOS 12.3+) instead of python3/perl
- deduplicate tokens with sort -u instead of manual loop
- reuse _extract_cask_token_from_path in symlink check
- simplify brew_uninstall_cask boolean logic

Reduces 88 lines (281 → 193)
2026-01-15 14:05:42 +08:00
Jack Phallen
d884a268e8 fix(uninstall): Harden brew uninstall 2026-01-14 09:17:41 -05:00