trailmark-variant-neighborhood

Expands a confirmed vulnerability into ranked graph-derived variant candidates for security review.

6.9k|598|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/trailofbits/skills --skill trailmark-variant-neighborhood
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: trailmark-variant-neighborhood
Source: https://github.com/trailofbits/skills/tree/main/plugins/trailmark/skills/trailmark-variant-neighborhood
Command: npx skills add https://github.com/trailofbits/skills --skill trailmark-variant-neighborhood

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

After confirming one vulnerability, auditors often miss sibling instances of the same bug pattern scattered across callers, sinks, interfaces, and related code paths. This Skill uses a Trailmark code graph to systematically expand a single seed finding into a ranked set of variant candidates, so related vulnerable locations are surfaced for review instead of being overlooked.

Core Features & Use Cases

  • Graph Neighborhood Expansion: Finds candidates through shared callers, shared callees and sinks, entrypoint paths, interface and override siblings, type references, and taint or privilege-boundary peers.
  • Ranked Review Targets: Prioritizes candidates by reachability, taint, blast radius, and graph distance while penalizing test, mock, generated, and vendor code.
  • Structured Handoff Packets: Emits Markdown output with ranked candidates, exclusion reasons, and tailored handoffs for variant-analysis, semgrep-rule-creator, static-analysis, or manual review.
  • Use Case: After confirming a missing input validation bug in one function, use this Skill to enumerate every other caller of the same sensitive sink and every sibling implementation of the same interface, ranked by exploitability signals.

Quick Start

Expand the confirmed vulnerability in auth_handler.py into a Trailmark variant neighborhood and rank the candidate review targets.

Frequently Asked Questions about trailmark-variant-neighborhood

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

FAQPage Schema
How do I find variants of a confirmed vulnerability in a codebase?

Bind the confirmed finding to a Trailmark graph node, then expand across shared callers, shared sinks, entrypoint paths, interface siblings, and type references. Each candidate is ranked by reachability, taint, and blast radius so reviewers know where to look first.

What is a variant neighborhood in security code review?

A variant neighborhood is the set of graph-derived candidate locations that may share the root cause of a seed vulnerability. It includes sibling functions, common sinks, override relationships, and structurally similar nodes, all treated as review targets rather than confirmed findings.

When should I use graph-based variant expansion instead of Semgrep?

Use graph expansion when the vulnerable pattern depends on call context, shared sinks, or interface relationships rather than pure syntax. If the pattern is purely syntactic and obvious, go directly to a Semgrep rule instead.

Does this Skill confirm that candidates are actual vulnerabilities?

No. It outputs ranked review targets, not confirmed findings. Candidates must be handed off to variant-analysis, static-analysis tools like CodeQL, or manual review for semantic confirmation.

What happens if the seed finding cannot be bound to a graph node?

The workflow stops before inventing variants. A concrete graph binding is required, and the Skill also stops if the candidate count is too high relative to an underspecified root cause or the target language is unsupported.

How are variant candidates ranked for review priority?

Candidates gain priority for entrypoint reachability, taint, privilege-boundary adjacency, high blast radius, shared sinks, and close graph distance. Test, mock, generated, vendor, and unreachable code is penalized or excluded.