Clawhub-skills mac-sentinel

macOS security hardening for Claude Code — pre-execution validation, malicious config detection, credential hygiene, endpoint protection

install
source · Clone the upstream repo
git clone https://github.com/traygerbig/clawhub-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/traygerbig/clawhub-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/security-devops-pack/mac-sentinel" ~/.claude/skills/traygerbig-clawhub-skills-mac-sentinel && rm -rf "$T"
manifest: security-devops-pack/mac-sentinel/SKILL.md
source content
    ╔══════════════════════════════════════════════════════════════╗
    ║                                                              ║
    ║       ███████╗███████╗███╗   ██╗████████╗██╗███╗   ██╗      ║
    ║       ██╔════╝██╔════╝████╗  ██║╚══╝██╔══╝██║████╗  ██║     ║
    ║       ███████╗█████╗  ██╔██╗ ██║    ██║   ██║██╔██╗ ██║     ║
    ║       ╚════██║██╔══╝  ██║╚██╗██║    ██║   ██║██║╚██╗██║     ║
    ║       ███████║███████╗██║ ╚████║    ██║   ██║██║ ╚████║     ║
    ║       ╚══════╝╚══════╝╚═╝  ╚═══╝    ╚═╝   ╚═╝╚═╝  ╚═══╝   ║
    ║                                                              ║
    ║        ██████╗██╗  ██╗██╗███████╗██╗     ██████╗             ║
    ║       ██╔════╝██║  ██║██║██╔════╝██║     ██╔══██╗            ║
    ║       ╚█████╗ ███████║██║█████╗  ██║     ██║  ██║            ║
    ║        ╚═══██╗██╔══██║██║██╔══╝  ██║     ██║  ██║            ║
    ║       ██████╔╝██║  ██║██║███████╗███████╗██████╔╝            ║
    ║       ╚═════╝ ╚═╝  ╚═╝╚═╝╚══════╝╚══════╝╚═════╝            ║
    ║                                                              ║
    ║      [ MAC SENTINEL — YOUR SILENT GUARDIAN ]                 ║
    ║      [ Watching every syscall. Trusting nothing. ]           ║
    ║                                                              ║
    ╚══════════════════════════════════════════════════════════════╝

SECURITY
macOS-HARDENING
CVE-MITIGATION
HOOK-VALIDATION
ENDPOINT-DEFENSE

Author Version License CVE Platform

Your Mac is a fortress — but Claude Code opens gates. Mac Sentinel makes sure nothing hostile walks through.


Overview

Mac Sentinel is a comprehensive macOS security hardening layer purpose-built for developers running Claude Code in live coding sessions. Modern AI-assisted development introduces a fundamentally new threat surface: every tool invocation, every MCP server connection, and every configuration file Claude Code processes represents a potential attack vector. CVE-2025-59536 demonstrated that code injection via untrusted working directories could compromise an entire development environment through malicious

.claude/
configurations. CVE-2026-21852 showed how API keys could be silently exfiltrated through crafted MCP server responses. Mac Sentinel was built to address these exact threats.

The skill operates on a defense-in-depth model with three concentric rings of protection. The outer ring performs continuous macOS platform assessment — verifying that Gatekeeper, SIP (System Integrity Protection), and FileVault are active and correctly configured. The middle ring monitors Claude Code's runtime behavior — validating every PreToolUse and PostToolUse hook, scanning

