Trailmark Variant Neighborhood
Trail of BitsOfficialPublished by Trail of Bits
- Skill
- Research and analysis
- Security
- CC-BY-SA-4.0
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
Trailmark Variant Neighborhood is a research-analysis skill that takes a confirmed or suspected vulnerability and uses graph-based analysis to identify related code locations. By exploring dimensions such as shared callers, callees, interface implementations, and entrypoint paths, it generates a list of candidate targets for further investigation. This skill is designed to seed subsequent variant analysis, static analysis, or manual review processes, helping security practitioners identify potential patterns of vulnerability across a codebase.
What it does
- Binds a seed vulnerability to a specific graph node.
- Expands the search to related code using graph dimensions like shared sinks and callers.
- Ranks candidate locations based on reachability and risk factors.
- Extracts pattern guidance for follow-up analysis.
- Produces a structured handoff packet for security review tools.
When to use it
- After confirming a vulnerability and suspecting similar issues exist elsewhere.
- When a vulnerability pattern is tied to specific call contexts or shared interfaces.
- When preparing to perform variant analysis or create automated detection rules.
- When the issue involves critical components like sinks, sources, or privilege boundaries.
Advantages
- Systematically identifies potential variants using graph relationships.
- Reduces manual effort by prioritizing candidates based on reachability and risk.
- Provides clear context for why specific code locations were flagged as candidates.
- Integrates with downstream security workflows like Semgrep or CodeQL.
Usage examples
- “I have a confirmed SQL injection in user_controller.py. Use trailmark-variant-neighborhood to find other potential locations.”
- The agent binds the vulnerability to the graph, identifies shared sinks and callers, and provides a ranked list of candidate functions for manual review.
- “Analyze the neighborhood for this insecure file upload function to seed my next Semgrep rule.”
- The agent generates a handoff packet containing the specific syntax to keep, abstract patterns to search for, and a list of candidate locations to test the rule against.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/trailofbits/trailmark-variant-neighborhood/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip trailmark-variant-neighborhood.zip -d .agents/skills
Documentation by Trail of Bits
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-creatordirectly.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
| 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 |
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 packetStep 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-analysissemgrep-rule-creatorstatic-analysiswith CodeQL or SARIF-producing toolsmanual 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
Files
- ATTRIBUTION.mdAdded by AutoGineer963 B
- LICENSELicence file added by AutoGineer19.7 KiB
- SKILL.md4.2 KiB
- agents/openai.yaml252 B
- assets/trail-of-bits-mark.svg3.0 KiB
- references/neighborhood-patterns.md2.2 KiB
- references/output-format.md1.4 KiB
- references/ranking.md1.6 KiB
ATTRIBUTION.md
Attribution
This folder is an unmodified copy of the Agent Skill "trailmark-variant-neighborhood", distributed by AutoGineer (https://autogineer.com/agent-skills).
Commit: e4dd0bb5b15535f7c5a0834187dffba6ac37e4ff
Published by: Trail of Bits (https://github.com/trailofbits)
Publisher: Trail of Bits (https://github.com/trailofbits)
Licence: Creative Commons Attribution-ShareAlike 4.0 International (https://github.com/trailofbits/skills/blob/e4dd0bb5b15535f7c5a0834187dffba6ac37e4ff/LICENSE)
Licence evidence: repository licence LICENSE
Retrieved: 2026-11-07
The skill's own files are unmodified copies. AutoGineer is not affiliated with or endorsed by the author or the publisher.
Files added by AutoGineer
ATTRIBUTION.md: this file, written by AutoGineer
LICENSE: copied from LICENSE
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Declares allowed tools, Needs Node.js
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Trail of Bits
- Publisher
- Trail of Bits (Official)
- Source
- trailofbits/skills · plugins/trailmark/skills/trailmark-variant-neighborhood · commit e4dd0bb
- Licence
- Creative Commons Attribution-ShareAlike 4.0 International (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Trail of Bits or Trail of Bits.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download trailmark-variant-neighborhood.zip