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

1502 Commits

Author SHA1 Message Date
tw93
e96868824b feat: clean Apple Podcasts zombie StreamedMedia files (#387)
Add cleanup for sandboxed container tmp directory where zombie sparse
files can accumulate (0-byte files with ~93MB pre-allocated APFS blocks).
2026-01-30 11:19:51 +08:00
tw93
d06cf6a69e fix: correct blue color definition in base.sh 2026-01-30 11:13:29 +08:00
tw93
47ce6b0c50 Fix the issue with automated testing 2026-01-30 11:06:54 +08:00
tw93
87f605e9a8 test: add tests for cmd/status and conclude merge 2026-01-30 10:59:09 +08:00
Dylan Joss
b8e15b1c16 test: add tests for parsing and filtering functions (#385)
Add unit tests for parsing functions in `cmd/status/view_test.go`:
- `parseInt`: parses integers from strings with padding/decimals
- `parseRefreshRate`: parses display refresh rates from system output
- `isNoiseInterface`: filters noise network interfaces
- `parsePMSet`: parses macOS pmset battery output

Coverage for `cmd/status` improved from 8.4% to 12.6%.
2026-01-29 11:40:00 +08:00
tw93
d2e6917cce update supporters 2026-01-29 11:37:15 +08:00
tw93
3a7f15aa32 fix(check): use numeric df output for disk space 2026-01-29 11:15:14 +08:00
tw93
0a46bf2077 fix: improve status icons and fix spinner cleanup
- Show ✓ for empty trash and discovered versions (normal states)
- Fix inline spinner not stopping, causing residual display artifacts
2026-01-28 20:15:26 +08:00
tw93
88da841ce9 refactor: remove mo log command, keep log recording only 2026-01-28 19:58:59 +08:00
Tw93
c12f76c9f3 chore: auto format code 2026-01-28 11:46:59 +00:00
tw93
64f79a59d8 feat: optimize log system and add mo log command
- Add get_timestamp() helper and optimize log rotation
- Create mo log viewer with search/filter capabilities
- Improve test coverage to 18.4% with better assertions
- Add security fixes for grep injection prevention
2026-01-28 19:46:01 +08:00
Dylan Joss
f815a5f28c test: add tests for byte formatters and disk helpers (#382)
Add unit tests for additional utility functions in `cmd/status/view_test.go`:
- `humanBytes`: byte formatting with decimals and units
- `humanBytesCompact`: compact byte formatting
- `splitDisks`: separates internal/external disks
- `diskLabel`: generates numbered disk labels

Coverage for cmd/status improved from 6.9% to 8.4%.
2026-01-28 19:12:04 +08:00
tw93
52ba523579 fix(install): clear quarantine attribute after downloading binaries (#381) 2026-01-28 19:07:08 +08:00
tw93
6f0255c56e fix(uninstall): enhance app leftover detection with naming variants (#377) 2026-01-28 19:06:52 +08:00
tw93
ab4433d9c0 Merge branch 'main' of https://github.com/tw93/Mole 2026-01-28 11:43:41 +08:00
tw93
61a3238f19 fix(scan): prevent hang on cyclic symlinks (#378, #379) 2026-01-28 11:43:39 +08:00
Tw93
6036b4606c chore: auto format code 2026-01-28 03:26:51 +00:00
tw93
211fd21e10 Merge branch 'main' into dev 2026-01-28 11:25:33 +08:00
github-actions[bot]
87a24a0b3b chore: update contributors [skip ci] 2026-01-28 03:25:26 +00:00
Dylan Joss
a9c5794ec4 test: add tests for utility functions and heap implementations (#380)
Add unit tests for utility functions in cmd/status/view_test.go:
- formatRate: MB/s rate formatting with adaptive precision
- shorten: string truncation with ellipsis
- humanBytesShort: byte formatting with binary units

Add unit tests for heap implementations in cmd/analyze/heap_test.go:
- entryHeap: min-heap for dirEntry (basic ops, empty, single element)
- largeFileHeap: min-heap for fileEntry (basic ops, top N pattern)
2026-01-28 11:25:08 +08:00
tw93
7760b36c74 Update Security Review 2026-01-27 20:22:30 +08:00
tw93
8b9436e244 feat(check): detect third-party firewalls before built-in check
(#374)

    Support Little Snitch, LuLu, Radio Silence, Hands Off!, Murus, Vallum.
2026-01-27 20:04:29 +08:00
github-actions[bot]
54259d6df1 chore: update contributors [skip ci] 2026-01-27 11:43:12 +00:00
Gokul
9a109b2b39 fix(clean): handle singular 4K movie summary (#376) 2026-01-27 19:42:54 +08:00
github-actions[bot]
736bca14b5 chore: update contributors [skip ci] 2026-01-27 03:34:41 +00:00
tw93
37e6994c34 feat(clean): add Yandex Browser cache cleanup support 2026-01-27 11:34:21 +08:00
github-actions[bot]
9cd47133d1 chore: update contributors [skip ci] 2026-01-27 03:19:54 +00:00
github-actions[bot]
c53a0afc67 chore: update contributors [skip ci] 2026-01-27 03:19:45 +00:00
tw93
3f5e450001 Merge branch 'main' into dev 2026-01-27 11:19:18 +08:00
tw93
92de429817 update readme 2026-01-27 10:43:33 +08:00
tw93
9bb255238d update readme 2026-01-27 10:42:58 +08:00
tw93
1cf772b02c update readme 2026-01-27 10:41:38 +08:00
tw93
8c5d529171 update readme 2026-01-27 10:41:18 +08:00
tw93
fca0fe1b15 update readme 2026-01-27 10:38:53 +08:00
tw93
86c9005381 Merge branch 'dwjoss/cleanable-tests' of https://github.com/dwjoss/Mole; branch 'main' of https://github.com/tw93/Mole 2026-01-27 10:30:43 +08:00
github-actions[bot]
d8fb34b79c chore: update contributors [skip ci] 2026-01-27 02:30:32 +00:00
Dylan Joss
db0b785842 test: expand cleanable directory detection tests (#369)
Enhance test coverage for `isCleanableDir` and add new tests for
`isHandledByMoClean` in `cmd/analyze/analyze_test.go`.

`TestIsHandledByMoClean` (new, 12 test cases):
- Paths `mo clean` handles (caches, logs, saved state, trash, reports)
- Paths `mo clean` does NOT handle (project dirs, home, random)
- Case sensitivity verification

`TestIsCleanableDir` (expanded from 3 to 24 test cases):
- Project dependencies (`node_modules`, `venv`, `pycache`, `build`, etc.)
- Xcode/iOS directories (DerivedData, Pods)
- Build outputs (dist, target, .next, coverage)
- Paths excluded because `mo clean` handles them
- Edge cases (empty string, root path, just basename)
2026-01-27 10:30:11 +08:00
tw93
0fe72245ce docs: rewrite SECURITY_AUDIT.md as technical reference 2026-01-27 10:22:07 +08:00
Andrei Murariu
ac79773965 README: mo analyze - update the netowkr graph (#366)
continued the PR - https://github.com/tw93/Mole/pull/321
2026-01-27 10:04:49 +08:00
Dylan Joss
162ba949ee test: expand cleanable directory detection tests
Enhance test coverage for `isCleanableDir` and add new tests for
`isHandledByMoClean` in `cmd/analyze/analyze_test.go`.

`TestIsHandledByMoClean` (new, 12 test cases):
- Paths `mo clean` handles (caches, logs, saved state, trash, reports)
- Paths `mo clean` does NOT handle (project dirs, home, random)
- Case sensitivity verification

`TestIsCleanableDir` (expanded from 3 to 24 test cases):
- Project dependencies (`node_modules`, `venv`, `pycache`, `build`, etc.)
- Xcode/iOS directories (DerivedData, Pods)
- Build outputs (dist, target, .next, coverage)
- Paths excluded because `mo clean` handles them
- Edge cases (empty string, root path, just basename)
2026-01-26 14:05:02 -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
09f0cf9e53 chore: auto format code 2026-01-26 07:46:58 +00:00
tw93
b67d149cef Merge branch 'main' of https://github.com/tw93/Mole 2026-01-26 15:46:05 +08:00
tw93
0fbf88a6c6 fix: harden cleanup path validation 2026-01-26 15:43:11 +08:00
Tw93
f272d29490 chore: auto format code 2026-01-26 07:32:44 +00:00
tw93
43a92a1847 Merge branch 'main' of https://github.com/tw93/Mole 2026-01-26 15:31:43 +08:00
tw93
981c79cfd1 fix: clear cleaning spinner after cleanup 2026-01-26 15:31:30 +08:00
Tw93
587b127c01 chore: auto format code 2026-01-26 07:24:38 +00:00
tw93
610a4fc0a7 chore: simplify optimize maintenance cleanup 2026-01-26 15:22:20 +08:00
tw93
864bade7c6 fix: improve uninstall guidance and timeouts 2026-01-26 15:22:16 +08:00