Runtime security for AI coding agents: policy enforcement, secret prevention, and supply-chain blocking.
Project description
Prismor
formerly Immunity Agent
Runtime security for AI coding agents. Policy enforcement, secret prevention, supply-chain blocking, and session auditing — all running locally on your machine.
What it does
AI coding agents execute shell commands, read files, call APIs, and install packages autonomously. Prismor sits between the agent and the operating system to:
- Block dangerous actions before they run — destructive commands, privilege escalation, reverse shells, secret exfiltration
- Intercept package installs and score them for supply-chain risk before they touch your disk
- Prevent secrets from reaching the model — register a secret under a placeholder name; Prismor resolves it locally through supported hooks or
prismor cloak run - Log every tool call to a local SQLite store for session review and auditing
- Keep a tamper-evident audit trail where every action is hash-chained and Ed25519-signed, so
prismor trail verifycatches edited, deleted, or rewritten history - Find shadow AI on the host with
prismor discover, flagging any agent installed on the machine that runs without Prismor hooks - Hand auditors a signed evidence bundle with
prismor attest, packaging posture, agent inventory, host discovery, framework-control coverage (OWASP LLM/Agentic, NIST AI RMF, EU AI Act), and the trail anchor into one file anyone re-verifies withprismor attest verify
Supports Claude Code, Cursor, Windsurf, and more.
Install
pip install prismor
Requires Python ≥ 3.8 and PyYAML (installed automatically).
Quick start
Install Prismor hooks into your project (enforces policy on every agent tool call):
prismor install-hooks --agent claude --workspace . --mode observe
Start in observe mode to log would-be blocks without interrupting the agent. Switch to enforce when ready:
prismor install-hooks --agent claude --workspace . --mode enforce
Wrap your package manager to score installs before they run:
prismor supplychain npm install express
prismor supplychain pip install requests
prismor supplychain cargo add serde
Check a command against policy before running it:
prismor check "rm -rf /"
# BLOCK destructive_command CRITICAL
Audit your workspace security posture:
prismor audit
Scan AI tool configs for leaked secrets:
prismor sweep
Launch the self-hosted dashboard (reads from local SQLite, no cloud):
prismor dashboard # opens http://127.0.0.1:7070 in your browser
Detection coverage
Prismor ships with 56 rules covering the OWASP Top 10 for LLM Applications:
| Category | Severity | What it catches |
|---|---|---|
| Destructive command | CRITICAL | rm -rf /, mkfs, dd to disk |
| Secret exfiltration | CRITICAL | cat .env | curl, piping credentials outbound |
| RCE canary | CRITICAL | Reverse shells, bash -i /dev/tcp |
| Privilege escalation | CRITICAL | chmod +s, sudoers edits, useradd |
| Remote execution | HIGH | curl | bash, wget | sh |
| Secret access | HIGH | Reads of .env, .aws/credentials, .ssh/id_rsa |
| Path traversal | HIGH | ../../etc/passwd, /proc/self/environ |
| DB modification | HIGH | DROP TABLE, DELETE FROM in shell commands |
| Prompt injection | HIGH | ignore instructions, reveal system prompt |
| Risky write | MEDIUM | Edits to Dockerfile, CI workflows, package.json |
Rules are defined in YAML and fully customizable per-project.
Supply chain enforcement
The prismor CLI wraps your package manager and evaluates every install against live threat intelligence before it runs. Packages are scored on age, maintainer count, install scripts, and known IOCs. Ships with IOC coverage for recent attacks including the AntV hijacked-maintainer attack (May 2026) and the mini-shai-hulud campaign (May 2026).
prismor supplychain npm install @tanstack/react-router
BLOCK score 100 @tanstack/react-router
42 @tanstack/* packages compromised via CI/CD cache poisoning
Verdicts: < 30 allow · 30–59 warn · ≥ 60 block. IOC matches always block.
Secret cloaking
Register a secret under a placeholder name:
prismor cloak add stripe_key
# prompts for the value — never stored in shell history
prismor cloak add --env-file .env
# imports each KEY=VALUE entry as @@SECRET:KEY@@
Reference it in agent instructions:
Run: curl https://api.stripe.com -H "Authorization: Bearer @@SECRET:stripe_key@@"
Claude/Hermes cloaking can substitute the real value at execution time and scrub echoed values before they return to the model. Codex hooks are block-only, so Prismor blocks literal placeholder execution there; use the Prismor-owned runner instead:
prismor cloak run -- curl https://api.stripe.com -H "Authorization: Bearer @@SECRET:stripe_key@@"
Modes
| Mode | Behaviour |
|---|---|
observe |
Logs all findings, never blocks. Good for the first 24–48 h on a new workspace. |
enforce |
Blocks dangerous actions in real time before the agent executes them. |
Links
- Repository: https://github.com/PrismorSec/prismor
- Docs: https://docs.prismor.dev
- Dashboard: https://prismor.dev
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prismor-1.26.1.tar.gz.
File metadata
- Download URL: prismor-1.26.1.tar.gz
- Upload date:
- Size: 545.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3bfa2909e0b5081a6911b7b8775abf6c4d4ac0dcedce7a4d2c98125991a4add
|
|
| MD5 |
155a007adb054afb48c68946328b9b36
|
|
| BLAKE2b-256 |
f91d1cd0813622125b414e63262263a7bbc971a146f08e7f60d58182622d7c34
|
Provenance
The following attestation bundles were made for prismor-1.26.1.tar.gz:
Publisher:
release.yml on PrismorSec/prismor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prismor-1.26.1.tar.gz -
Subject digest:
f3bfa2909e0b5081a6911b7b8775abf6c4d4ac0dcedce7a4d2c98125991a4add - Sigstore transparency entry: 2164502947
- Sigstore integration time:
-
Permalink:
PrismorSec/prismor@522ad188d3628f02f0f2631eebe13f37469c2ff7 -
Branch / Tag:
refs/tags/v1.26.1 - Owner: https://github.com/PrismorSec
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@522ad188d3628f02f0f2631eebe13f37469c2ff7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file prismor-1.26.1-py3-none-any.whl.
File metadata
- Download URL: prismor-1.26.1-py3-none-any.whl
- Upload date:
- Size: 603.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa8a2154102d626ee6d1a076cdb94db89fd087222daa7847845a2a3f7f778563
|
|
| MD5 |
3a3e46c89b79a682bd48cda22ed25cb1
|
|
| BLAKE2b-256 |
3094b8c266a44aa6fec10665b9f0b4cd0cbb10c4ef2275d8f1a0690624ffd8be
|
Provenance
The following attestation bundles were made for prismor-1.26.1-py3-none-any.whl:
Publisher:
release.yml on PrismorSec/prismor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prismor-1.26.1-py3-none-any.whl -
Subject digest:
fa8a2154102d626ee6d1a076cdb94db89fd087222daa7847845a2a3f7f778563 - Sigstore transparency entry: 2164502973
- Sigstore integration time:
-
Permalink:
PrismorSec/prismor@522ad188d3628f02f0f2631eebe13f37469c2ff7 -
Branch / Tag:
refs/tags/v1.26.1 - Owner: https://github.com/PrismorSec
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@522ad188d3628f02f0f2631eebe13f37469c2ff7 -
Trigger Event:
push
-
Statement type: