semgrep-rule-creator

Generate custom Semgrep rules for security vulnerabilities and bug patterns.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the creation of custom Semgrep rules to detect specific bug patterns and security vulnerabilities in codebases, enhancing code quality and security.

Core Features & Use Cases

  • Custom Rule Generation: Write production-quality Semgrep rules tailored to your project's needs.
  • Taint Mode Prioritization: Employs taint mode for precise data flow analysis to catch injection vulnerabilities.
  • Test-Driven Development: Enforces a test-first approach, ensuring rules are robust against false positives and negatives.
  • Use Case: You need to detect a specific insecure pattern in your Python codebase where user input is directly passed to an eval() function. This Skill will help you generate a precise Semgrep rule to catch this vulnerability.

Quick Start

Use the semgrep-rule-creator skill to build a Semgrep rule for detecting insecure eval usage in Python.

Frequently Asked Questions about semgrep-rule-creator

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

FAQPage Schema
How do I create custom Semgrep rules for detecting security vulnerabilities in my codebase?

To create custom Semgrep rules for vulnerability detection, generate taint-mode and pattern-matching rules using AST analysis. This approach enforces test-driven development to ensure rules accurately catch injection flaws and bug patterns while minimizing false positives and negatives.

What is taint mode in Semgrep and when do I need it for static code analysis?

Taint mode in Semgrep is a static analysis technique for precise data flow tracking from untrusted sources to dangerous sinks. You need taint mode when detecting injection vulnerabilities, such as insecure patterns where user input passes directly into eval functions.

How do I write a Semgrep rule to detect insecure eval usage in Python?

To write a Semgrep rule detecting insecure eval usage in Python, define pattern-matching or taint-mode rules targeting eval sinks. Iterative rule refinement and AST analysis ensure the custom rule accurately identifies the vulnerable code pattern without flagging safe implementations.

Can I use test-driven development to refine Semgrep rules and reduce false positives?

Yes, you can use test-driven development to refine Semgrep rules and reduce false positives. By enforcing a test-first approach during rule creation, you validate pattern-matching accuracy against known code samples, ensuring robust vulnerability detection and precise static analysis results.

What is the best way to optimize custom Semgrep rules for performance and accuracy?

The best way to optimize custom Semgrep rules for accuracy and performance is through iterative rule refinement. Analyzing AST structures and conducting taint-mode data flow tracking allows you to precisely target bug patterns while eliminating broad or inefficient pattern matches.