harness-security-bench

Runs the Darwin Shield security benchmark to evolve and grade vulnerability-detection harnesses against baselines.

70.1k|8.4k|Updated Jun 2, 2025
One-click install
npx skills add https://github.com/ruvnet/claude-flow --skill harness-security-bench
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: harness-security-bench
Source: https://github.com/ruvnet/claude-flow/tree/main/plugins/ruflo-metaharness/skills/harness-security-bench
Command: npx skills add https://github.com/ruvnet/claude-flow --skill harness-security-bench

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @metaharness/darwin, and includes scripts (resource) components.

What problem does it solve?

Validating that a security-detection harness actually improves over static or single-pass LLM approaches requires a ground-truth corpus and measurable gates; this Skill runs the upstream @metaharness/darwin security bench to evolve a champion detector and grade it on TPR, FPR, patch-pass, reproduction, and unsafe-output metrics.

Core Features & Use Cases

  • Evolutionary Benchmarking: Shells out to npx @metaharness/darwin security bench with configurable population, cycles, and seed to evolve a champion detection harness against a 10-vulnerability / 9-decoy corpus.
  • Gate and Baseline Grading: Parses the markdown report into structured JSON covering 11 pass/fail gates and a four-row baseline table (static-only, LLM single-pass, fixed agent, Darwin champion).
  • Nightly ADR-155 Integration: Emits trajectory records for ruflo's self-learning security harness, with --alert-on-fail exit codes and graceful degradation when the upstream package is absent.
  • Use Case: Run the bench nightly in CI to detect drift in detection quality; if the champion's fitness drops week-over-week, investigate mutator policy or corpus changes before trusting downstream learning loops.

Quick Start

Ask the agent to run the security bench with default settings, for example: run the harness security bench with population 2 and cycles 1 and alert me if it fails.

Frequently Asked Questions about harness-security-bench

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run the Darwin Shield security benchmark?

Invoke the skill which shells out to `npx -y @metaharness/darwin@~0.8.0 metaharness-darwin security bench` with optional --population, --cycles, and --seed flags. Default settings of population 2 and cycles 1 take roughly 144 seconds.

What metrics does the security bench report?

The bench reports overall PASS/FAIL plus per-gate results covering TPR improvement, FPR reduction, patch-test pass rate, reproduction success, unsafe outputs, and cost limits. It also outputs a baselines table comparing static-only, LLM single-pass, fixed agent, and Darwin champion harnesses on fitness, TPR, and FPR.

What happens if @metaharness/darwin is not installed?

The skill degrades gracefully: it emits a JSON object with degraded set to true and reason 'metaharness-darwin-not-available', then exits with code 0. No error is raised, so nightly pipelines continue running.

How do I make the bench fail CI when detection regresses?

Pass the --alert-on-fail flag. When the overall bench result is FAIL, the script exits with code 1 instead of 0, which CI systems interpret as a failure. Exit code 2 indicates configuration or upstream infrastructure errors.

How long does the security benchmark take to run?

Runtime is estimated as 3 seconds times 19 evaluations times population times cycles, plus 30 seconds overhead. The default population 2 and cycles 1 takes about 144 seconds, while population 4 and cycles 3 takes roughly 12 minutes.