plugins/trailmark/skills/trailmark-variant-neighborhood/SKILL.md
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.
npx skillsauth add trailofbits/skills trailmark-variant-neighborhoodInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Expand one seed issue into graph-derived variant candidates. This skill generates review targets, not confirmed findings.
variant-analysis, semgrep-rule-creator,
static-analysis, or manual reviewsemgrep-rule-creator directly.| Rationalization | Why It Is Wrong | Required Action | |---|---|---| | "Nearby code means variant" | Proximity is only a candidate reason | Rank it as a review target | | "Only exact same names matter" | Variants often share sinks or preconditions, not names | Expand across callers, callees, interfaces, and types | | "Every candidate is a finding" | This skill outputs candidates for review | Avoid vulnerability claims | | "Unreachable candidates can be ignored completely" | They may become reachable after refactors | Rank lower or list as deferred | | "Graph candidates replace semantic pattern work" | Graph structure finds locations, not root-cause semantics | Hand off to variant-analysis, Semgrep, CodeQL, or manual review |
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
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.
Use the dimensions in references/neighborhood-patterns.md:
Bound expansion to avoid candidate floods.
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.
Summarize what should be searched for syntactically and what requires semantic review. Identify whether follow-up belongs in:
variant-analysissemgrep-rule-creatorstatic-analysis with CodeQL or SARIF-producing toolsUse references/output-format.md. Include ranked candidates, inclusion reasons, exclusions, limitations, and the variant-analysis handoff.
development
Reviews a code target by launching a panel of specialist auditor agents and merging their reports. Use when asked to run a panel review.
development
Reviews the current branch's changes against its base branch as a pull request: correctness of new and modified code, test coverage for it, and documentation accuracy. Use when asked to review a branch, a diff, or a pull request.
tools
Runs an autonomous review-and-fix improvement loop over a Claude Code skill until a review comes back clean, with a cross-round findings ledger, escalation when fixes stop converging, and a mechanical scope guard. Reviews are performed by the plugin-dev skill-reviewer agent. Use to fix skill quality issues, iteratively refine a skill, or resume a loop after an escalation ('fix my skill', 'improve this skill until it passes review', 'skill improvement loop'). NOT for a one-time review — use the plugin-dev skill-reviewer agent directly.
tools
Runs an autonomous review-and-fix improvement loop over the current branch's changes until a PR review comes back clean, scoped mechanically to the directories the branch touched. Reviews are performed by an installed PR-review skill (default: pr-review-toolkit's review-pr). Use to fix review findings on a branch before opening or updating a pull request ('clean up this branch', 'fix this PR until review passes', 'run review-and-fix on my changes'). NOT for a one-time review — run the PR-review skill directly.