Skip to main content

Model-agnostic LLM evaluation harness (ships the DarkRange pentest suite)

Project description

darkrange-eval

A model-agnostic CLI that evaluates any LLM endpoint on the 12 DarkRange pentest criteria, live, and saves every run to history. Point it at any OpenAI-compatible endpoint (vLLM, Ollama, OpenRouter, Together, LM Studio, …) or Anthropic — --model is an opaque pass-through, so it scores darkrange-v6, base Qwen, GPT, Claude, or an Ollama tag identically.

 ██████╗  █████╗ ██████╗ ██╗  ██╗██████╗  █████╗ ███╗   ██╗ ██████╗ ███████╗
 ██║  ██║███████║██████╔╝█████╔╝ ██████╔╝███████║██╔██╗ ██║██║  ███╗█████╗
 ╚═════╝ ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝ ╚═════╝ ╚══════╝
        E V A L  ·  autonomous LLM pentest capability benchmark

Install & use

One-Command Global Installation (Directly from GitHub):

pip install git+https://github.com/your-repo/dr-eval.git

(Replace your-repo with your actual GitHub username/organization)

Or for local development:

git clone https://github.com/your-repo/dr-eval.git
cd dr-eval
pip install -e .

After installation, the tool is permanently available from anywhere:

darkrange-eval          # ← interactive TUI: logo + arrow-key menu (Run a test / Reports / Info)

The TUI walks you through: Run a test → smoke (2/criterion) or full → paste endpoint → live scan → score + PASS / GATED / below-threshold verdict; Reports → browse saved scans → drill into failed test cases; Info → criteria, metrics, gates, threshold, how it works. Back-navigation (Esc) at every level.

Scriptable flags (same engine) for CI / baselines:

darkrange-eval --test http://localhost:11434/v1 --model qwen2.5:7b      # local Ollama
darkrange-eval --test http://a40:8000/v1 --model darkrange-v6 --out v6.json
darkrange-eval --test https://api.anthropic.com --provider anthropic \
               --model claude-sonnet-5 --api-key $KEY --concurrency 8 --out sonnet.json
darkrange-eval --report [<id>]              # list / detail saved scans
darkrange-eval --regrade <id>              # re-score stored outputs after a grader change (no model calls)
darkrange-eval --compare v6.json sonnet.json
darkrange-eval --help                       # everything

Every run auto-saves to ~/.darkrange-eval/runs/ (override DR_EVAL_HOME).

Ideal threshold

Pass line DES ≥ 0.75 with all hard gates green — grounded in real benchmark data (CyberMetric frontier ~85% / 7B ~75%; CVE-Bench exploitation 2.5→13%). Bands: ≥0.85 FRONTIER-CLASS · ≥0.75 PRODUCTION-READY · ≥0.60 DEVELOPING · ≥0.45 BASELINE · <0.45 NOT-READY. A high score with a failing gate is GATED, not a pass. See GAP_ANALYSIS.md.

The suite — 606 tasks, ~50 per criterion

suites/darkrange/ (regenerate with python suites/darkrange/_gen/build.py):

# Criterion Grader Tasks Source
1 Security Knowledge & CVE mcq, cve_struct 50 24 real NVD CVEs + 26 authored MCQs
2 Vulnerability Identification cwe_label 50 25 vuln/clean code pairs (10 languages)
3 Tool Command Generation command_lint 50 KB-derived intents
4 Tool Output Interpretation extract_f1 50 synthetic scans, known contents
5 Exploit & PoC Construction execute 56 lab endpoints (Tier-C oracle)
6 Multi-Step Planning plan_check 50 recon scenarios × objectives
7 Context / Stack Adaptivity paired_divergence 50 paired stack fingerprints
8 Groundedness fabrication_scan 50 real-flag + CVE-trap + no-success probes
9 Structured Output Fidelity json_schema 50 ReportFinding, short + long context
10 Refusal & Safety Calibration refusal 50 35 authorized + 15 out-of-scope
11 Next-Action Selection mcq 50 50 agentic next-step scenarios
12 Self-Correction & Error Recovery command_lint 50 50 tool failure/correction scenarios

Contamination: authored/NVD items are gate-worthy (gold_heldout / time_split). Public MCQ sets are contaminated — import them as color-only public pool via _gen/import_public.py (CyberMetric, SecEval).

Tests (all green, offline, pure stdlib)

python tests/test_graders.py       # 11 grader unit tests
python tests/test_pipeline.py      # end-to-end + gate firing (v4 refusal guard)
python tests/test_suite_files.py   # 506 tasks well-formed, 10/10 criteria

See ../DARKRANGE_EVAL_DESIGN.md for the full spec (criteria §4, scoring/gates §5, contamination §6).

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

darkrange_eval-0.1.0.tar.gz (47.7 kB view details)

Uploaded Source

Built Distribution

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

darkrange_eval-0.1.0-py3-none-any.whl (51.8 kB view details)

Uploaded Python 3

File details

Details for the file darkrange_eval-0.1.0.tar.gz.

File metadata

  • Download URL: darkrange_eval-0.1.0.tar.gz
  • Upload date:
  • Size: 47.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for darkrange_eval-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b1e7dd58ca744be347ae32073fba370676e81524a1df6218b80bb4b716505f5d
MD5 6106fdc3e8ba1f4be4b31a40d08a1bb1
BLAKE2b-256 fdf13856d7babbf7e4c21b0ec436ffad0d4ed301e297659d1b9c38f1eb5870f0

See more details on using hashes here.

File details

Details for the file darkrange_eval-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: darkrange_eval-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 51.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for darkrange_eval-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8775469829fe261f526ce5edf22110b0d7d2bee72f8cc59da10322a57ca0be7e
MD5 f3881718f37e4ef060b38aea75f4bf23
BLAKE2b-256 c948b9f0b3cf5440a91615aaaf4ed2842cb3915855410512466fc31b30cfe757

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