AI coding tool guardrails
Claude Code, Codex, Cursor, and Copilot are powerful — and sometimes they wander. MacCrab watches for credential reads, project-boundary escapes, prompt injection, and rogue MCP servers.
Catches malware, credential theft, and rogue AI agents on your Mac. Built on Apple's Endpoint Security framework. Runs entirely on-device — no cloud, no account.
Iterating fast — expect false positives and frequent updates. Changelog · Report an issue
$ brew tap peterhanily/maccrab https://github.com/peterhanily/maccrab $ brew install --cask maccrab
MacCrab listens to Apple's Endpoint Security feed — the same kernel-level events macOS gives to security tools. It turns that firehose into readable alerts, on your machine.
Claude Code, Codex, Cursor, and Copilot are powerful — and sometimes they wander. MacCrab watches for credential reads, project-boundary escapes, prompt injection, and rogue MCP servers.
See every file your AI agent touched, every command it ran, every network call it made — tied back to the exact prompt that caused it. OpenTelemetry over a local loopback, encrypted at rest, with vendor secrets scrubbed at the wire.
Shai-Hulud-class npm worms steal a maintainer's npm token, then publish themselves into every package that maintainer owns. MacCrab fires when a credential read and a registry publish happen in the same process tree within a minute. Plus typosquat scoring, attestation checks, and canary CLAUDE.md / .claude/skills/ decoys that AI agents will read but humans won't.
LaunchAgents, dylib hijacks, quarantine-stripped payloads, kernel extensions, TCC bypasses, quick-look plugins, folder actions — 469+ Sigma-compatible rules across 17 tactic categories.
Keychain dumps, browser password-store reads, SSH-key exfiltration, AWS credential access. Honeyfile tripwires drop at the usual credential paths to catch what rules miss.
Multi-step attacks stitched together by process lineage and time. When a browser spawns a shell that strips quarantine and installs a LaunchAgent, you see one campaign — not four loose alerts to piece together by hand.
A SwiftUI menubar app organised into nine workspaces — Overview, Alerts, Events, Investigation (Agent Traces, visual TraceGraph), Detection, Prevention, Intelligence, System, and Docs. Or skip the GUI entirely and drive it from the CLI.
threat_intel/, or bring VirusTotal / GreyNoise / OTX keys for managed feeds.
Detection data is a full picture of what's happening on your machine — it should stay there. MacCrab keeps events in a local SQLite database, runs analysis on-device by default, and ships no telemetry unless you turn it on.
macOS 13 Ventura or later. On first launch you'll approve the system extension in System Settings → Login Items & Extensions, and grant Full Disk Access for complete event coverage.
Cask install with auto-update. Drops the signed app in /Applications and the CLI in your path.
brew tap peterhanily/maccrab \ https://github.com/peterhanily/maccrab brew install --cask maccrab
Grab the signed DMG from GitHub Releases. Drag MacCrab.app to /Applications, then approve the system extension on first launch.
open https://github.com/\ peterhanily/maccrab/releases/latest
Swift 5.9 + Xcode 15. Builds the seven SPM targets (core, agent kit, sysext, legacy daemon, CLI, MCP server, app) with ad-hoc signing for development.
git clone https://github.com/peterhanily/\ maccrab.git && cd maccrab make dev
Short answers to what people ask most. For the long-form versions, see the README, privacy policy, and security policy.