← Discover MCPs and Agents
E
AgentAI & MLGitHub

Eresus-sentinel

AI/LLM security scanner — model artifact analysis, prompt injection firewall, MCP agent validation, pickle/safetensors/GGUF fuzzing. Zero false positives.

Links

README

From the repo.

Version Python License Status

Eresus Sentinel

Alpha-stage, deterministic-first AI security toolkit for local audits, MCP/agent checks, model artifact scanning, and prompt firewall testing.

Sentinel provides deterministic, YAML-driven security scanning across the AI stack — from model artifacts and prompt firewalls to supply chain auditing and red team automation. Zero AI is required to produce findings; AI/judge adapters are optional enrichment layers.

Eresus Sentinel Demo


What It Detects

  • Serialization RCE — Pickle/joblib/dill GLOBAL opcodes against 300+ blocklisted module.function pairs
  • Framework code injection — Keras Lambda bytecode, TorchScript code/ backdoor, PMML/Jinja2 SSTI, auto_map RCE
  • Archive exploits — Zip Slip, path traversal, symlink attacks in ZIP / TAR / 7z / .mar / .nemo
  • Embedded secrets — 2000+ API key patterns, connection strings, hardcoded tokens in model metadata
  • Network callbacks — socket/urllib/requests globals in pickle; C2 URLs in GGUF metadata
  • Supply chain tampering — missing hash integrity, typosquatting, OSV.dev CVE lookup
  • Prompt / agent injection — instruction injection in model cards, MCP tool description hijacking
  • Backdoored weights — statistical anomalies, entropy outliers, suspicious weight distributions (heuristic)

Supported Formats

70+ scanners across model, archive, and configuration formats. No model is ever loaded or executed.

FormatExtensionsRisk
Pickle / Joblib.pkl .pickle .p .dill .dat .data .joblibCRITICAL
PyTorch.pt .pth .bin .ckptCRITICAL
TorchScript.torchscript (ZIP)HIGH
TorchServe.marHIGH
Torch7 (Lua).t7 .th .netHIGH
NumPy.npy .npzHIGH
Keras.keras .h5 .hdf5HIGH
TensorFlow.pb .meta saved_model/HIGH
Skops.skopsHIGH
R Serialized.rds .rda .rdataHIGH
NeMo.nemoHIGH
CNTK.dnn .cmfHIGH
ONNX.onnxMEDIUM
JAX / Orbax / Flax.jax .checkpoint .orbax .msgpackMEDIUM
TFLite.tfliteMEDIUM
ExecuTorch.pte .ptlMEDIUM
TensorRT.engine .plan .trtMEDIUM
CoreML.mlmodel .mlpackageMEDIUM
CatBoost / XGBoost / LightGBM.cbm .bst .lgbMEDIUM
PaddlePaddle.pdmodel .pdiparamsMEDIUM
MXNet*-symbol.json *.paramsMEDIUM
SafeTensors.safetensorsLOW
GGUF / GGML.gguf .ggml .ggmf .ggjt .ggla .ggsaLOW
OpenVINO / PMML.xml .pmmlLOW
Llamafile.llamafileLOW
ZIP / TAR / 7z.zip .tar .tar.gz .7zHIGH (traversal)
RAR.rarFail-closed
JSON / YAML manifestsconfig.json *.yamlHIGH
Jinja2 templates.j2 .jinja .jinja2CRITICAL

Full format documentation with detection details

Security Domains

DomainModuleCoverage
🔬 Artifactartifact/70+ scanners — Pickle, Torch, Keras, ONNX, GGUF, Safetensors, TFLite, Archives
🛡️ Input Firewallfirewall/input/22 guardrails — Injection, secrets, PII, encoding attacks, invisible text, toxicity
🔒 Output Firewallfirewall/output/24 guardrails — Bias, compliance, copyright, watermark, format enforcement
🔍 SASTsast/Static analysis + 120+ secret patterns + entropy + git history scanning
🤖 Agent/MCPagent/Trust maps, permissions, MCP schema validation, live MCP discovery
📦 Supply Chainsupply_chain/Dependency scanning, typosquatting, OSV.dev, provenance
⚔️ Red Team / Evalredteam/48 probes + 13 detectors + 14 generators + YAML playbook/eval engine
🔗 MCP Proxymcp_proxy.pyLive intercepting proxy (stdio/HTTP) with OPA policy enforcement
🚦 Runtime Gatewayruntime_gateway.pyProvider-neutral LLM gateway contract with monitor/enforce modes
📓 Notebooknotebook_scanner/Jupyter security scanning (14 plugins)
📝 Diffdiff_scanner/Git diff/PR ML anti-pattern detection

Domain Maturity

DomainMaturity
Pickle/artifact no-load scanningBeta
Prompt firewall deterministic checksBeta
SAST/secrets/notebook/diffBeta
MCP manifest/live scanningBeta
MCP proxy runtime enforcementExperimental
Dashboard/APIExperimental
HF/supply-chain live integrationsExperimental
Runtime gateway provider adaptersExperimental
AI/judge enrichmentOptional experimental

Quick Start

# Install
pip install -e ".[dev]"

# Verify installation
sentinel doctor
sentinel doctor --json

# Preview the scanner plan, then scan a project
sentinel scan ./my-project --plan --profile fast
sentinel scan ./my-project/

# Firewall a prompt
sentinel firewall "user input text"

# Scan model artifacts
sentinel artifact ./models/

# Red team assessment
sentinel redteam --target openai/gpt-4o

# Config-driven eval
sentinel evaluate eval.yaml

# Live/manifest MCP scan
sentinel mcp scan ./mcp-manifest.json

# Interactive shell
sentinel shell

Architecture

┌──────────────────────────────────────────────────────────────┐
│                    Eresus Sentinel CLI                        │
│               (Python · Click + Rich terminal)               │
├──────────┬──────────┬──────────┬──────────┬──────────────────┤
│ Artifact │ Firewall │   SAST   │ Agent/   │  Supply Chain    │
│ Scanner  │ (I/O)    │ Analyzer │ MCP      │  Auditor         │
├──────────┴──────────┴──────────┴──────────┴──────────────────┤
│                    YAML Rule Engine                           │
│              (rules/ — zero hardcoded regex)                  │
├──────────────────────────────────────────────────────────────┤
│               Finding Universal Data Model                    │
│          (7 domain factories + dedup fingerprints)            │
├──────────────────────────────────────────────────────────────┤
│  MCP Proxy  │  Eval Runner  │  Runtime Gateway  │ Telemetry │
├──────────────────────────────────────────────────────────────┤
│           AI-Assisted Layer (optional, pluggable)             │
│        OpenAI / Anthropic / Local GGUF / Generic REST        │
└──────────────────────────────────────────────────────────────┘

