1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 19:44:44 +00:00
Commit Graph

1386 Commits

Author SHA1 Message Date
Tw93
9b738488ec Delete AGENTS.md 2026-01-19 12:23:22 +08:00
Tw93
7a5bdac385 feat: add uptime display to status header (#329)
Show system uptime in the header row with a concise format (e.g., "up 1d 5h").
Simplify title from "Mole Status" to "Status" for better fit.
2026-01-18 16:52:44 +08:00
Tw93
72f42a363e chore: remove redundant sensors card and bump version to 1.22.1
- Disable sensors data collection (CPU temp already shown in CPU card)
- Remove unused sensor-related functions (collectSensors, prettifyLabel, hasSensorData, renderSensorsCard)
- Remove unused gopsutil/sensors import
- Fix inline spinner disown call with explicit PID
- Update version from 1.22.0 to 1.22.1
- Update SECURITY_AUDIT.md to match new version and date
V1.22.1
2026-01-17 10:46:11 +08:00
Tw93
d39d787c83 update test 2026-01-17 10:25:00 +08:00
Tw93
3672000779 update test 2026-01-17 10:20:58 +08:00
Tw93
ceddbe889f Merge branch 'main' of github.com:tw93/Mole 2026-01-17 10:14:43 +08:00
Tw93
f05441344a publish 1.22.0 2026-01-17 10:14:39 +08:00
Tw93
46472bc86e chore: auto format code 2026-01-17 02:13:54 +00:00
Tw93
e6fc0613d5 perf: improve cleanup UI responsiveness and reduce visual flicker
- Speed up spinner animation from 100ms to 50ms for smoother visuals
- Fix spinner flicker by deferring stop until output is ready
- Remove unnecessary 'Preparing...' spinner at section start
- Hide whitelist-protected items from output (Trash, Finder metadata)
- Add spinner feedback for system diagnostic log cleanup
- Remove redundant stop_section_spinner calls in cleanup modules

The cleanup process now feels significantly faster and more polished,
with continuous visual feedback and no jarring gaps between operations.
2026-01-17 10:12:23 +08:00
Tw93
b9072c2389 chore: auto format code 2026-01-17 01:59:47 +00:00
Tw93
234dad5531 Merge branch 'main' of github.com:tw93/Mole 2026-01-17 09:58:13 +08:00
Tw93
bacc782e41 ShellCheck SC2001 Warning 2026-01-17 09:58:08 +08:00
Tw93
fe296de814 chore: auto format code 2026-01-17 01:53:40 +00:00
github-actions[bot]
1534018974 chore: update contributors [skip ci] 2026-01-17 01:50:08 +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
12cacaa6cc refactor: enhance pattern detection and symlink safety
- Expand sensitive data patterns (credentials, cloud configs, media folders)
- Add symlink target validation in path deletion checks
- Remove shared Gradle cache from Android Studio cleanup
2026-01-17 09:09:11 +08:00
Tw93
51abd890bc fix: improve Dock cleanup path handling
- Add control character validation
- Use canonical paths (pwd -P) for better resolution
- Strengthen fallback logic for deleted applications
- Add empty path guards
2026-01-17 09:09:02 +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
4fb754e927 Merge pull request #326 from bikraj2/fix/unchecked_history_addition
fix(history): prevent adding multiple history entries with same path when scanning
2026-01-17 08:24:36 +08:00
Tw93
a8a9b2f4f6 Merge branch 'main' into dev 2026-01-17 08:22:02 +08:00
github-actions[bot]
871b1d7eda chore: update contributors [skip ci] 2026-01-17 00:21:39 +00:00
Tw93
6f2c8b7f78 Merge pull request #327 from alexandear-org/chore/update-gopsutil-v4
chore(deps): bump shirou/gopsutil from v3 to v4
2026-01-17 08:21:19 +08:00
github-actions[bot]
c95f2986f4 chore: update contributors [skip ci] 2026-01-17 00:18:28 +00:00
Tw93
34cfe962d7 Merge pull request #328 from alexandear-org/chore/format-code
chore: format code; fix lint issues
2026-01-17 08:18:11 +08:00
Oleksandr Redko
9b16601117 chore: format code; fix lint issues 2026-01-16 17:39:05 +02:00
Oleksandr Redko
a589b9f2e1 chore(deps): bump shirou/gopsutil from v3 to v4 2026-01-16 17:23:00 +02:00
bikraj2
c99535c2d7 fix(history): prevent adding multiple history entries with same path when scanning 2026-01-16 19:28:32 +05:30
Tw93
a7ea5d94a0 chore: auto format code 2026-01-16 07:28:58 +00:00
Tw93
d8217235bd chore: clean up dev comments and remove AI-style formatting from README 2026-01-16 15:26:15 +08:00
Tw93
8cc39585ea feat: improve network status graph with sparklines and responsive width 2026-01-16 14:50:10 +08:00
github-actions[bot]
00b0939359 chore: update contributors [skip ci] 2026-01-16 06:39:46 +00:00
Tw93
7e42fa3d17 Merge pull request #321 from iamxorum/network_graph
`mo status`: improve network graph
2026-01-16 14:39:29 +08:00
Tw93
d26d24f4e3 Merge branch 'dev' into network_graph 2026-01-16 14:39:09 +08:00
Tw93
1b725555e5 Merge branch 'dev' of github.com:tw93/Mole into dev 2026-01-16 13:02:12 +08: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
7294ef65a1 feat(ui): allow arrow keys and space during search filtering
- Modified FORCE_CHAR mode in read_key() to recognize arrow keys and space
- Users can now navigate and select items while typing in search mode
- Improves UX by eliminating need to press Enter before selecting
- ESC key still works to cancel search

This restores V1.19.0 behavior where navigation worked during search
2026-01-16 11:17:26 +08:00
Tw93
ae95512560 fix(ui): restore real-time search filtering in paginated menu
- Previous perf optimization (318c67f) broke real-time search by removing rebuild_view call
- Now calls rebuild_view and triggers full redraw when typing/deleting
- Uses 'continue' to skip drain_pending_input, preserving fast typed characters
- Fixes issue where only first character was effective in search
2026-01-16 10:51:36 +08:00
Tw93
60ee0e1f9c feat(uninstall): add progress spinner for brew autoremove
- Show 'Checking brew dependencies...' spinner while running brew autoremove
- Prevents user confusion when brew cleanup takes time after uninstall
- Improves UX by providing visual feedback during dependency cleanup
2026-01-16 10:26:46 +08:00
Tw93
d29a0f828b fix(uninstall): fix Dock cleanup by using correct PlistBuddy path
- Changed from `command -v PlistBuddy` to `[[ -x /usr/libexec/PlistBuddy ]]`
- PlistBuddy is not in PATH, it's at /usr/libexec/PlistBuddy on macOS
- Previous code would always return early, making Dock cleanup never work
- Also improved fallback logic for already-deleted apps
- Tested and verified Dock icons are now properly removed after uninstall
2026-01-16 10:19:38 +08:00
github-actions[bot]
5a04bf145d chore: update contributors [skip ci] 2026-01-16 02:10:32 +00:00
Tw93
444bc3a70a chore: auto format code 2026-01-16 02:00:46 +00:00
Tw93
06342de24f security: restrict BOM whitelist to prevent shared component deletion
- Removes shared directories (Frameworks, Plugins, etc) from receipt scanning whitelist
- Ensures that uninstalling an app won't accidentally delete shared system libraries
- Updates SECURITY_AUDIT.md to reflect stricter receipt scanning policy
2026-01-16 09:54:36 +08:00
Tw93
93953abad6 fix: remove insecure empty folder cleanup logic to prevent critical data loss (#320)
- Removes clean_empty_library_items functionality that incorrectly deleted critical paths (e.g., Postgres data, Steam locks)
- Cleans up associated tests and unnecessary protection rules
- Ensures empty folders are preserved by default for safety
2026-01-15 21:24:38 +08:00
Tw93
eb717e558e test: source brew uninstall helpers 2026-01-15 21:11:34 +08:00
Tw93
377f777184 test: remove outdated empty files assertion from clean_empty_library_items test
The clean_empty_library_items function intentionally skips empty file cleanup
to avoid removing app sentinel files (as noted in lib/clean/user.sh:77).
Updated the test to only verify empty folder cleanup, matching current behavior.
2026-01-15 21:06:59 +08:00
Tw93
f3dfec32c9 Merge branch 'dev' of github.com:tw93/Mole into dev 2026-01-15 21:05:25 +08:00
Tw93
c2eb73b213 fix: correct pnpm store default path
- Change pnpm store path from incorrect ~/.pnpm-store to correct ~/Library/pnpm/store
- The default pnpm store location on macOS is ~/Library/pnpm/store
- Fixes #319
2026-01-15 21:04:54 +08:00
Tw93
c9b110b882 fix: 修正 pnpm store 默认路径
- 将 pnpm store 路径从错误的 ~/.pnpm-store 改为正确的 ~/Library/pnpm/store
- macOS 上 pnpm 的默认 store 位置是 ~/Library/pnpm/store
- Fixes #319
2026-01-15 21:03:54 +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
7dc854cf30 fix(uninstall): enhance receipt file processing safety and prevent system file deletion
CRITICAL SECURITY FIX

Enhanced the receipt file parsing in uninstall operations to prevent
accidental deletion of critical system files while maintaining deep
cleanup capabilities.

Changes:
- Tightened whitelist in find_app_receipt_files() to exclude /Users/*,
  /usr/*, and /opt/* broad patterns
- Added explicit blacklist for /private/* with safe exceptions for
  logs, temp files, and diagnostic data
- Integrated should_protect_path() check for additional protection
- Added file deduplication with sort -u to prevent duplicate deletions
- Removed dry-run feature from batch uninstall (unused entry point)

Path Protection:
 Blocked: /etc/passwd, /var/db/*, /private/etc/*, all system binaries
 Allowed: /Applications/*, specific /Library/* subdirs, safe /private/* paths
 Additional: Keychain files, system preferences via should_protect_path()

This fixes a critical security issue where parsing .bom receipt files
could result in deletion of system files like /etc/passwd and /var/db/*,
leading to system corruption and data loss.

Affects: V1.12.14 and later versions
Testing: Validated against critical system paths, all blocked correctly
2026-01-15 21:01:11 +08:00