variant-analysis

Search codebases for similar vulnerability patterns using ripgrep and Semgrep.

Updated Feb 13, 2026
One-click install
npx skills add https://github.com/fjor1025/InfoSec-Framework --skill variant-analysis-fjor1025
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: variant-analysis
Source: https://github.com/fjor1025/InfoSec-Framework/tree/main/ClaudeSkills/plugins/variant-analysis/skills/variant-analysis
Command: npx skills add https://github.com/fjor1025/InfoSec-Framework --skill variant-analysis-fjor1025

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill helps you systematically find similar vulnerabilities and bugs across a codebase after an initial issue has been identified, preventing the recurrence of the same root cause.

Core Features & Use Cases

  • Variant Hunting: Search for code patterns that mirror a known vulnerability.
  • Query Building: Assist in creating or refining Semgrep and CodeQL queries.
  • Systematic Auditing: Apply a structured approach to finding related bugs after an initial discovery.
  • Use Case: After finding a SQL injection vulnerability in one part of a web application, use this Skill to search the entire codebase for other instances where user input might reach database query functions without proper sanitization.

Quick Start

Use the variant-analysis skill to find patterns similar to the provided code snippet.

Frequently Asked Questions about variant-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find similar vulnerabilities across a codebase after finding one bug?

Variant analysis helps find similar vulnerabilities by leveraging pattern-based searching and abstraction techniques. You systematically search the codebase for code patterns mirroring a known vulnerability to prevent the recurrence of the same root cause.

How do I build Semgrep queries for code auditing?

Semgrep query building is assisted by iteratively generalizing code patterns from a known vulnerability snippet. This abstraction technique refines the search rules to accurately match related bugs across the entire codebase.

What is the best way to automate vulnerability hunting after discovering a SQL injection?

Systematic variant hunting automates vulnerability discovery by tracing user input paths to dangerous functions. Using tools like ripgrep, you search the entire codebase for instances lacking proper sanitization, mirroring the initial SQL injection root cause.

Can I use CodeQL for variant analysis on my web application?

Yes, CodeQL is fully supported for variant analysis on web applications. The Skill assists in creating and refining CodeQL queries to systematically discover similar vulnerabilities and build automated code analysis rules.

Does variant analysis work without a known vulnerability snippet?

Variant analysis relies on an initially identified issue or code snippet to function effectively. The process requires a known vulnerability pattern to generalize from, preventing the recurrence of that specific root cause across the codebase.

What tools are used for pattern-based searching in code auditing?

Ripgrep and Semgrep are utilized for iterative pattern generalization and code auditing. These tools enable systematic variant analysis to discover similar vulnerabilities and build automated code analysis rules.