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.
On-device macOS threat detection + forensics — catches malware, credential theft, and rogue AI agents, then helps you investigate.
Iterating fast — expect false positives and frequent updates. Changelog · Report an issue
$ brew install --cask peterhanily/maccrab/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 — 483 detection rules (Sigma-compatible core) 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 ten workspaces — Overview, Alerts, Events, Investigation (Agent Traces, visual TraceGraph), Forensics, Detection, Prevention, Intelligence, System, and Docs. Or skip the GUI entirely and drive it from the CLI.
threat_intel/, or bring 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.
One command, via the official tap. Installs the signed, notarized app to /Applications and the CLIs to your PATH, then auto-updates from then on.
brew install --cask peterhanily/maccrab/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 26. Builds the eight SPM targets (core, agent kit, sysext, legacy daemon, forensics, 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.