Assessment Date: December 25, 2025 Assessed Version: V1.14.4 (commit b09b771) Assessor: Claude (Anthropic AI) Assessment Scope: Full codebase review for malicious code, backdoors, data exfiltration, botnet indicators, and security vulnerabilities
Risk Level: LOW
Mole is a legitimate macOS system cleanup and optimization tool. After comprehensive analysis of all source code, shell scripts, Go code, and compiled binaries, no evidence of malicious intent was found. The codebase demonstrates security-conscious design with multiple defensive layers protecting against accidental or intentional harm to the user's system.
The following security vectors were analyzed:
- Data Exfiltration - Network communications, telemetry, analytics
- System Access - Privilege escalation, unauthorized file access
- Persistence Mechanisms - Botnet indicators, C2 communication, auto-start
- Code Integrity - Obfuscated code, hidden functionality, backdoors
- Dependency Analysis - Third-party libraries, supply chain risks
- Binary Verification - Compiled Go binaries vs source code alignment
| Finding | Status |
|---|---|
| External API calls | SAFE - Only GitHub API for version checks |
| Telemetry/Analytics | NONE FOUND |
| Data upload endpoints | NONE FOUND |
| C2 (Command & Control) | NONE FOUND |
Details:
- The only network communication is a single
curlcall tohttps://api.github.com/repos/tw93/mole/releases/latestfor version checking (lib/check/all.sh:302) - Installation script downloads from official GitHub repository only
- No hidden endpoints, beacons, or phone-home functionality detected
| Finding | Status |
|---|---|
| Sudo usage | LEGITIMATE - System cleanup requires elevated privileges |
| PAM modification | OPT-IN ONLY - Touch ID configuration is user-initiated |
| System file access | PROTECTED - Critical paths are explicitly blocked |
Details:
- Sudo access is used legitimately for system-level cleanup (e.g.,
/Library/Caches) bin/touchid.shmodifies/etc/pam.d/sudobut only when explicitly requested by user- PAM changes are reversible and create backups (
.mole-backup) - No password harvesting or credential theft mechanisms
The codebase implements a multi-layer defense system in lib/core/file_ops.sh:
Layer 1 - Path Validation:
- Rejects empty paths
- Enforces absolute paths only
- Blocks path traversal (
..) - Filters control characters
Layer 2 - Critical Path Protection (Iron Dome):
Blocked directories: /, /bin, /sbin, /usr, /usr/bin, /usr/sbin,
/etc, /var, /System, /System/*, /Library/Extensions
Layer 3 - Symlink Failsafe:
- Sudo operations refuse to delete symbolic links
- Prevents symlink-based attacks redirecting to system files
| Indicator | Status |
|---|---|
| LaunchAgent creation | NONE - Only unloads existing agents during app removal |
| Cron job installation | NONE FOUND |
| Login item creation | NONE FOUND |
| Background daemons | NONE - No persistent background processes |
| Self-replication | NONE FOUND |
Details:
- The tool operates as a one-time CLI invocation only
- No mechanisms to survive reboots or maintain persistence
- LaunchAgent operations are limited to unloading agents during app uninstallation
Go Dependencies (go.mod):
| Package | Purpose | Risk |
|---|---|---|
| charmbracelet/bubbletea | Terminal UI | LOW - Well-known, audited |
| charmbracelet/lipgloss | UI styling | LOW - Same vendor |
| shirou/gopsutil | System metrics | LOW - Standard metrics lib |
| golang.org/x/sync | Concurrency | LOW - Official Go package |
| cespare/xxhash | Hashing | LOW - Performance hashing |
All dependencies are well-established, open-source packages with active maintenance. No malicious or abandoned packages detected.
Shell Dependencies:
- Standard macOS binaries only (
plutil,tmutil,dscacheutil,bioutil) - No downloads of external scripts at runtime
Compiled Go binaries:
bin/analyze-go: Mach-O universal binary (x86_64 + arm64) - 7.3 MBbin/status-go: Mach-O universal binary (x86_64 + arm64) - 7.4 MB
Source-to-binary verification:
- Go source code in
cmd/analyze/andcmd/status/matches expected functionality - No evidence of additional hidden code in binaries beyond Go source
- Build scripts (
scripts/build-analyze.sh,scripts/build-status.sh) are transparent
| Indicator | Status |
|---|---|
| Base64-encoded payloads | SAFE - Only used for file list encoding in batch operations |
| Encrypted strings | NONE FOUND |
| Eval/exec of remote code | NONE FOUND |
| Obfuscated variable names | NONE FOUND |
- Risk: Modifying
/etc/pam.d/sudocould theoretically weaken security - Mitigation: This is an opt-in feature that adds Touch ID authentication (pam_tid.so), which is an Apple-provided module. The modification follows Apple's documented approach.
- Risk: The tool can delete many user files
- Mitigation:
- Multiple validation layers prevent system damage
- Dry-run mode (
--dry-run) allows preview - User whitelist support (
~/.config/mole/whitelist) - 60-day dormancy rule for orphan detection
- Risk: Maintains sudo session in background
- Mitigation: Standard pattern for long-running administrative tools. Session cleanup is registered on exit.
- Cleans caches, logs, and temporary files
- Uninstalls applications and their associated data
- Monitors system health metrics
- Analyzes disk usage interactively
- Optionally configures Touch ID for sudo
- Collect or transmit user data
- Install persistent background processes
- Create backdoors or remote access
- Harvest credentials or sensitive information
- Communicate with external servers (except GitHub version check)
- Modify system files beyond explicit user-requested operations
SAFE TO USE - Mole is a legitimate system maintenance tool with security-conscious design. The codebase shows evidence of defensive programming practices and respect for user privacy. No indicators of malicious intent, data exfiltration, or system compromise were found.
Users should:
- Review the dry-run output before first use
- Understand that the tool requires sudo for system-level cleanup
- Be aware that Touch ID configuration modifies PAM settings (reversible)
This assessment was performed through static code analysis. Dynamic runtime analysis was not conducted. The assessment reflects the state of the codebase as of the assessment date.