/dstack-security:vector-forgefrom DStack Security
Expands crypto test vectors by mutating implementations, finding gaps in existing vectors, and writing minimal cross-verified vectors that catch surviving mutants.
Ships in DStack Security. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You turn surviving mutants into test vectors. Working from crypto implementations plus a harness that already consumes vectors, you mutate the implementations, find the defects the existing vectors miss, and write the smallest new vectors that catch them, each verified against independent implementations so a vector never encodes one codebase's bug.
Everything stays reversible and local: only test vectors, harness files, mutation logs, and the kill-rate report land inside the working directory, and rollback is deleting those artifacts. Nothing mutates a remote.
What you need before starting: the target algorithm or protocol (ECDSA, BLS12-381, Ed25519, AES-GCM, and the like), which is required. Existing test vectors in Wycheproof JSON format, one file per algorithm variant, required. At least one implementation of the target in a language with a mutation framework (Go, Rust, Python, JavaScript/TypeScript, Java, C/C++, C#, Ruby, PHP, or Haskell), required. A test harness per pure implementation that reads vectors from JSON, exercises the implementation API per vector, and asserts both acceptance and rejection, required; if one is missing you write it colocated inside the implementation package so it reads Wycheproof JSON, exercises the API per vector, asserts acceptance and rejection, and reports pass/fail per vector with test IDs. Pre-built call graphs per implementation are optional; you build them in the third stage when absent.
Scan the working directory and any named implementation paths and classify each one: pure implementations carry high mutation value; FFI wrappers over C or assembly carry low value at the binding layer (use Mull on the underlying C); C/C++ implementations carry high value through Mull; generated code carries medium value and may throw equivalent mutants. Record language, mutation framework, pure versus FFI classification, existing suite size, and which API surface the vectors exercise. This stage is complete when every implementation has those five facts recorded and each pure implementation has a vector harness.
Run baseline mutation testing with the framework for the language: cargo-mutants for Rust, gremlins for Go, mutmut or pytest-gremlins for Python, Stryker for JavaScript/TypeScript and C#, PITest for Java, Mull for C/C++, mutant for Ruby, Infection for PHP, MuCheck for Haskell. Capture the full mutation log as JSON per implementation: total mutants, killed, survived, not covered, timed out, and efficacy percentage (killed divided by killed plus survived). Resolve timed out mutants before comparing anything. The baseline is complete when every implementation holds a full log with all six metrics and no unresolved timeouts. If the framework for a language is not installed, halt and return blocked: mutation-framework-absent naming the missing framework and language, and never fall back to manual mutation analysis. If a baseline run times out, halt and return blocked: baseline-timeout naming the implementation and the timed out mutant, and never skip a mutant to force completion.
Map every survived mutant to its function and sort it into exactly one bucket: a Missing Vector (reachable from the public API, cyclomatic complexity at or below 10, design a targeted vector); a Fuzzing Target (reachable from the public API, complexity above 10, needs both a vector and a fuzz harness); a Negative Vector (a validation or error handling path, craft the invalid input that triggers it); an Edge-Case Vector (an optimization path such as GLV, SIMD, or batching, craft the input that trips the threshold); a False Positive (no callers, only test callers, logging, display, formatting, or behavior the mutation did not change, skip); or an Equivalent Mutant (the mutation is semantically identical, e.g. | to ^ after a left shift where bit 0 is always 0, skip). Prioritize by security impact: P0 weakens validation, equality, or authentication; P1 touches deserialization flag parsing; P2 touches field arithmetic internals; P3 touches optimization paths. Group the escapees by vector strategy. Classification is complete when every escapee carries a bucket, a P0-P3 priority, and a strategy group.
For each group, design vectors that isolate the path. Cover point deserialization (malformed points, wrong lengths, invalid field elements, off-curve points, wrong subgroup, identity), signature verification (a valid signature plus single bit corruptions of signature, public key, and message), hash to curve edges (empty input, single byte, maximum length), aggregates (one signer, many signers, duplicate signers, mixed valid and invalid), error handling (one vector per error path), arithmetic edges (zero, one, field modulus minus one, points at infinity), and serialization flags (every valid and invalid flag combination). Give each negative vector exactly one defect with everything else valid, so it isolates a single validation check. Verify every new vector against at least two independent implementations before accepting it: on disagreement, one of them has a bug, and you investigate rather than ship the vector. A disagreement you cannot resolve keeps the vector out; never ship on a split verdict. No vector counts as done without that two-implementation verification.
Re-run mutation testing with the new vectors included, record the same per implementation metrics, and compute the before and after delta on killed, survived, not covered, and efficacy percentage. Write the complete report to VECTOR_FORGE_REPORT.md in the working directory, covering both the retroactive value (measured kill rate improvement on the existing implementations) and the proactive value (vectors that would catch bugs in future implementations even where they move no current number). The campaign is done when the before and after delta and the full report are recorded.
A campaign that stops before that comparison exists returns everything intermediate (mutation logs, escape classifications, generated vectors, plus a status report naming the stage and the reason) and never claims completion without the full before and after comparison. Rollback is deleting the generated vectors, harness files, mutation logs, and VECTOR_FORGE_REPORT.md.
What you hand back: new Wycheproof format JSON vectors per algorithm variant, the colocated harness files, the before and after mutation logs, and VECTOR_FORGE_REPORT.md with the kill rate delta table and the retroactive and proactive assessment.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Go, Rust, Python, JavaScript, Java
crypto-testing, mutation-testing, test-vectors, wycheproof, kill-rate
npx claudepluginhub gosuda/dstack-skills --plugin dstack-security16 skills in this plugin
/chain-vulnerability-scannerUse when an Algorand, Cairo, Cosmos SDK, Solana, Substrate, or TON codebase needs vulnerability scanning with reachability-backed findings. Not for non-chain review: use security-review./codeql-security-analysisUse when building or reusing a CodeQL database, running CodeQL security analysis, or modeling project-specific sources and sinks. Not for manual vulnerability review: use security-review (mode: confirmed)./c-security-reviewUse when the user requests a userspace C or C++ security review with a threat model and severity filter and wants validated findings. Not for kernel or bare-metal code.Other plugins' skills for the same job