SecurityOfficial · trailofbits

Trailmark Variant Neighborhood skill for Claude

Expands one confirmed or suspected vulnerability into a Trailmark graph neighborhood of variant candidates by finding sibling functions, shared callers and callees, common sensitive sinks, common entrypoint paths, interface implementations, override relationships, type/reference neighbors, and structurally similar nodes. Use after one issue is found to seed variant-analysis, semgrep-rule-creator, static-analysis, or manual review with graph-derived candidate locations.

Trailmark Variant Neighborhood SKILL.md

The full skill file from trailofbits/skills (CC-BY-SA-4.0).

Trailmark Variant Neighborhood

Expand one seed issue into graph-derived variant candidates. This skill generates review targets, not confirmed findings.

When to Use

  • A finding is confirmed or plausible and variants may exist
  • The vulnerable pattern depends on call context
  • The issue involves a shared sink, source, validator, interface, override, trait, hook, handler, adapter, or critical type
  • The next step is to seed variant-analysis, semgrep-rule-creator, static-analysis, or manual review

When NOT to Use

  • No seed issue exists. Use discovery or triage first.
  • The pattern is purely syntactic and already obvious. Use semgrep-rule-creator directly.
  • The question is exploit-chain composition across multiple findings. Use a composition workflow.
  • The goal is remediation verification. Use a remediation-review workflow.
  • The seed cannot be bound to a graph node.

Rationalizations to Reject

RationalizationWhy It Is WrongRequired Action
"Nearby code means variant"Proximity is only a candidate reasonRank it as a review target
"Only exact same names matter"Variants often share sinks or preconditions, not namesExpand across callers, callees, interfaces, and types
"Every candidate is a finding"This skill outputs candidates for reviewAvoid vulnerability claims
"Unreachable candidates can be ignored completely"They may become reachable after refactorsRank lower or list as deferred
"Graph candidates replace semantic pattern work"Graph structure finds locations, not root-cause semanticsHand off to variant-analysis, Semgrep, CodeQL, or manual review

Workflow

Variant Neighborhood Progress:
- [ ] Step 1: Normalize and bind the seed
- [ ] Step 2: Expand graph neighborhoods
- [ ] Step 3: Rank candidates
- [ ] Step 4: Extract variant pattern guidance
- [ ] Step 5: Emit handoff packet

Step 1: Normalize And Bind The Seed

Accept finding text, file/line, function name, or output from trailmark-finding-triage. Bind the seed to a Trailmark node and record the root cause in plain language.

If the seed has no concrete graph binding, stop before inventing variants.

Step 2: Expand Neighborhoods

Use the dimensions in references/neighborhood-patterns.md:

  • shared callers
  • shared callees and sinks
  • entrypoint path neighbors
  • interface, override, trait, and implementation siblings
  • file or module cluster neighbors
  • taint or privilege-boundary peers
  • type and state-reference neighbors

Bound expansion to avoid candidate floods.

Step 3: Rank Candidates

Rank with references/ranking.md. Prioritize entrypoint-reachable, tainted, boundary-adjacent, high-blast-radius, shared sink, same-interface, and close-distance candidates. Penalize test, mock, generated, vendor, unreachable, and trusted-internal-only candidates.

Step 4: Extract Pattern Guidance

Summarize what should be searched for syntactically and what requires semantic review. Identify whether follow-up belongs in:

  • variant-analysis
  • semgrep-rule-creator
  • static-analysis with CodeQL or SARIF-producing tools
  • manual review

Step 5: Emit Handoff Packet

Use references/output-format.md. Include ranked candidates, inclusion reasons, exclusions, limitations, and the variant-analysis handoff.

Stop Conditions

  • No graph binding exists
  • Candidate count is too high and the root cause is underspecified
  • Trailmark cannot analyze the target language
  • The seed is only in test, generated, or vendor code and the user did not say that code is in scope

How to install Trailmark Variant Neighborhood

Claude Code

Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):

npx degit trailofbits/skills/plugins/trailmark/skills/trailmark-variant-neighborhood#main ~/.claude/skills/trailmark-variant-neighborhood

Codex

npx degit trailofbits/skills/plugins/trailmark/skills/trailmark-variant-neighborhood#main ~/.codex/skills/trailmark-variant-neighborhood

Claude.ai and Claude Desktop

Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.

Frequently asked questions

+What does the Trailmark Variant Neighborhood skill do?

Expands one confirmed or suspected vulnerability into a Trailmark graph neighborhood of variant candidates by finding sibling functions, shared callers and callees, common sensitive sinks, common entrypoint paths, interface implementations, override relationships, type/reference neighbors, and structurally similar nodes. Use after one issue is found to seed variant-analysis, semgrep-rule-creator, static-analysis, or manual review with graph-derived candidate locations.

+How do I install Trailmark Variant Neighborhood in Claude Code?

Copy the skill folder into ~/.claude/skills/trailmark-variant-neighborhood, for example with "npx degit trailofbits/skills/plugins/trailmark/skills/trailmark-variant-neighborhood#main ~/.claude/skills/trailmark-variant-neighborhood". Claude Code loads it automatically and uses it when a task matches.

+Does Trailmark Variant Neighborhood work with ChatGPT or Codex?

Yes. Trailmark Variant Neighborhood uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/trailmark-variant-neighborhood. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.

+Is Trailmark Variant Neighborhood free?

Trailmark Variant Neighborhood is published on GitHub by trailofbits under the CC-BY-SA-4.0 license, which allows free use.

Related security skills

  1. Security Review

    Official

    Security code review for vulnerabilities. Use when asked to "security review", "find vulnerabilities", "check for security issues", "audit…

    getsentry/skills★ 1.2k
  2. Audit

    a user-authored audit skill

    pbakaus/impeccable★ 112k
  3. Semgrep

    Official

    Runs a Semgrep security scan over a codebase: detects languages, selects rulesets, presents the plan for explicit approval, then runs every…

    trailofbits/skills★ 8.3k
  4. Variant Analysis

    Official

    Hunts for the other instances of a bug already found — the variants of one root cause across a codebase.

    trailofbits/skills★ 8.3k
  5. Vulnerability Triage Brocards

    Official

    This skill should be used when the user asks to "triage a vulnerability report", "assess a CVE", "evaluate a bug bounty submission",…

    trailofbits/skills★ 8.3k
  6. Yara Rule Authoring

    Official

    Guides authoring of high-quality YARA-X detection rules for malware identification. Use when writing, reviewing, or optimizing YARA rules.

    trailofbits/skills★ 8.3k
  7. Zeroize Audit

    Official

    Detects missing zeroization of sensitive data in source code and identifies zeroization removed by compiler optimizations, with…

    trailofbits/skills★ 8.3k
  8. Microsoft Azure Webjobs Extensions Authentication Events Dotnet

    Official

    Microsoft Entra Authentication Events SDK for .NET. Azure Functions triggers for custom authentication extensions.

    microsoft/skills★ 3.2k
  9. Claude Settings Audit

    Official

    Analyze a repository to generate recommended Claude Code settings.json permissions.

    getsentry/skills★ 1.2k

See all security skills →

More skills from trailofbits

  1. Validate Bug

    Official

    Use when a bug PoC package needs an independent rerun and judgment before patching.

    trailofbits/skills★ 8.3k
  2. Vector Forge

    Official

    Mutation-driven test vector generation. Finds implementations of a cryptographic algorithm or protocol, runs mutation testing to identify…

    trailofbits/skills★ 8.3k

All skills by trailofbits →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.