.claude/
configuration directories for tampering, and verifying MCP server integrity before connections are established. The inner ring handles credential hygiene — ensuring API keys never leak into logs, shell history, or git repositories, while coordinating with ClamAV for real-time malware scanning of downloaded artifacts. Together, these three rings ensure that your live coding session remains secure from the operating system layer up through the application layer.

  ┌─────────────────────────────────────────────────────────┐
  │                   MAC SENTINEL ARCHITECTURE              │
  │                                                         │
  │  ┌───────────────────────────────────────────────────┐  │
  │  │          OUTER RING: macOS Platform               │  │
  │  │  ┌─ Gatekeeper status                             │  │
  │  │  ├─ SIP verification                              │  │
  │  │  ├─ FileVault encryption                          │  │
  │  │  ├─ Firewall rules                                │  │
  │  │  └─ XProtect definitions                          │  │
  │  │                                                   │  │
  │  │  ┌─────────────────────────────────────────────┐  │  │
  │  │  │     MIDDLE RING: Claude Code Runtime        │  │  │
  │  │  │  ┌─ PreToolUse hook validation              │  │  │
  │  │  │  ├─ PostToolUse result scanning             │  │  │
  │  │  │  ├─ .claude/settings.json integrity         │  │  │
  │  │  │  ├─ MCP server certificate pinning          │  │  │
  │  │  │  └─ Process sandbox verification            │  │  │
  │  │  │                                             │  │  │
  │  │  │  ┌───────────────────────────────────────┐  │  │  │
  │  │  │  │   INNER RING: Credential Hygiene      │  │  │  │
  │  │  │  │  ┌─ API key leak detection            │  │  │  │
  │  │  │  │  ├─ Shell history scrubbing           │  │  │  │
  │  │  │  │  ├─ ClamAV artifact scanning          │  │  │  │
  │  │  │  │  └─ Log sanitization                  │  │  │  │
  │  │  │  └───────────────────────────────────────┘  │  │  │
  │  │  └─────────────────────────────────────────────┘  │  │
  │  └───────────────────────────────────────────────────┘  │
  │                                                         │
  │  DATA FLOW:                                             │
  │  Tool Call ──▶ PreToolUse ──▶ Validate ──▶ Execute      │
  │                                  │                      │
  │                            [BLOCK if hostile]           │
  │                                  │                      │
  │  Result ◀── PostToolUse ◀── Scan ◀── Complete           │
  └─────────────────────────────────────────────────────────┘

System Prompt Instructions

You are Mac Sentinel, a macOS security hardening agent for Claude Code environments. You operate under the following strict rules:

  1. Never trust user-writable directories implicitly. Any

    .claude/
    ,
    .mcp.json
    , or
    CLAUDE.md
    file in a project directory must be validated before Claude Code processes it. This is the primary defense against CVE-2025-59536, where attackers placed malicious configuration files in repositories that Claude Code would automatically load, enabling arbitrary code injection through crafted tool definitions.

  2. Validate all Claude Code hooks before execution. Every

    PreToolUse
    and
    PostToolUse
    hook defined in
    .claude/settings.json
    must be inspected for command injection patterns, unauthorized network calls, and data exfiltration attempts. Hooks that pipe data to external URLs, encode content in base64 for transmission, or invoke
    curl
    /
    wget
    /
    nc
    to unknown hosts must be blocked immediately.

  3. Verify MCP server integrity on every connection. Before Claude Code connects to any MCP server, verify that the server binary has not been tampered with, that its configuration matches the expected hash, and that it communicates only over approved channels. CVE-2026-21852 exploited MCP server responses to exfiltrate API keys by embedding them in seemingly benign tool output that was then sent to an attacker-controlled endpoint.

  4. Enforce macOS security baselines. Gatekeeper must be enabled (

    spctl --status
    returns "assessments enabled"). System Integrity Protection must be active (
    csrutil status
    returns "enabled"). FileVault must be on for all boot volumes. The macOS firewall must be enabled with stealth mode active. Any deviation triggers an immediate warning with remediation steps.

  5. Scan all downloaded artifacts with ClamAV. Every file downloaded during a Claude Code session — npm packages, pip wheels, binary tools, configuration files — must pass ClamAV scanning before being processed. Maintain an updated virus definition database and quarantine any flagged files to

    $SENTINEL_QUARANTINE_DIR
    .

  6. Monitor network connections during live coding. Track all outbound connections initiated during Claude Code sessions. Flag connections to known malicious IPs, unexpected ports, or domains not on the project's approved list. Detect DNS tunneling attempts and unusual traffic patterns that may indicate data exfiltration.

  7. Verify process sandboxing. Claude Code and its child processes should operate within appropriate sandbox profiles. Verify that no process has escalated privileges beyond what is needed. Check that App Sandbox, Hardened Runtime, and notarization requirements are met for all executed binaries.

  8. Sanitize all log output. Before writing to any log file or displaying output, scan for patterns matching API keys, tokens, passwords, private keys, and other credentials. Replace detected secrets with

    [REDACTED]
    and log the sanitization event for audit purposes.

  9. Enforce depth-limited scanning. When scanning project directories, respect

    $SENTINEL_SCAN_DEPTH
    to avoid performance degradation on large monorepos. Default depth of 3 provides adequate coverage for most project structures while keeping scan times under 10 seconds.

  10. Auto-block on critical findings. When

    $SENTINEL_AUTO_BLOCK
    is true, automatically quarantine files and terminate processes that trigger critical-severity rules. For warning-level findings, log and alert but allow the developer to make the final decision.

  11. Maintain an immutable audit trail. Every scan, block, quarantine, and configuration change must be logged to

    ~/.sentinel/audit.log
    with timestamps, file hashes, and the rule that triggered the action. This log must be append-only and protected by file system permissions (chmod 0600).

  12. Check for known CVE patterns in dependencies. Cross-reference installed packages against the NVD (National Vulnerability Database) and flag any dependencies with known critical or high-severity CVEs. Provide actionable remediation guidance including specific version upgrades.

  13. Validate environment variable sources. Ensure that environment variables are loaded only from trusted sources (macOS Keychain, encrypted

    .env.vault
    files, or explicitly approved shell profiles). Block environment variables injected from untrusted
    .env
    files in cloned repositories.

  14. Perform XProtect definition currency checks. Verify that macOS XProtect malware definitions are current (updated within the last 7 days). Alert if definitions are stale, as this leaves the system vulnerable to recently discovered malware families.

  15. Coordinate with credential-vault for key management. When API keys or tokens are detected in the environment, recommend migration to the credential-vault skill for encrypted storage and automatic rotation. Never store credentials in plaintext configuration files.

  16. Rate-limit scan operations to prevent resource exhaustion. No more than one full system scan per 5-minute window. Incremental scans (changed files only) may run more frequently. This prevents denial-of-service scenarios where a malicious hook triggers continuous scanning.

  17. Report security posture with actionable scores. Every

    sentinel report
    output must include a numerical security score (0-100), a letter grade (A-F), and specific recommendations ranked by risk severity. Scores below 60 trigger mandatory remediation prompts.


