Aller au contenu
Skillpedia
Sécurité8.0k · #12736

trailmark-variant-neighborhood

Ce qu’il fait

Ce skill prend une vulnérabilité confirmée ou suspectée et trouve du code à structure similaire, comme des fonctions sœurs ou des appelants communs. Il s'adresse aux chercheurs en sécurité qui traquent d'autres occurrences du même problème.

Quand l’utiliser

  • ✓Quand vous avez trouvé un problème de sécurité et voulez vérifier si du code similaire a le même défaut.
  • ✓Quand un bug dépend de la façon dont les fonctions s'appellent entre elles, et qu'une simple recherche de texte le manquerait.
  • ✓Quand vous voulez transmettre des candidats à relire à une étape d'analyse de variantes ou de rédaction de règles Semgrep.

Lien du skill

https://github.com/trailofbits/skills/blob/main/plugins/trailmark/skills/trailmark-variant-neighborhood/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/trailofbits/skills/blob/main/plugins/trailmark/skills/trailmark-variant-neighborhood/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“J'ai trouvé un bug d'entrée non contrôlée dans cette fonction. Trouve d'autres codes structurés de la même façon qui pourraient aussi le contenir.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

Il relie le problème à un point du graphe de code, puis s'étend aux fonctions liées, aux appelants communs et aux points de sortie, aux implémentations d'interfaces et au code similaire. Les résultats sont classés comme candidats à relire.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

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

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 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
Questions fréquentes

Les résultats sont-ils des bugs confirmés ?

Non. Les résultats sont des candidats à relire, pas des constats confirmés.

Faut-il un bug connu pour commencer ?

Oui. Il lui faut un problème de départ, qui peut être confirmé ou seulement suspecté.

Quels skills peuvent utiliser ses résultats ensuite ?

Ses candidats peuvent alimenter l'analyse de variantes, la rédaction de règles Semgrep, l'analyse statique ou une revue manuelle.

Détails

Description originale de l’auteur

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.

repo: trailofbits/skills

Popularité

Étoiles GitHub
8.0k
Position au classement
#12736
Licence
CC-BY-SA-4.0
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires