Skip to main content

OpenTrustBench

PyPI version Python versions License Rules Grades

The trust and evidence layer for AI agents and MCP servers. Scan any agent, skill, or MCP tool server and get a graded Trust Card (A–F) — backed by static analysis, OWASP-mapped findings, and a machine-readable evidence trail.

pip install opentrustbench
opentrustbench scan ./my-agent
Trust Grade: F (33/100) | Findings: 5 (3 critical, 1 high) | Scope: excessive
  [CRITICAL] Direct Prompt Concatenation (Injection Vulnerability) (server.ts:24) AT-SEC-001 LLM01
  [CRITICAL] Hardcoded Credential or API Secret (server.ts:11) AT-SEC-002 LLM02
  [CRITICAL] Unbounded Dynamic Shell Execution (server.ts:16) AT-SEC-003 ASI02
  [HIGH] Unrestricted Recursive File Deletion / Modification (server.ts:31) AT-SEC-005 ASI02
  [MEDIUM] Raw Secret Leakage in Debug Logging (server.ts:25) AT-SEC-007 LLM02

Why OpenTrustBench

AI agents run code, touch files, call APIs, and spend money. Before you install an MCP server or deploy an agent, you deserve to know what it can do and where it's fragile. OpenTrustBench answers that in seconds, with zero configuration:

  • 8 detection rules (AT-SEC-001–007 + AT-COMP-001), each mapped to the OWASP LLM Top 10 2025 and the OWASP Agentic Top 10 — prompt injection, hardcoded secrets, shell escape, excessive agency, destructive operations, secret leakage, and more.
  • Trust Cards graded A–F — a single score plus a full breakdown (security, permissions, provenance, reliability, stability) in trust-card.json.
  • Permission manifests — network, filesystem, shell, secrets, and capability scope (minimal → excessive) extracted automatically.
  • Adversarial attack analysis — OWASP-aligned heuristic checks (injection override, command execution, exfiltration, memory poisoning, destructive ops) with concrete fixes.
  • SARIF + Markdown reports — drop straight into GitHub code scanning or publish as docs.
  • Shareable grade badges — embed a live badge in any README (see the public registry).
  • Honest by design — static analysis only. No code is executed, no payloads fire, no invented narratives. Reports say exactly what was found and where.

Installation

pip install opentrustbench

Prerequisites: Node.js 18+ and the OpenTrustBench CLI engine:

npm install -g @opentrustbench/cli

This package installs the opentrustbench command and connects it to the scan engine.

Quickstart

# Scan a local agent, skill, or MCP server (writes trust-card.json + reports)
opentrustbench scan ./my-agent

# Scan a GitHub repo or npm package directly
opentrustbench scan owner/repo --github
opentrustbench scan express --npm

# Adversarial attack analysis (static-heuristic: nothing executes)
opentrustbench attack ./my-agent

# Validate a workflow suite (simulation mode: steps are parsed, never run)
opentrustbench eval ./workflow.yaml

# Generate an embeddable README badge
opentrustbench badge ./my-agent

# Browse the public verified registry
opentrustbench registry

Gate CI on severity — fail the build when findings meet your bar:

opentrustbench scan . --fail-on high --quiet --format sarif --output-dir ./trust
# .github/workflows/trust.yml
- run: pip install opentrustbench && npm install -g @opentrustbench/cli
- run: opentrustbench scan . --fail-on high --format sarif --output-dir ./trust
- uses: github/codeql-action/upload-sarif@v3
  with:
    sarif_file: trust/opentrustbench-report.sarif

Command reference

Command What it does
scan <path|url|repo> Scan a target, print graded findings, write trust-card.json + SARIF/Markdown reports
attack <path-or-repo> OWASP-aligned adversarial analysis with fix guidance (static-heuristic mode)
eval <workflow.yaml> Parse and validate a workflow suite (simulation mode — nothing executes)
badge <path> Print embeddable Markdown for the target's grade badge
init Scaffold an opentrustbench.yaml config
registry Browse the public registry of scanned servers

scan flags: --github, --npm, --fail-on info|low|medium|high|critical, --format terminal|json|sarif|md, --output-dir <dir>, --quiet, --no-color.

A Trust Card looks like this

{
  "schema": "opentrustbench/trust-card/v1",
  "subject": { "type": "agent-skill", "name": "Secure Data Auditor Skill" },
  "trustScore": {
    "overall": 88,
    "grade": "B",
    "breakdown": { "security": 100, "permissions": 100, "provenance": 50 }
  },
  "compatibility": ["claude-code", "cursor", "codex"]
}

License

Apache-2.0 — see LICENSE.

Metadata

Release files for opentrustbench 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opentrustbench 0.1.3
File Size Uploaded Provenance
opentrustbench-0.1.3.tar.gz 4.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for opentrustbench 0.1.3
File Interpreter ABI Platform
opentrustbench-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 9.8 kB

Release files / opentrustbench-0.1.3.tar.gz

Download URL opentrustbench-0.1.3.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c0f5ea549d362d6f9010c35126b26e04ea51ad78b418e43e376e1f87085eccdf
BLAKE2b-256 checksum
How to use checksums
96945cd8b02e430204c57736829c7093ae92e375880940dfc7a8cbb8803023b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release files / opentrustbench-0.1.3-py3-none-any.whl

Download URL opentrustbench-0.1.3-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
75ada83d1ae4f4707defc295e539e6b9d070c98480bf90fac61d5723324d06c0
BLAKE2b-256 checksum
How to use checksums
754441faad9a1c0cc478411327499d2337f82f5ad825948879681625e2b89ebf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Security for opentrustbench 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page