PCTUTU.comBack to PCTUTU.com
GitHub projects
clearancekitUtilities
Category
Utilities
Publisher
craigjbass
Repository
Open repository
Release
Open release
Current version
v5.0.15-39ac211
Release date
2026-11-28
Package size
macOS 3.1 MB
Utilities · craigjbass

clearancekit

Every npm install , pip install , and brew upgrade executes arbitrary native code with your full file system permissions. One compromised package can silently read your SSH keys, AWS credentials, iMessages, and browser cookies. You will not know until it is too late.

Version v5.0.15-39ac211
Available for macOS

README

ClearanceKit Pre-release Quality Gate Status OpenSSF Scorecard Join the chat at https://matrix.to/#/%23clearancekit:gitter.im

Every npm install, pip install, and brew upgrade executes arbitrary native code with your full file system permissions. One compromised package can silently read your SSH keys, AWS credentials, iMessages, and browser cookies. You will not know until it is too late.

ClearanceKit intercepts file-system access events on macOS — opens, renames, deletions, hard links, creates, truncations, copies, directory reads, data exchanges, and clones — and enforces per-process access policies for paths you designate as protected. Any process accessing a protected path without an explicit allow rule is blocked. Jail rules go further: a jailed process is confined to a specified set of path prefixes, and any file access outside those prefixes is denied regardless of other policy rules. Denied events surface in a native SwiftUI interface so you can review them and build policy as you work — no configuration files required.

Policies are bound to cryptographic code signing identity — the Developer ID certificate and bundle identifier embedded in the binary — not to file paths or hashes. A trojanised binary is denied even if it sits at the expected path. Policies survive software updates without any maintenance, because a developer's signing identity does not change between releases.

clearancekit in action

App protections

Threat model

DEFCON talk on macOS Endpoint Security

Modern macOS developer workstations are high-value targets. Unlike iOS, macOS permits unsigned or ad-hoc-signed Mach-O binaries to run outside the App Sandbox, with direct access to the file system and user data. The attack surface is widest around developer tooling — package managers, build systems, language runtimes, and their plugins all execute arbitrary native code with your full user-level permissions the moment you run npm install, pip install, brew install, cargo build, or pull a new dependency.

The supply chain attack surface is enormous. A malicious package — or a legitimate package with a compromised release — can drop a native dylib or shell script that gets loaded into every subsequent process in your terminal session. Because macOS does not restrict which files an unsandboxed process can read, that one postinstall script has the same access to your data as you do.

What can it reach?

  • Apple Notes — unlocked notes are stored in a readable CoreData SQLite database at ~/Library/Group Containers/group.com.apple.notes/; individually locked notes are encrypted
  • Signal Desktop — attachments at ~/Library/Application Support/Signal/attachments.noindex/ are directly readable; the message database is SQLCipher-encrypted with an ACL-restricted keychain entry, but blocking directory access prevents bulk exfiltration of media and documents
  • iMessage — chat history and attachments are stored under ~/Library/Messages/
  • Safari cookies — ~/Library/Cookies/Cookies.binarycookies is directly readable by any same-user process
  • Firefox and Chrome session cookies — Firefox stores cookies in plaintext SQLite; Chrome's cookie database is readable on disk
  • SSH private keys — unprotected ~/.ssh/id_* files are immediately usable for lateral movement to servers and cloud environments
  • AWS, GCP, and Azure credentials — plaintext credential and token files at ~/.aws/credentials, ~/.config/gcloud/, and ~/.azure/
  • Git credentials and .netrc — plaintext ~/.git-credentials and .netrc give silent access to every private repository your account can reach
  • GPG private keys — ~/.gnupg/private-keys-v1.d/ files can be copied for offline passphrase cracking
  • Slack, Discord, and other Electron apps — conversation history and credentials are stored in LevelDB and SQLite under ~/Library/Application Support/; whether specific values are encrypted depends on the app
  • Zoom and meeting recordings — local recordings stored unprotected at ~/Documents/Zoom/
  • VS Code and JetBrains IDE state — recent file lists, workspace settings, and extension local storage that map your entire codebase

clearancekit places the Endpoint Security API between every file-system access attempt and the process that triggered it. When a process you did not explicitly allow attempts to read a protected path — your ~/.ssh directory, your Notes database, your browser profile — clearancekit intercepts the access, denies it, and surfaces it in the UI so you can decide whether to add a policy or investigate further.

Why code signing makes this stronger than SELinux

SELinux and similar mandatory access control systems bind permissions to file paths and process labels. A policy that says "processes labelled python_t may read /home/user/.aws/credentials" trusts whatever binary happens to be executing at that label — it has no way to verify that the binary is the real Python interpreter and not a malicious replacement. An attacker who plants a trojanised binary at the expected path, or who hijacks a process through a vulnerability, inherits all of its SELinux permissions.

macOS code signatures are cryptographic. Every policy in ClearanceKit can require a specific Team ID and Signing ID — the Developer ID certificate issued to a specific organisation and the bundle identifier declared in the binary. These are verified by the kernel against the binary's embedded signature at the point the process is created. A malicious npm postinstall script, a dylib injected into a legitimate process, or a trojanised replacement binary will carry a different signature — or none at all — and will be denied regardless of where it lives on disk.

This means ClearanceKit policies express intent like "only the Safari binary signed by Apple may read Safari's cookie store", and that guarantee holds even if an attacker controls the file system.

The maintenance burden difference is significant in practice. Linux file integrity tools such as IMA/EVM, AIDE, and Tripwire identify trusted binaries by their SHA256 hash. Every software update — including security patches — produces a new hash, which invalidates any policy that referenced the old one. On an active development machine where package managers are run daily, this means policies go stale constantly. The tools that update most frequently, such as language runtimes and CLI utilities, are exactly the ones most likely to be targeted in a supply chain attack, so keeping the allowlist current requires continuous manual effort and is easily neglected.

ClearanceKit policies reference a Team ID and Signing ID, not a hash. When Apple ships a Safari update, or when a developer releases a new version of their tool, the signing identity is unchanged — the same Developer ID certificate is used to sign every release. A policy written once remains valid indefinitely across all future updates from that developer. The only time a policy needs revisiting is when you deliberately change which software you trust, not simply because that software was updated.

Installation

Download the latest DMG from the Releases page, open it, and drag clearancekit to Applications.

On first launch you will be prompted to activate the system extension and grant Full Disk Access — both are required for Endpoint Security to function.

ClearanceKit has no auto-update mechanism. This is a deliberate decision: an app that monitors what other processes do on your machine should not itself be making network calls you did not initiate. Check the Releases page manually for updates.

ClearanceKit has zero third-party dependencies. Every capability — Endpoint Security enforcement, XPC communication, SQLite persistence, SwiftUI interface, and MDM profile reading — is provided entirely by Apple's own frameworks and SDKs. There is no package manager, no vendored library, and no supply chain to audit beyond Apple's own toolchain.

Related projects

ClearanceKit occupies a specific part of the macOS endpoint security space. Two well-known projects address adjacent but distinct problems:

BlockBlock (Objective-See) monitors for process persistence — launch agents, launch daemons, login items, cron jobs, and other mechanisms a malicious process might use to survive a reboot. Where ClearanceKit asks "which processes may access which files?", BlockBlock asks "is something trying to establish a permanent foothold?". The two tools are complementary: a supply chain payload that exfiltrates credentials immediately would be caught by ClearanceKit; one that installs a backdoor for later use would be caught by BlockBlock.

Santa (North Pole Security) combines binary execution control with file access policies, and is designed for MDM-managed enterprise fleets with policy distributed via a central management server. Santa can operate in lockdown mode to block unapproved binaries from running at all — ClearanceKit has no equivalent; it does not restrict execution events. Both tools use the Endpoint Security API to authorise file access by process identity, so their file access policies are conceptually similar. The key difference is process ancestry: ClearanceKit can express rules like "allow this path only when the accessing process was launched by a trusted parent" — for example, permitting a build tool to read source files only when invoked from a trusted CI runner. Santa's file access policies evaluate the immediate process only and have no concept of ancestry. Process ancestry can make it easier to deploy in environments with other security products.

Architecture

Two components work together:

  • clearancekit.app — SwiftUI sidebar app. Manages policies, displays live events, renders a real-time pipeline throughput graph, and communicates with the system extension over XPC.
  • uk.craigbass.clearancekit.opfilter — System extension (Endpoint Security). Runs three Endpoint Security clients: one for path-based policy enforcement that intercepts file-system authorization events (ES_EVENT_TYPE_AUTH_OPEN, AUTH_RENAME, AUTH_UNLINK, AUTH_LINK, AUTH_CREATE, AUTH_TRUNCATE, AUTH_COPYFILE, AUTH_READDIR, AUTH_EXCHANGEDATA, AUTH_CLONE), a dedicated jail client that tracks jailed processes by audit token and denies file access outside their allowed path prefixes, and a tamper-resistance client that blocks signal- and suspend-based attacks on opfilter itself (AUTH_SIGNAL, AUTH_PROC_SUSPEND_RESUME). All three evaluate policies and serve the GUI over XPC.

Event pipeline

The ES kernel delivers every file-system event to both ES clients independently. Each client receives its own copy of every AUTH and NOTIFY event that passes its muting filter, and each must respond to its AUTH events separately within the kernel-enforc

Publisher informationSoftware details and release files are provided by the publisher.