MagSafe Guard transforms your Mac's power connection into an intelligent security guard. When armed, it instantly detects if your power cable is disconnected and triggers protective actions to secure your data - perfect for protecting your laptop in coffee shops, airports, or any public space.
⚡ Instant Detection - Responds in milliseconds when your power cable is disconnected
🔒 Secure Authentication - Touch ID or password required to arm/disarm
⏱️ Smart Grace Period - Prevents false alarms with configurable delay (10 seconds default)
🎯 Customizable Actions - From simple screen lock to full system shutdown
📍 Location Aware - Automatically arms in public spaces, disarms at trusted locations
🔌 Universal Compatibility - Works with any Mac power adapter (MagSafe, USB-C, or third-party)
📋 Supply Chain Transparency - Software Bill of Materials (SBOM) included for security compliance
- Arm the protection when working in public spaces
- Continue working normally with your power adapter connected
- If someone grabs your laptop, the power cable disconnects
- Security actions trigger immediately (or after grace period)
- Your data stays protected even if your laptop is stolen
Perfect for digital nomads, security-conscious professionals, and anyone who works with sensitive data in public spaces.
MagSafe Guard is inspired by the excellent work of the BusKill Project - an open-source laptop kill cord that uses a USB magnetic breakaway to trigger security actions. We deeply appreciate their pioneering work in this space and their commitment to open-source security tools.
While BusKill requires a physical USB cable attachment, MagSafe Guard adapts the concept to use your existing power connection, making it seamless for Mac users. We encourage you to check out the original BusKill project, especially if you need cross-platform support or prefer a dedicated hardware solution.
Special thanks to:
- The BusKill team for creating the original concept and implementation
- Michael Altfield and all BusKill contributors
- The open-source security community for continuous innovation
MagSafe Guard is fully open source software, licensed under the MIT License. We believe in transparency and community-driven development for security tools.
For information about contributing to the project, please see our Contributors Guide.
Coming Soon - Get automatic updates and easy installation directly from the Mac App Store.
Download the latest release from our GitHub Releases page.
Note: Direct downloads require manual updates. For automatic updates, please wait for the Mac App Store release.
Need help or found an issue? We're here to assist:
- Feature Request: Have an idea? Submit a feature request
- Bug Report: Found a problem? Report an issue
- Security Issue: Found a vulnerability? Report securely
- General Question: Ask the community
📚 View Full Documentation - Comprehensive guides and API references
Quick Links:
Note: MagSafe Guard is a Swift Package project. You can use either Xcode or command-line tools for development. The menu bar app requires special handling - use
task runfor the best experience.
-
Install Task (if not already installed):
brew install go-task/tap/go-task
-
Initialize Development Environment:
task setup
This sets up git hooks and verifies your development tools.
-
Build and Run:
# Open in Xcode open MagSafeGuard.xcodeprojThen press ⌘R (Command+R) to build and run. Look for the lock shield icon in your menu bar.
For Development Testing:
# Run all tests
task test
# Run tests with coverage
task test:coverageFor CI/CD Automation:
The following tasks are used to run testing and quality assurance prior to opening a pull request:
task qa # Run standard QA checks
task qa:quick # Quick checks (for git hooks)
task qa:fix # Auto-fix all fixable issues
task qa:full # Full QA with SonarCloudTests are required to pass in our CI/CD approval flow. For more information, see the CI/CD Workflows Documentation.
- macOS 11.0 (Big Sur) or later
- Any Mac with power adapter support
- Administrator privileges for some security actions
View our Quality Assurance Dashboard for security status, code coverage, and quality metrics.
- No tracking: We don't collect any user data
- Local only: All processing happens on your Mac
- Open source: Review our code anytime
- Secure: Requires authentication for all security operations
For details on the project progress, planned initiatives and current status, expand the section below.
Expand task status report
🎯 Taskmaster Export - 2025-08-02 09:35:18 UTC 📋 Export: without subtasks • Status filter: none 🔗 Powered by Task Master
| Project Dashboard | |
|---|---|
| Task Progress | ██████████░░░░░░░░░░ 50% |
| Done | 9 |
| In Progress | 3 |
| Pending | 6 |
| Deferred | 0 |
| Cancelled | 0 |
| - | - |
| Subtask Progress | █████████████░░░░░░░ 65% |
| Completed | 73 |
| In Progress | 3 |
| Pending | 37 |
| ID | Title | Status | Priority | Dependencies | Complexity |
|---|---|---|---|---|---|
| 1 | Setup Project Repository and Structure | ✓ done | high | None | ● 4 |
| 2 | Implement Power Monitoring Service | ✓ done | high | 1 | ● 7 |
| 3 | Implement Authentication Service | ✓ done | high | 1 | ● 6 |
| 4 | Implement Security Actions Service | ✓ done | high | 1 | ● 7 |
| 5 | Create Menu Bar UI Component | ✓ done | high | 1 | ● 6 |
| 6 | Implement Core Application Logic | ✓ done | high | 2, 3, 4, 5 | ● 8 |
| 7 | Implement Settings UI and Persistence | ✓ done | medium | 1, 6 | ● 6 |
| 8 | Implement Auto-Arm Feature | ✓ done | medium | 6, 7 | ● 7 |
| 9 | Implement Location Tracking and Evidence Collection | ► in-progress | low | 6 | ● 5 |
| 10 | Implement Custom Script Execution | ○ pending | low | 6, 7 | ● 6 |
| 11 | Implement Network Actions | ○ pending | low | 6, 7 | ● 6 |
| 12 | Implement Data Protection Features | ○ pending | low | 6, 7 | ● 7 |
| 13 | Implement Accessibility Features | ✓ done | medium | 5, 7 | ● 6 |
| 14 | Implement Documentation and Help System | ○ pending | medium | 1, 5, 6, 7 | ● 5 |
| 15 | Implement Code Signing and Distribution | ► in-progress | high | 1, 2, 3, 4, 5, 6, 7, 16 | ● 8 |
| 16 | Implement ViewInspector for SwiftUI Testing | ○ pending | medium | 6, 13 | N/A |
| 17 | Implement Feature Flag Framework with Sentry Integration and Dynamic Management | ► in-progress | medium | 6, 13 | N/A |
| 18 | Refactor PowerMonitorService for Testability with Protocol-Based Dependency Injection | ○ pending | medium | 2, 3 | N/A |
📋 End of Taskmaster Export - Tasks are synced from your project using the
sync-readmecommand.