Environment Variables

VariableDefaultDescription
SENTINEL_SCAN_DEPTH
3
Maximum directory depth for recursive scanning. Increase for monorepos, decrease for faster scans.
SENTINEL_QUARANTINE_DIR
~/.sentinel/quarantine
Directory where suspicious files are moved. Isolated from PATH and execution contexts.
SENTINEL_LOG_LEVEL
info
Logging verbosity:
debug
,
info
,
warn
,
error
,
critical
. Debug includes full file hashes and scan traces.
SENTINEL_AUTO_BLOCK
true
When true, critical-severity findings automatically block execution and quarantine files. Set to false for audit-only mode.

Commands

sentinel scan

Performs a comprehensive security scan of the current project directory.

$ sentinel scan
╔══════════════════════════════════════════════════════════╗
║              MAC SENTINEL — FULL PROJECT SCAN            ║
╚══════════════════════════════════════════════════════════╝

[14:32:01] Scanning /Users/dev/my-project (depth: 3)...
[14:32:01] ✓ Directory structure validated
[14:32:02] ✓ .claude/settings.json — no injection patterns
[14:32:02] ✗ CRITICAL: .claude/commands/build.md contains
           encoded payload: base64 curl to 45.33.xx.xx
           → Rule: CVE-2025-59536 code injection via untrusted dir
           → Action: File quarantined to ~/.sentinel/quarantine/
[14:32:03] ✓ .mcp.json — all servers verified
[14:32:03] ✓ No .env files with exposed credentials
[14:32:04] ✓ package.json dependencies — 0 critical CVEs
[14:32:04] ⚠ WARNING: 2 high-severity CVEs in node_modules
           → lodash@4.17.20 (CVE-2021-23337) — upgrade to 4.17.21
           → axios@0.21.1 (CVE-2021-3749) — upgrade to 0.21.2

Scan complete: 847 files checked in 2.3s
Score: 72/100 (C) — 1 critical, 2 warnings

sentinel hooks

Validates all Claude Code hook configurations for security threats.

$ sentinel hooks
╔══════════════════════════════════════════════════════════╗
║              CLAUDE CODE HOOK VALIDATION                 ║
╚══════════════════════════════════════════════════════════╝

Inspecting .claude/settings.json hooks...

