Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
0e70295
feat: scaffold Python package structure
jgamblin Apr 12, 2026
5868094
chore: add .gitignore and remove egg-info from tracking
jgamblin Apr 12, 2026
bf419db
feat: add base module class and data types
jgamblin Apr 12, 2026
22c69bc
feat: add audit log for tracking actions
jgamblin Apr 12, 2026
a8a917f
feat: add platform detection
jgamblin Apr 12, 2026
d0e8f2c
feat: add YAML config loader with safe defaults
jgamblin Apr 12, 2026
ce3d080
feat: add module runner with dry-run and sudo gating
jgamblin Apr 12, 2026
be911f2
feat: add report card generator
jgamblin Apr 12, 2026
fcd2b60
feat: add CLI with clean, audit, report, init, list, log, config comm…
jgamblin Apr 12, 2026
edb7777
feat: add Homebrew cleanup module
jgamblin Apr 12, 2026
f418253
feat: add trash cleanup module
jgamblin Apr 12, 2026
851f114
feat: add system cache cleanup module
jgamblin Apr 12, 2026
a216156
feat: add git cleanup module
jgamblin Apr 12, 2026
73138a9
feat: add WiFi cleanup module
jgamblin Apr 12, 2026
1b6a732
feat: add system integrity audit module
jgamblin Apr 12, 2026
bafdbfa
feat: add network security module
jgamblin Apr 12, 2026
cfed140
feat: add launch daemon/agent audit module
jgamblin Apr 12, 2026
80fc3e8
feat: add privacy audit module
jgamblin Apr 12, 2026
fe1d38e
feat: add optional security tools integration
jgamblin Apr 12, 2026
a25f114
feat: add app audit module
jgamblin Apr 12, 2026
0427210
feat: register all 13 modules in module registry
jgamblin Apr 12, 2026
059e5b0
ci: add GitHub Actions workflow
jgamblin Apr 12, 2026
c54c1ff
docs: complete README rewrite
jgamblin Apr 12, 2026
703b1a8
docs: add CHANGELOG, SECURITY, CONTRIBUTING, and module docs
jgamblin Apr 12, 2026
76c0863
ci: add release workflow for GitHub Releases
jgamblin Apr 12, 2026
e2ed9c9
fix: resolve all ruff and mypy issues
jgamblin Apr 12, 2026
e6400ac
fix: address code review findings
jgamblin Apr 12, 2026
fefd5bc
feat: add critical safety features to MacOS-Maid
jgamblin Apr 12, 2026
6cda315
refactor: improve code quality in MacOS-Maid modules
jgamblin Apr 12, 2026
3c4a7c0
fix: connect YAML config system to module instantiation
jgamblin Apr 12, 2026
6f0438d
fix: address code review findings — CI, safety defaults, and quality
jgamblin Apr 12, 2026
fd08a4a
fix(ci): drop macos-13 (unsupported), fix audit test on CI runners
jgamblin Apr 12, 2026
f1b8af8
ci: bump actions to v6 for Node.js 24 support
jgamblin Apr 12, 2026
083c94e
test: add missing coverage for Docker parsing, CLI commands, config i…
jgamblin Apr 12, 2026
ed4c47c
fix: address HIGH review findings — system_cache allowlist, per-modul…
jgamblin Apr 12, 2026
89e9b39
fix(system_cache): remove Homebrew and pip from allowlist to fix doub…
jgamblin Apr 12, 2026
df6d13a
fix(privacy): set requires_sudo=False (SFL2/TCC/Downloads are user-sc…
jgamblin Apr 28, 2026
0d6d483
refactor(system_cache): compute cache/log paths lazily to avoid impor…
jgamblin Apr 28, 2026
644853c
refactor: type Finding.severity as Severity enum with str-coercion fo…
jgamblin Apr 28, 2026
166f3a8
refactor(tools): use Severity enum for hardening_index branches
jgamblin Apr 28, 2026
5f64b37
feat(config): add typed per-module config dataclasses
jgamblin Apr 28, 2026
38c384f
chore(config): use TypeVar in _build and add dataclass drift test
jgamblin Apr 28, 2026
f371548
refactor: migrate get_all_modules to typed MaidConfig accessors
jgamblin Apr 28, 2026
23c10b0
feat(system): recognize macOS 26 Tahoe in name map
jgamblin Apr 29, 2026
08b85ad
ci: use macos-26 (Tahoe) runner in place of macos-14
jgamblin Apr 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
push:
branches: [main, modernize-v1]
pull_request:
branches: [main]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-26, macos-15]
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- run: pip install -e ".[dev]"
- run: ruff check src/
- run: mypy src/
- run: pytest tests/ -v --cov=macos_maid --cov-report=term-missing

lint:
runs-on: macos-26
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- run: pip install -e ".[dev]"
- run: ruff check src/ tests/
- run: mypy src/
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Release

on:
push:
tags: ["v*"]

jobs:
release:
runs-on: macos-26
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- run: pip install -e ".[dev]"
- run: pytest tests/ -v
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
*.egg-info/
__pycache__/
*.pyc
dist/
build/
.eggs/
*.egg
.mypy_cache/
.pytest_cache/
.ruff_cache/
uv.lock
.coverage
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.0] - 2026-04-12

### Added

- Complete rewrite from bash to Python for improved maintainability and safety
- 13 modular modules organized by category (dev/security):
- Dev modules: trash, homebrew, docker, dev_caches, git
- Security modules: system_integrity, network, wifi, privacy, app_audit, launch_audit, tools
- Hybrid module: system_cache
- CLI with six commands:
- `maid clean` - Run cleanup operations
- `maid audit` - Run security audits (read-only)
- `maid report` - Generate comprehensive report card
- `maid init` - Generate default configuration file
- `maid list` - List all available modules
- `maid log` - Show last run log
- YAML configuration file (`~/.maid.yml`) with safe defaults
- Dry-run mode enabled by default for first-time users
- Sudo gating: modules that require elevated privileges are opt-in via `--sudo` flag
- Action logging: all cleanup and audit actions logged to `~/.maid/last_run.json`
- Report card output in three formats: terminal (with color), JSON, and markdown
- Apple Silicon and Intel support via platform detection
- Security tool integration (Lynis, osquery, KnockKnock) - runs if installed, suggests installation if not
- Retention-based WiFi cleanup: removes networks older than 90 days (configurable), always keeps current network
- Strict allowlist approach for dev cache cleaning: only touches known regenerable cache directories
- TCC (Transparency, Consent, and Control) permission auditing: reads user-level privacy database
- System integrity checks: SIP, FileVault, Gatekeeper, XProtect, Firewall
- Application and launch daemon auditing: identifies unsigned apps and non-Apple launch items
- Network security checks: firewall status, open listening ports, VPN profiles

### Removed

- Original `maid.sh` bash script
- `diskutil secureErase freespace` - extremely slow and unnecessary on modern SSDs
- `/private/var/folders` deletion - dangerous and breaks system functionality
- Hardcoded SSID deletion - replaced with retention-based approach
- `known_hosts` file deletion - removed for safety
- Forced memory purge - removed as macOS handles memory management automatically
Loading
Loading