Skip to main content

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prismor-1.17.7.tar.gz (6.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prismor-1.17.7-py3-none-any.whl (531.5 kB view details)

Uploaded Python 3

File details

Details for the file prismor-1.17.7.tar.gz.

File metadata

  • Download URL: prismor-1.17.7.tar.gz
  • Upload date:
  • Size: 6.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for prismor-1.17.7.tar.gz
Algorithm Hash digest
SHA256 c017a859f340faa51942c00c23d0a584c53bdf65118e58f245447c87ecc58c75
MD5 cb6aac3015934b2d8ed1c4d3c6c6e4d5
BLAKE2b-256 0b549838fb55541f27cd91bfb12aeb7018a7c78fea32f163b5949b1d13a50e00

See more details on using hashes here.

File details

Details for the file prismor-1.17.7-py3-none-any.whl.

File metadata

  • Download URL: prismor-1.17.7-py3-none-any.whl
  • Upload date:
  • Size: 531.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for prismor-1.17.7-py3-none-any.whl
Algorithm Hash digest
SHA256 24616f4db3f7274d8d84f6cc7374981afc94c0e7072c2298cf9a5dc2a773a794
MD5 64f9e800e416f8eed21d6e95b0e3fcf7
BLAKE2b-256 19fab98dc1934cefcd6c22ad3b37cc54c8343be50c78978b94ed59b38e236bcf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page