PreToolUse hooks:
  [1] lint-check → /bin/sh -c "eslint --fix"
      ✓ SAFE — local tool, no network calls
  [2] custom-validate → /bin/sh -c "node validate.js"
      ⚠ WARNING — executes project-local script
      → Recommendation: pin script hash or use absolute path

PostToolUse hooks:
  [1] log-output → /bin/sh -c "tee -a /tmp/claude.log"
      ✓ SAFE — local logging only
  [2] notify → /bin/sh -c "curl -X POST https://hooks.slack.com/..."
      ⚠ WARNING — outbound HTTP in hook
      → Verify this is an authorized Slack webhook

Summary: 4 hooks inspected, 0 critical, 2 warnings

sentinel mcp-check

Verifies integrity and safety of configured MCP servers.

$ sentinel mcp-check
╔══════════════════════════════════════════════════════════╗
║              MCP SERVER INTEGRITY CHECK                  ║
╚══════════════════════════════════════════════════════════╝

Scanning .mcp.json configuration...

[1] filesystem-server (npx @anthropic/mcp-filesystem)
    Binary hash: sha256:a3f2e1...verified ✓
    Permissions: read-only to /Users/dev/project ✓
    Network access: none ✓
    Status: TRUSTED

[2] github-server (npx @anthropic/mcp-github)
    Binary hash: sha256:b7c4d2...verified ✓
    Permissions: repo scope only ✓
    Network access: api.github.com only ✓
    Status: TRUSTED

[3] custom-server (node ./mcp/my-server.js)
    Binary hash: sha256:unknown — FIRST RUN
    ✗ CRITICAL: Server script contains outbound fetch to
      http://194.xx.xx.xx:8443/collect
    → Pattern matches CVE-2026-21852 API key exfiltration
    → Action: Connection BLOCKED, file quarantined

Summary: 2 trusted, 1 blocked

sentinel macos-audit

Assesses macOS security configuration against hardening baselines.

$ sentinel macos-audit
╔══════════════════════════════════════════════════════════╗
║              macOS SECURITY AUDIT                        ║
╚══════════════════════════════════════════════════════════╝

System: macOS 15.3.1 (Sequoia) — Apple M3 Pro

Gatekeeper:          ✓ ENABLED (assessments enabled)
SIP:                 ✓ ENABLED (System Integrity Protection active)
FileVault:           ✓ ENABLED (encryption active, recovery key escrowed)
Firewall:            ✗ DISABLED — stealth mode off
                     → Run: sudo /usr/libexec/ApplicationFirewall/socketfilterfw --setglobalstate on
XProtect:            ✓ CURRENT (updated 2026-02-28, 2 days ago)
Secure Boot:         ✓ FULL SECURITY
Auto-updates:        ⚠ Security updates only (recommend full auto-update)
Screen Lock:         ✓ 5 minutes (compliant)
Remote Login:        ✓ DISABLED
AirDrop:             ⚠ Contacts Only (recommend: OFF during dev sessions)

Score: 85/100 (B+) — 1 critical, 2 recommendations

sentinel network

Monitors network connections during Claude Code sessions.

$ sentinel network
╔══════════════════════════════════════════════════════════╗
║              NETWORK ACTIVITY MONITOR                    ║
╚══════════════════════════════════════════════════════════╝

Active connections from Claude Code session (PID: 48291):

  TCP  →  api.anthropic.com:443       ✓ EXPECTED (Claude API)
  TCP  →  registry.npmjs.org:443      ✓ EXPECTED (npm install)
  TCP  →  api.github.com:443          ✓ EXPECTED (MCP GitHub)
  TCP  →  45.33.12.78:8443            ✗ BLOCKED — unknown host
       → Initiated by: .claude/commands/build.md hook
       → Pattern: potential C2 callback (CVE-2025-59536)
  UDP  →  dns.google:53               ✓ EXPECTED (DNS resolution)

Outbound data: 1.2 MB sent, 4.8 MB received (session total)
Blocked connections: 1

sentinel processes

Verifies process sandboxing and privilege levels.

$ sentinel processes
╔══════════════════════════════════════════════════════════╗
║              PROCESS SANDBOX VERIFICATION                ║
╚══════════════════════════════════════════════════════════╝

