# Repository Briefing: PrismorSec/prismor
> Source: https://repoforai.com/repo/PrismorSec/prismor (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/PrismorSec/prismor
- **Official Docs / Website**: https://prismor.dev
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: Python
- **License**: Apache-2.0
- **Engineering Health**: A+ (93/100 · Maintenance 35/35 · Adoption 18/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v1.82.0 (2026-12-03) — https://github.com/PrismorSec/prismor/releases
- **Review Snapshot**: 2026-12-03 (Note: v1.82.0 on 2026-12-03 shipped after this review; verify latest release notes)
- **Deployment / Stack Signals**: MCP, Self-Hosted, CLI
- **Momentum**: 885 ★ total (+0 24h / +214 7d) · 127 forks
- **Topics**: `agent-control-plane`, `agent-security`, `agents`, `ai-agents`, `ai-governance`, `ai-safety`, `ai-security`, `claude-code`, `control-plane`, `cybersecurity`, `devsecops`, `llm-security`
- **When to Use**: Best for: Teams rolling out shared controls for coding agents and MCP tools that want to observe real activity first, then enforce selected rules or require approval with a local audit trail. Skip if: Native permission prompts already meet your needs, or your security model requires platform-wide isolation for actions outside supported hooks, gateways, and adapters.

## Overview
```text
### Architecture & Core Mechanics
Prismor is a Python control plane that sits in the tool-call path rather than replacing the agent or model. Supported agent hooks and adapter integrations feed a shared policy engine before execution. The MCP gateway is another entry point: it evaluates `tools/call` before forwarding and scans the upstream response for injection before it reaches model context. Calls and findings feed a tamper-evident audit trail, with session views backed by local workspace databases.

The package declares Python 3.8 or later and `pyyaml>=6.0`, and uses Hatchling for builds. The root tree separates `prismor/`, `adapters/`, and client integration directories such as `.claude-plugin/` and `.codex/`. Workspace policy lives in `.prismor/policy.yaml`. Organization, project, and repository layers determine the applicable policy subject to a non-overridable floor. Each rule can set its own observe or enforce mode; the effective policy, not the hook's install flag alone, determines normal enforcement.

### Key Capabilities & Differentiators
Operators can log findings without blocking, deny actions before execution, or require human approval for a specific MCP server or tool. MCP server allowlists match URLs, packages, or exact launch commands instead of display names. Other controls cover install-time supply-chain checks with IOC matching and risk scoring, skill and MCP scanning, and policy-driven network egress. On macOS, Seatbelt constrains an allowed shell command and its child processes, including package postinstall scripts, with restrictions on writes, credential stores, and network access.

Injection detection combines regex and heuristic screening with an optional model judge for uncertain inputs. Claude Code and Codex use existing CLI logins; the API option uses a LiteLLM model and key. A deterministic benchmark is available in `scripts/bench_policy.py`. The reported 30% recall improvement across 800+ cases is a separate result for the judge-enabled setup; the evaluation corpus is not checked in, so that gain should not be treated as a reproducible deployment baseline.

### Trade-offs & Limitations
Compared with native permission prompts, Prismor adds shared policy, selective rollout, and a common audit view across supported clients, but it also gives operators rules and integrations to maintain. Compared with OS sandboxing or network controls alone, it can make decisions with tool and MCP server context. It cannot protect a path it does not intercept. The Seatbelt shell sandbox is macOS-specific; validate controls separately on each client, execution path, and OS rather than assuming uniform coverage.

Observe mode makes rollout less disruptive, but it does not stop anything. Strict enforcement means tuning exceptions and accounting for flows that need shell or network access. The model judge can handle ambiguous text at the cost of an extra inference step and another data-handling boundary. Apache-2.0 permits commercial self-hosting under its terms, but local traces and signed attestation bundles are audit inputs, not proof of compliance.

### Hardware & Deployment Guide
Start with `pip install prismor` and `prismor setup`. The package is marked Beta, declares Python >=3.8, and lists POSIX and macOS classifiers. Run `prismor dashboard` for the local UI at `127.0.0.1:7070`, use `--no-open` to leave it running without launching a browser, or use `prismor traces` to review sessions from a terminal. The dashboard reads local workspace databases without requiring a cloud backend. Leave the optional judge disabled if you need to avoid model-service calls from the guard; that choice alone does not isolate agent traffic.

Pilot in observe mode, inspect actual tool traffic, then move selected rules to enforce and test the result per client and entry point. No GPU or database server is listed as a prerequisite for this setup. In v1.80.14, floor rules were narrowed after blocking ordinary commands; v1.81.0 filters idle MCP gateway handshakes in the dashboard and preserves approvals when the queue is full. These are useful areas to recheck when upgrading an enforced deployment.
```

## Key Capabilities
```text
- Policy rollout: `settings.default_mode` defaults to `observe`; explicit rule modes let operators enforce selectively.
- MCP traffic path: The gateway evaluates `tools/call` before forwarding and scans responses before they reach model context.
- MCP server identity: Allowlists match the URL, package, or exact command rather than trusting a display name.
- Shell confinement: `prismor sandbox on` uses macOS Seatbelt to restrict allowed shell commands and their child processes.
- Injection detection: Regex and heuristics provide a deterministic path; uncertain cases can go to a Claude Code, Codex, or LiteLLM API judge.
- Local audit: `prismor dashboard` and `prismor traces` expose session events and findings backed by local workspace databases.
```

## Quick Start / Clone
```bash
pip install prismor
prismor setup
```
