semgrep-rule-creator

Create custom Semgrep rules with test-driven development and taint analysis.

Updated Nov 23, 2025
One-click install
npx skills add https://github.com/manuelbrandner85/Weltenbibliothekapp --skill semgrep-rule-creator-manuelbrandner85
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: semgrep-rule-creator
Source: https://github.com/manuelbrandner85/Weltenbibliothekapp/tree/main/.agents/skills/semgrep-rule-creator
Command: npx skills add https://github.com/manuelbrandner85/Weltenbibliothekapp --skill semgrep-rule-creator-manuelbrandner85

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill addresses the complexity of writing accurate static analysis rules by providing a structured, test-driven workflow that minimizes false positives and ensures high-quality vulnerability detection.

Core Features & Use Cases

  • Test-Driven Development: Mandates writing test cases before rule creation to ensure both vulnerable and safe code patterns are correctly identified.
  • Taint Analysis Support: Guides the implementation of advanced taint-mode rules to track data flow from untrusted sources to dangerous sinks.
  • AST-Based Precision: Utilizes AST analysis to ensure rules are syntactically robust and resilient to code variations.

Quick Start

Use the semgrep-rule-creator skill to generate a new rule for detecting insecure file system access 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 write custom Semgrep rules for vulnerability detection?

To write custom Semgrep rules for vulnerability detection, use a test-driven workflow that defines vulnerable and safe code patterns first, then creates the rule using AST analysis to minimize false positives.

How does taint analysis work when creating static analysis rules?

Taint analysis in static analysis rules tracks data flow from untrusted sources to dangerous sinks. This skill guides the implementation of taint-mode rules to ensure accurate vulnerability detection across various programming languages.

How do I reduce false positives in static analysis code patterns?

Reducing false positives in static analysis code patterns requires a rigorous test-driven development process and AST-based precision to validate rule syntax and ensure only true vulnerabilities are matched.

Can I use Semgrep taint analysis across different programming languages?

Yes, you can implement Semgrep taint analysis across different programming languages. The skill supports advanced taint-mode rules to track data flow and detect security vulnerabilities in various language environments.

What is the best way to test static analysis rules before deployment?

The best way to test static analysis rules before deployment is a test-driven approach that mandates writing test cases for both vulnerable and safe code patterns prior to rule creation, ensuring accurate vulnerability detection.

Why do my Semgrep rules match safe code patterns?

Semgrep rules match safe code patterns due to a lack of AST-based precision and insufficient test cases. Adhering to strict testing protocols and validating syntax robustness minimizes these false positives.