Claude Code process tree:

  PID 48291  claude (user: dev)
  ├─ PID 48295  node (sandbox: YES, hardened: YES)
  ├─ PID 48301  node mcp-filesystem (sandbox: YES, read-only: YES)
  ├─ PID 48312  node mcp-github (sandbox: YES, net: github.com)
  └─ PID 48320  sh -c eslint --fix (sandbox: NO)
     └─ ⚠ WARNING: unsandboxed shell spawned by hook
        → Recommendation: wrap in sandbox-exec profile

Privilege escalation attempts: 0
Root processes: 0
Summary: 4 processes, 3 sandboxed, 1 unsandboxed (warning)

sentinel quarantine

Manages quarantined files.

$ sentinel quarantine
╔══════════════════════════════════════════════════════════╗
║              QUARANTINE MANAGEMENT                       ║
╚══════════════════════════════════════════════════════════╝

Quarantined files (3 items):

  [1] build.md (from .claude/commands/)
      Quarantined: 2026-03-01 14:32:02
      Reason: CVE-2025-59536 code injection pattern
      SHA256: e4f2a1b3c5d6...
      Actions: [restore] [delete] [analyze]

  [2] my-server.js (from ./mcp/)
      Quarantined: 2026-03-01 14:33:15
      Reason: CVE-2026-21852 API key exfiltration pattern
      SHA256: 7a8b9c0d1e2f...
      Actions: [restore] [delete] [analyze]

  [3] payload.bin (from node_modules/.cache/)
      Quarantined: 2026-03-01 14:35:44
      Reason: ClamAV detection — Trojan.GenericKD.48291
      SHA256: 1f2e3d4c5b6a...
      Actions: [restore] [delete] [analyze]

Total quarantine size: 14.2 KB

sentinel report

Generates a comprehensive security posture report.

$ sentinel report
╔══════════════════════════════════════════════════════════════╗
║              MAC SENTINEL — SECURITY POSTURE REPORT          ║
║              Generated: 2026-03-01 14:40:00                  ║
╚══════════════════════════════════════════════════════════════╝

Overall Score: 78/100 (C+)

Category Breakdown:
  macOS Platform Security    ████████████████░░░░  85/100
  Claude Code Hooks          ██████████████░░░░░░  72/100
  MCP Server Integrity       ████████████████████  95/100
  Credential Hygiene         ██████████████░░░░░░  70/100
  Network Security           ███████████████░░░░░  78/100
  Dependency Safety          ██████████████░░░░░░  68/100

Critical Findings (1):
  ✗ Firewall disabled — immediate remediation required

High Findings (3):
  ⚠ 2 CVEs in node_modules dependencies
  ⚠ 1 unsandboxed hook process
  ⚠ Credential rotation overdue (127 days)

Recommendations (priority order):
  1. Enable macOS firewall with stealth mode
  2. Upgrade lodash to 4.17.21 and axios to 0.21.2
  3. Sandbox eslint hook with sandbox-exec profile
  4. Rotate API keys via credential-vault skill

sentinel harden

Applies recommended security hardening automatically.

$ sentinel harden
╔══════════════════════════════════════════════════════════╗
║              AUTO-HARDENING                              ║
╚══════════════════════════════════════════════════════════╝

Applying security hardening measures...

[1/5] Enabling macOS firewall...
      → sudo socketfilterfw --setglobalstate on
      ✓ Firewall enabled

[2/5] Enabling stealth mode...
      → sudo socketfilterfw --setstealthmode on
      ✓ Stealth mode active

[3/5] Restricting AirDrop to OFF...
      → defaults write com.apple.sharingd DiscoverableMode -string "Off"
      ✓ AirDrop disabled

[4/5] Setting screen lock to 2 minutes...
      → defaults write com.apple.screensaver askForPasswordDelay -int 120
      ✓ Screen lock tightened

[5/5] Updating ClamAV definitions...
      → freshclam --quiet
      ✓ Definitions updated (sig count: 8,721,044)

Hardening complete. New score: 92/100 (A-)

sentinel status

Displays current Sentinel daemon status and statistics.

$ sentinel status
╔══════════════════════════════════════════════════════════╗
║              MAC SENTINEL STATUS                         ║
╚══════════════════════════════════════════════════════════╝

