Agent skill

variant-analysis

Find similar vulnerabilities across a codebase after discovering one instance. Uses pattern matching, AST search, Semgrep/CodeQL queries, and manual tracing to propagate findings. Adapted from Trail of Bits. Use after finding a bug to check if the same pattern exists elsewhere.

digital ghost521★ · 1 repos on radarProfile →
claude-codeMIT
Install
npx skills add vibeeval/vibecosystem --skill variant-analysis --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 6 KB
Bundled scripts: none
Path: skills/variant-analysis/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 526
Language: C#

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Variant Analysis When you find a bug, the same mistake almost certainly exists elsewhere. Variant analysis systematically hunts for siblings of a known vulnerability. ## Process ### Step 1: Characterize the Original Bug Before searching, understand what makes this bug a bug: ``` ORIGINAL BUG: File: src/api/users.ts:42 Type: Missing input validation Pattern: req.params.id used directly in DB query without sanitization Root cause: Developer assumed framework sanitizes params Trigger: Untrusted input reaches database query ``` Extract the **abstract pattern** -- not the specific code, but the class of mistake: - Missing validation at a trust boundary - Incorrect error handling in auth path - Race condition between check and use - Hardcoded secret in source - SQL injection via string concatenation ### Step 2: Generate Search Queries For each bug class, create multiple search strategies: #### Grep/Ripgrep (Fast, broad) ```bash # Example: SQL injection via concatenation rg "query\(.*\+.*\)" --type ts rg "execute\(.*\$\{" --type ts rg "\.raw\(.*\+" --type ts # Example: Missing auth middleware rg "router\.(get|post|put|delete)\(" --type ts -l | \ xargs rg -L "authenticate|authorize|requi

What's inside
Steps it walks through
  1. Process
  2. Step 1: Characterize the Original Bug
  3. Step 2: Generate Search Queries
  4. Step 3: Triage Results
  5. Step 4: Report
  6. Common Variant Patterns
  7. Input Validation Variants
  8. Auth/Authz Variants
  9. Error Handling Variants
  10. Crypto Variants
  11. Race Condition Variants
  12. Automation Integration
  13. With coroner agent (post-mortem)
  14. With security-reviewer agent
Commands it runs
rg "query\(.*\+.*\)" --type ts
rg "execute\(.*\$\{" --type ts
rg "\.raw\(.*\+" --type ts
rg "router\.(get|post|put|delete)\(" --type ts -l | \
xargs rg -L "authenticate|authorize|requireAuth"
rg "(password|secret|key|token)\s*[=:]\s*['\"][^'\"]{8,}" --type ts
Find all route handlers
rg "router\.(get|post|put|delete|patch)\(" --type ts -n
Check each for validation middleware
Missing validation = variant
More from vibecosystem
All skills →
About this skill
What does the variant-analysis skill do?

Find similar vulnerabilities across a codebase after discovering one instance. Uses pattern matching, AST search, Semgrep/CodeQL queries, and manual tracing to propagate findings. Adapted from Trail of Bits. Use after finding a bug to check if the same pattern exists elsewhere.

How do I install it?

Run `npx skills add vibeeval/vibecosystem --skill variant-analysis --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From vibeeval/vibecosystem, a repository with 526 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going