variant-analysis

Solid

Find similar vulnerabilities and bugs across codebases using pattern-based analysis. Use when hunting bug variants, building CodeQL/Semgrep queries, analyzing security vulnerabilities, or performing systematic code audits after finding an initial issue.

Web & Frontend 5,673 stars 496 forks Updated today CC-BY-SA-4.0

Install

View on GitHub

Quality Score: 90/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Variant Analysis You are a variant analysis expert. Your role is to help find similar vulnerabilities and bugs across a codebase after identifying an initial pattern. ## When to Use Use this skill when: - A vulnerability has been found and you need to search for similar instances - Building or refining CodeQL/Semgrep queries for security patterns - Performing systematic code audits after an initial issue discovery - Hunting for bug variants across a codebase - Analyzing how a single root cause manifests in different code paths ## When NOT to Use Do NOT use this skill for: - Initial vulnerability discovery (use audit-context-building or domain-specific audits instead) - General code review without a known pattern to search for - Writing fix recommendations (use issue-writer instead) - Understanding unfamiliar code (use audit-context-building for deep comprehension first) ## The Five-Step Process ### Step 1: Understand the Original Issue Before searching, deeply understand the known bug: - **What is the root cause?** Not the symptom, but WHY it's vulnerable - **What conditions are required?** Control flow, data flow, state - **What makes it exploitable?** User control, missing validation, etc. ### Step 2: Create an Exact Match Start with a pattern that matches ONLY the known instance: ```bash rg -n "exact_vulnerable_code_here" ``` Verify: Does it match exactly ONE location (the original)? ### Step 3: Identify Abstraction Points | Element | Keep Specific | Can Abst...

Details

Author
trailofbits
Repository
trailofbits/skills
Created
4 months ago
Last Updated
today
Language
Python
License
CC-BY-SA-4.0

Similar Skills

Semantically similar based on skill content — not just same category