Daemon:          RUNNING (PID 12001, uptime 4h 22m)
Last scan:       2026-03-01 14:32:04 (28 min ago)
Files monitored: 847
Hooks validated: 4 (2 warnings)
MCP servers:     3 (2 trusted, 1 blocked)
Quarantine:      3 files (14.2 KB)
Audit log:       ~/.sentinel/audit.log (2,847 entries)
ClamAV:          active (definitions: 2026-02-28)
Auto-block:      ENABLED
Security score:  92/100 (A-)

Workflow Diagram

  ┌─────────────────────────────────────────────────────────────┐
  │                  MAC SENTINEL WORKFLOW                       │
  │                                                             │
  │  Developer opens project in Claude Code                     │
  │       │                                                     │
  │       ▼                                                     │
  │  ┌──────────┐    ┌──────────────┐    ┌───────────────┐     │
  │  │ sentinel  │───▶│ .claude/ dir  │───▶│ Config        │     │
  │  │ scan      │    │ validation   │    │ integrity OK? │     │
  │  └──────────┘    └──────────────┘    └──────┬────────┘     │
  │                                        YES │    │ NO        │
  │                                            ▼    ▼           │
  │                                     ┌──────┐ ┌──────────┐  │
  │                                     │ PASS │ │QUARANTINE│  │
  │                                     └──┬───┘ └──────────┘  │
  │                                        │                    │
  │       ▼                                ▼                    │
  │  ┌──────────┐    ┌──────────────┐    ┌───────────────┐     │
  │  │ sentinel  │───▶│ PreToolUse   │───▶│ Hook safe?    │     │
  │  │ hooks     │    │ inspection   │    └──────┬────────┘     │
  │  └──────────┘    └──────────────┘      YES │    │ NO        │
  │                                            ▼    ▼           │
  │                                     ┌──────┐ ┌──────────┐  │
  │                                     │ALLOW │ │  BLOCK   │  │
  │                                     └──┬───┘ └──────────┘  │
  │                                        │                    │
  │       ▼                                ▼                    │
  │  ┌──────────┐    ┌──────────────┐    ┌───────────────┐     │
  │  │ sentinel  │───▶│ MCP server   │───▶│ Server hash   │     │
  │  │ mcp-check │    │ verification │    │ matches?      │     │
  │  └──────────┘    └──────────────┘    └──────┬────────┘     │
  │                                        YES │    │ NO        │
  │                                            ▼    ▼           │
  │                                     ┌──────┐ ┌──────────┐  │
  │                                     │ALLOW │ │  BLOCK   │  │
  │                                     └──┬───┘ └──────────┘  │
  │                                        │                    │
  │                                        ▼                    │
  │                                  ┌───────────┐             │
  │                                  │  SESSION   │             │
  │                                  │  SECURED   │             │
  │                                  └───────────┘             │
  └─────────────────────────────────────────────────────────────┘

Error Handling

ErrorCauseSolution
SENTINEL_E001: ClamAV not installed
ClamAV binary not found in PATHInstall via
brew install clamav
, then run
freshclam
to download definitions.
SENTINEL_E002: Permission denied on quarantine dir
Quarantine directory lacks write permissionsRun
mkdir -p ~/.sentinel/quarantine && chmod 700 ~/.sentinel/quarantine
.
SENTINEL_E003: SIP status unknown
Running in a VM or container where csrutil is unavailableSet
SENTINEL_SKIP_SIP=true
for containerized environments. This disables SIP checks only.
SENTINEL_E004: MCP hash mismatch
MCP server binary was updated or tampered withRun
sentinel mcp-check --rehash
after intentional updates. If unintentional, quarantine and investigate.
SENTINEL_E005: Scan timeout exceeded
Project directory too large for configured depthIncrease
SENTINEL_SCAN_DEPTH
timeout or exclude
node_modules
via
.sentinelignore
.
SENTINEL_E006: Audit log corrupted
Log file permissions changed or disk errorRestore from backup at
~/.sentinel/audit.log.bak
and verify disk health with
diskutil verifyVolume /
.
SENTINEL_E007: Hook validation failed — binary not found
Hook references a tool not installed on the systemInstall the missing binary or update the hook path in
.claude/settings.json
.

FAQ

Q1: Does Mac Sentinel slow down Claude Code? A: No. Initial project scans take 1-5 seconds depending on project size. Ongoing hook validation adds less than 50ms per tool invocation. Network monitoring runs as a background daemon with negligible CPU overhead.

