# runtime-provisioner

Adopt this skill: https://proskills.md/skills/other/nealbridges-vulnhunter-skills-runtime-provisioner

Page: https://proskills.md/skills/other/nealbridges-vulnhunter-skills-runtime-provisioner
This document is the public skill bundle for that page. It contains SKILL.md and every helper file the catalog carries. No login is required.

## File: skills/runtime-provisioner/SKILL.md
size: 4432
upstream: https://github.com/nealbridges/vulnhunter/blob/main/skills/runtime-provisioner/SKILL.md

```text
---
name: runtime-provisioner
description: VulnHunter sandbox-depth decision procedure. For each confirmed finding, classify its proof requirements, choose the cheapest sufficient sandbox (Docker container by default), record the runtime on the finding, and ensure Medium+ findings execute against the real dependency — no mocks at the boundary without an explicit, severity-capping EXECUTED-MOCK record. Use during the vulnhunt scan's Phase 2b after a finding is confirmed.
trigger:
  - /runtime-provisioner
  - user asks to decide sandbox depth or runtime for a finding
---

# Runtime Provisioner — the sandbox-depth decision

## Purpose

Every VulnHunter finding makes two claims: a **mechanism** (this input reaches
this sink) and an **impact** (an attacker gains something they did not have).
The mechanism claim is cheap to assert; the impact claim is only proven by
execution against the real dependency. This procedure decides, per finding,
how much runtime the impact claim needs, executes it, and records the choice
so the report can show *what was done to prove it* — not just that something
was done.

## Placement in the methodology

Phase 2b, per candidate — **after** confirmation (Phase 2b's adversarial
verify), because the sandbox decision depends on what the finding needs to
prove. The decision feeds `poc-impact` (Phase 3): the provisioned runtime is
where the PoC executes and the impact is measured.

## Step 1 — Classify proof requirements

For the candidate finding, enumerate what execution the impact claim needs:

- **Boundary type** — what does the sink live behind? (query grammar, HTTP
  client, queue, filesystem, crypto primitive, auth service, parser, ORM…)
- **Attacker-reachable surface** — which attacker-controlled inputs must
  flow to the sink for the impact to materialize?
- **Observable outcome** — what does "the attacker wins" look like?
  (a row returned, a file read, a request issued, a state change, a payload
  executed). If you cannot state the outcome in one sentence, return to the
  finding and restate it as an outcome before choosing a runtime.

## Step 2 — Choose the cheapest sufficient sandbox

Fixed preference order; never skip a cheaper option without written cause:

1. **Docker container** (default — uniform, disposable, matches CI, immune
   to host drift). Record the image and version tag.
2. **In-process harness**, only if the dependency cannot containerize cheaply
   (e.g. a licensed mainframe-backed service in the target's own infra).
   Record the harness description and the exact dependency version pinned.
3. **Static trace only** when the boundary genuinely cannot be exercised.
   This MUST be justified in writing on the finding — it is never the default.

## Step 3 — Execute at the chosen depth

Medium and above must execute in a container. No exceptions. A mock is
allowed only when the real dependency is genuinely unavailable, and then the
finding MUST record `EXECUTED-MOCK` and its severity ceiling is Low until a
real-boundary run is done.

## Step 4 — Record the runtime on the finding

Every finding MUST carry a Runtime line in one of these forms:

- `Runtime: docker:<image>@<tag>`
- `Runtime: in-process:<description>`
- `Runtime: static — <justification>`
- `Runtime: EXECUTED-MOCK — <what was mocked and why>; severity ceiling Low`

A finding without a Runtime line is incomplete and MUST NOT be reported.

## Step 5 — Cross-check before hand-off

Before handing the finding to `poc-impact`, verify:

- the Runtime line is present and well-formed;
- the recorded runtime actually executed the boundary (not a proxy for it);
- for Medium+: the run was in a container, or `EXECUTED-MOCK` is recorded
  with the severity ceiling noted.

## The blunt sentence

A mechanism-proving assertion is not an impact measurement. "The query string
contains `OR WorkflowId IS NOT NULL`" is the mechanism. The finding is "a
victim tenant's row was returned to the attacker's listing." If your test
asserts the first, it has not proven the second.

## Env contract

| Variable | Required | Purpose |
|---|---|---|
| `VULNHUNT_SKILLS_DIR` | no | Override the skills root this skill is loaded from. |
| `VULNHUNT_HOST_CMD` | no | Command prefix for harness session invocation, when the host harness must be driven explicitly. |
| `VULNHUNT_DIR` | no | Findings directory, when operating on a prepared scan workspace. |
```