Key Design Principles

  • Deterministic-first — All scanning is regex/AST/opcode-based. No AI dependency for findings.
  • YAML-driven rules — All patterns in rules/*.yaml. Zero hardcoded regex in code.
  • Plugin auto-discovery — Drop a scanner class, it's automatically registered.
  • Lazy loading — Modules load on-demand for fast CLI startup.
  • SARIF v2.1.0 output — Native GitHub Security tab integration.

CLI Commands

The most common commands are:

sentinel scan ./project --profile fast -f json
sentinel artifact ./models -f sarif
sentinel firewall "user input text" -f json
sentinel mcp scan ./mcp-manifest.json
git diff main...HEAD | sentinel diff - -f sarif

See docs/CLI_REFERENCE.md for the full command table and docs/CLI_CONTRACT.md for exit codes and output shape.

Python SDK

from sentinel import Sentinel

s = Sentinel()

# Scan input
result = s.scan_input("user prompt here")
print(result.findings)

# Scan output
result = s.scan_output("prompt", "llm response")

# Full conversation scan
result = s.scan_conversation("prompt", "response")

# Export to SARIF
s.export_sarif(result.findings, "report.sarif")

Config-Driven Eval

# eval.yaml
providers:
  - id: local-echo
    name: echo
prompts:
  - id: greeting
    prompt: "hello {{name}}"
tests:
  - id: alice
    vars: { name: Alice }
    assertions:
      - type: contains
        expected: Alice
sentinel evaluate eval.yaml --fail-on-threshold 0.95
sentinel evaluate eval.yaml -f json -o eval-report.json

MCP Live Scanner

Scan offline manifests or live MCP JSON-RPC endpoints:

sentinel mcp scan ./mcp-manifest.json
sentinel mcp scan --url http://localhost:3000/mcp
sentinel mcp scan --stdio-command npx my-mcp-server

The scanner discovers tools, prompts, resources, server instructions, auth metadata, and readiness signals.

Runtime Gateway

from sentinel.runtime_gateway import SentinelGateway, EchoProviderAdapter

gateway = SentinelGateway(provider=EchoProviderAdapter())
decision = gateway.complete("user prompt")
if decision.blocked:
    print(decision.response.text)

REST API

# Start Web UI dashboard
export SENTINEL_PASSWORD=change-me
sentinel dashboard
# Open http://127.0.0.1:8080

# If running from source and the UI is missing:
# Node.js 20.19+ is required by Vite/React Router.
cd frontend && npm install && npm run build

# Start API server
sentinel serve --host 0.0.0.0 --port 8080

# Scan endpoint
curl -X POST http://localhost:8080/scan/input \
  -H "Content-Type: application/json" \
  -d '{"text": "user prompt"}'

MCP Proxy

Intercept and inspect all MCP protocol traffic in real-time:

# Stdio mode — wrap any MCP server
sentinel proxy --transport stdio --mode enforce --server-cmd npx my-mcp-server

# HTTP mode — reverse proxy
sentinel proxy --transport http --mode enforce --upstream http://localhost:3000 --port 8080

Configuration

Engine is configured via sentinel.toml:

[engine]
mode = "deterministic"    # "ai-assisted" | "full"
min_severity = "MEDIUM"
action_policy = "balanced" # "advisory" | "strict"

[scanners.artifact]
enabled = true

[scanners.firewall.input]
enabled = true

[scanners.firewall.output]
enabled = true

[scanners.sast]
enabled = true

[scanners.redteam]
enabled = false  # Opt-in only

[ai]
enabled = false
backend = "ollama"
model = "llama3.2"

Docker

# Standard
docker build -t eresus-sentinel .
docker run -v ./models:/data eresus-sentinel scan /data

# GPU-accelerated (CUDA)
docker build -f Dockerfile.cuda -t eresus-sentinel:cuda .

# Docker Compose (API + worker)
docker compose up

CI/CD Integration

GitHub Actions

- name: Sentinel Security Scan
  run: |
    pip install eresus-sentinel
    sentinel scan ./src --format sarif --output sentinel.sarif

- name: Upload SARIF
  uses: github/codeql-action/upload-sarif@v3
  with:
    sarif_file: sentinel.sarif

Documentation

Full Documentation | Quick Start | Supported Formats | Security Model

TopicLink
Getting startedQuick Start · Turkish
Format coverageSupported Formats
Scanner controlScanner Selection
Threat modelSecurity Model
Air-gapped deployOffline Usage
Python/OS compatCompatibility Matrix
CLI flagsCLI Reference · CLI Contract
Write rulesRule Authoring · YAML Rules
Write scannersScanner Authoring
CI / pre-commitCI and Pre-Commit
Reduce noiseFalse Positive Handling
OpsMCP Proxy · Troubleshooting · FAQ

Authentication & Security

For production deployments:

# Enable API authentication
export SENTINEL_AUTH_TYPE=bearer
export SENTINEL_AUTH_TOKEN=your-secret-token

# Restrict CORS
export SENTINEL_CORS_ORIGINS=https://yourdomain.com

# Enable audit logging
export SENTINEL_AUDIT_LOG=/var/log/sentinel/audit.jsonl

# Rate limiting (configured via SENTINEL_RATE_LIMIT)
export SENTINEL_RATE_LIMIT=100/minute

See Security Policy for full hardening guide.

Requirements

  • Python 3.10+
  • Core dependencies: pyyaml, rich
  • API server: pip install eresus-sentinel[api] (adds fastapi, uvicorn)
  • Web dashboard: pip install eresus-sentinel[web]
  • ML scanning: pip install eresus-sentinel[ml] (adds torch, transformers)
  • Rust pickle backend: cd rust/sentinel-pickle && maturin develop --release
  • All extras: pip install eresus-sentinel[all]

Alpha Disclaimer

This is alpha software. APIs, CLI flags, finding schemas, and rule IDs may change between releases without deprecation notice. Do not depend on output stability in production CI pipelines yet.

Community

License

Proprietary — © 2026 Eresus Security. See LICENSE.


Eresus Security · eresussec.com

Collected info

  • 13 stars
  • 1 forks
  • Language: Python
  • Source updated: 8/19/2026