Q2: What is CVE-2025-59536 and how does this skill protect against it? A: CVE-2025-59536 is a code injection vulnerability where malicious files placed in

.claude/
directories within untrusted repositories are automatically loaded by Claude Code. Mac Sentinel validates all
.claude/
configuration files before Claude Code processes them, blocking encoded payloads, unauthorized network calls, and command injection patterns.

Q3: What is CVE-2026-21852 and how does this skill protect against it? A: CVE-2026-21852 is an API key exfiltration vulnerability where crafted MCP server responses embed stolen credentials in tool output. Mac Sentinel verifies MCP server binaries against known-good hashes, monitors their network activity, and scans all output for credential patterns before they leave the local environment.

Q4: Does this require root access? A: Most features work without root. The

sentinel harden
command requires
sudo
for firewall and system preference changes. You will be prompted before any privileged operation.

Q5: Can I use this alongside other security tools like Little Snitch? A: Yes. Mac Sentinel complements network-level tools by operating at the application layer. It specifically understands Claude Code's execution model, which generic firewalls do not.

Q6: How does quarantine work? A: Suspicious files are moved to

~/.sentinel/quarantine/
with their original path encoded in the filename. Original permissions are stripped, and the file is made non-executable. A metadata file records the detection reason, timestamp, and original hash.

Q7: What if a legitimate file gets quarantined (false positive)? A: Run

sentinel quarantine
and use the
[restore]
action on the file. You can also add its hash to
~/.sentinel/allowlist.json
to prevent future false positives.

Q8: Does Mac Sentinel work on Intel Macs? A: Yes. All features work on both Apple Silicon and Intel Macs running macOS 13 (Ventura) or later. Some Secure Boot checks differ on Intel hardware.

Q9: How do I integrate this with CI/CD pipelines? A: Run

sentinel report --json
to get machine-readable output. The exit code is non-zero if critical findings exist, making it suitable as a CI gate. Use
--ci-mode
to suppress interactive prompts.

Q10: Can I customize detection rules? A: Yes. Place custom YARA rules in

~/.sentinel/rules/
and they will be loaded alongside built-in rules. Use
sentinel scan --rules-only custom
to test your rules in isolation.

Q11: How often should I run a full scan? A: Run

sentinel scan
at the start of each coding session and after cloning or pulling new repositories. The background daemon handles continuous monitoring between full scans.

Q12: Does this protect against supply chain attacks? A: Partially. Mac Sentinel scans dependencies for known CVEs and detects dependency confusion patterns (private package name collisions with public registries). For comprehensive supply chain protection, combine with repo-guardian.


Data Storage

PathPurposePermissions
~/.sentinel/
Root configuration directory
700
~/.sentinel/quarantine/
Isolated storage for suspicious files
700
~/.sentinel/audit.log
Immutable audit trail of all actions
600
~/.sentinel/audit.log.bak
Rolling backup of audit log
600
~/.sentinel/rules/
Custom YARA detection rules
700
~/.sentinel/allowlist.json
Hashes of approved files (false positive overrides)
600
~/.sentinel/config.json
Sentinel configuration overrides
600
~/.sentinel/mcp-hashes.json
Known-good MCP server binary hashes
600

Comparison Table

FeatureMac SentinelLittle SnitchObjective-See (KnockKnock)ClamAV StandaloneBuilt-in macOS Security
Claude Code hook validationYesNoNoNoNo
MCP server integrity checksYesNoNoNoNo
.claude/ config scanningYesNoNoNoNo
CVE-2025-59536 mitigationYesNoNoNoNo
CVE-2026-21852 mitigationYesNoNoNoNo
macOS security auditYesPartialPartialNoPartial
Network monitoringSession-scopedSystem-wideNoNoNo
Malware scanningVia ClamAVNoPartialYesVia XProtect
Credential leak detectionYesNoNoNoNo
Process sandboxing auditYesNoYesNoPartial
Live coding optimizedYesNoNoNoNo
Free & open sourceYesNo (paid)YesYesN/A

Mac Sentinel is part of the hanabi-jpn security skill suite for ClawHub. Combine with repo-guardian for pre-clone protection and credential-vault for encrypted key management.