## File: README.md
upstream: https://github.com/nealbridges/vulnhunter/blob/main/README.md

```text
# VulnHunter

> [!NOTE]
> **A maintained fork** of [Capital One's
> VulnHunter](https://github.com/capitalone/VulnHunter) (Apache-2.0) — built to
> run on **any agent harness**, not just Claude Code. This fork's focus:
> **harness portability**, **sandboxed (containerized) exploit validation**,
> and **measured-impact PoCs**. See
> [Why the changes](#why-the-changes) ·
> [What this fork changes](#what-this-fork-changes) ·
> [The numbers](#the-numbers-behind-the-fork).

> **From pattern-matching to provability.**

VulnHunter is an open-source, **agentic AI security tool** that applies proactive, attacker-first analysis directly to source code. 

Unlike traditional, passive SAST scanners that flag suspicious patterns and often cause false positives, VulnHunter reasons like an adversary. It **identifies** which defects are actually exploitable, maps prospective attack paths, and proposes targeted, evidence-backed fixes.

Modern software supply chains are deeply interconnected. A single vulnerability in a widely-used open-source component can ripple across thousands of enterprises simultaneously.

VulnHunter was developed internally at Capital One and open-sourced for the community. This fork carries that work forward — same methodology, reworked to run on **any agent harness**, with **sandboxed (containerized) exploit validation** and **measured-impact PoCs** as the roadmap. See [What this fork changes](#what-this-fork-changes).

----

> **Dual-use caution**
> VulnHunter performs dual-use cybersecurity work (vulnerability discovery and
> exploitation). Expect guardrails: most commercially available models apply
> dual-use cyber safeguards, and aggressive exploitation behavior can trip
> rate limits or usage flags. VulnHunter's development and testing ran on
> open-weight, community-provided models — de-risked, abliterated, and
> uncensored — which are the models likely to matter for organizational use
> going forward. Audit only code you own or are otherwise authorized to
> audit.

---

> [!IMPORTANT]
> **Prerequisites & Model Requirements**
> VulnHunter's methodology is built to run on **open-weight, community-provided
> models** — the de-risked, abliterated, uncensored ones organizations can
> actually deploy. A capable reasoning model is required; the strongest model
> your harness offers gives the best results, but the methodology does not
> depend on a specific vendor's frontier model. **You supply your own model
> access.**

---

## What this fork changes

| Capability | Upstream (Capital One) | This fork | Status |
| :--- | :--- | :--- | :--- |
| **Harness portability** | Skills invoke Claude Code specifically; installer targets `~/.claude/skills`; model gates hardcode Opus; harness pins `claude-opus-4-8` | Skills are harness-portable prompt files (any harness with a skills directory + subagents); `VULNHUNT_SKILLS_DIR` / `VULNHUNT_AGENTS_DIR` / `VULNHUNT_BIN_DIR` / `VULNHUNT_HOST_CMD` / `VULNHUNT_MODEL` environment contract; model gates rephrased to "your harness's most capable reasoning model" | **Shipped** |
| **No-guess installer** | `install.sh` assumes `~/.claude/skills` | Explicit directories, honors `GROK_HOME` semantics, writes the `vh` launcher to `VULNHUNT_BIN_DIR`/`~/.local/bin`, installs the `vulnhunter-run` skill + agent definition; Windows `.cmd` equivalents updated | **Shipped** |
| **`vulnhunter-run` operator skill** | — (absent) | Unattended operator: clone → hunt → find-results → write/validate the scan manifest, with explicit stop rules and no improvisation | **Shipped** |
| **Benchmark/judge hardening** | Fixed model + basic retry | Model via environment, retry/backoff configuration, `analyze_misses` pipeline loss-point tracing, per-finding history tracking | **Shipped** |
| **Harness-neutral report language** | Claude-specific prose throughout the skills | Harness-neutral tool language (Agent → subagent, Claude CLI → harness session) | **Shipped** |
| **Sandbox-first exploit validation** | Exploit tests may be static traces; runtime choice ad hoc | Docker-first runtime provisioning; the runtime recorded per finding; Medium+ severity must execute | **In progress** |
| **Measured-impact PoCs** | PoCs are documents; impact asserted | Executable PoC + impact number in the finding (rows exposed, requests amplified, key-hours stranded) | **In progress** |

## Why the changes

VulnHunter's methodology is host-agnostic by nature: it is prompt procedure, not tool binding. The upstream project grew up inside Claude Code — a coherent choice, and the right first home. But the agent-harness landscape has broadened, and a security methodology that installs into only one of them stops being an audit capability and starts being a vendor feature. This fork makes four changes, each with a reason.

### 1. Harness portability — your team's harness is not our harness

Every skill here is a portable prompt file with an explicit environment contract (`VULNHUNT_SKILLS_DIR`, `VULNHUNT_AGENTS_DIR`, `VULNHUNT_MODEL`, `VULNHUNT_HOST_CMD`), and the model gates now ask for *your harness's most capable reasoning model* instead of a specific product. **Better means:** the same methodology installs into whatever harness your team already runs — and becomes comparable *across* harnesses in benchmark runs, which is how this fork is developed.

### 2. A no-guess installer — "where do skills go" is a per-harness answer

The upstream installer copied skills into `~/.claude/skills` unconditionally. On a machine running two harnesses — or a harness with a relocated home — that guess installs into the wrong place, silently. The fork's installer asks, or takes environment variables, and fails loudly with the exact instruction when the answer is missing. **Better means:** safe on multi-harness machines, correct under relocated homes, loud instead of silent when misconfigured.

### 3. Execution depth as a recorded decision — "provability" should not depend on model instinct

The original design already demands falsification and exploit tests. What it left open was *how hard* to work to actually execute them: static trace, mocked test, or a real containerized server. In one six-run benchmark against a single commit, that discretion produced anywhere from 3 to 42 findings — and opposite verdicts on the same sink, one proven against a mock, one closed by a test against a real server. This fork adds a runtime-provisioning procedure (Docker-first, recorded per finding) and a PoC discipline where impact is **measured** — rows leaked, ×-amplification, key-hours stranded — not narrated. **Better means:** a finding's validity no longer depends on which model had the instinct to stand up a container. *(In progress — the build plan is on the public roadmap; ask in issues or watch the repo's Discussions.)*

### 4. Operator ergonomics — a remediation loop compounds when it runs nightly

New in this fork: `vulnhunter-run`, an unattended operator that clones, hunts, locates results, and writes and validates the scan manifest with explicit stop rules. The benchmark tooling gains model configuration via environment, retry/backoff knobs, and loss-point analysis for missed findings. **Better means:** the difference between a tool you demo and a tool you schedule.

## The numbers behind the fork

We benchmark VulnHunter against itself: six full scans of one real production Go service — same commit, five harness/model stacks. The numbers below are from those runs, and they're why this fork exists.

| | |
|---|---|
| **14×** | spread in confirmed findings across runs of the same commit. The process measuring itself was the first vulnerability — closing that gap is this fork's build plan. |
| **42/42** | confirmed findings carried executable exploit tests — every one PASS, every one with its own PoC. No finding ships on a hunch. |
| **55%** | of candidate findings eliminated or downgraded by the adversarial verification pass before reaching you. Others scan. VulnHunter litigates. |
| **315
```
