opengrep-rule-generator

Generate and analyze opengrep/semgrep SAST rules for security vulnerabilities.

63|6|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/Security-Phoenix-demo/security-skills-claude-code --skill opengrep-rule-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opengrep-rule-generator
Source: https://github.com/Security-Phoenix-demo/security-skills-claude-code/tree/main/skills/opengrep-rule-generator
Command: npx skills add https://github.com/Security-Phoenix-demo/security-skills-claude-code --skill opengrep-rule-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires opengrep, semgrep, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill assists in generating and analyzing opengrep/semgrep SAST rules, enabling users to detect vulnerabilities and code quality issues in their codebases.

Core Features & Use Cases

  • Rule Generation: Supports both guided discovery and vulnerability-driven workflows for creating rules.
  • Vulnerability Detection: Helps identify SQL injection, XSS, command injection, and other security vulnerabilities.
  • Code Quality Analysis: Detects hardcoded secrets, insecure configurations, and other code quality issues.
  • Use Case: A developer can use this Skill to generate rules for detecting SQL injection vulnerabilities in a Flask application.

Quick Start

Generate a rule to detect SQL injection in the Flask app by providing the necessary details.

Frequently Asked Questions about opengrep-rule-generator

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

FAQPage Schema
How do I write semgrep rules to detect SQL injection in Python frameworks?

You can generate semgrep rules for detecting SQL injection by providing your application details, such as Flask framework usage, to create targeted static analysis patterns that identify insecure query construction and vulnerable code paths.

What is the difference between guided discovery and vulnerability-driven workflows for static code analysis?

Guided discovery helps you explore and create broad SAST rules for code quality analysis, while vulnerability-driven workflows target specific security issues like XSS or command injection, allowing you to generate focused static code analysis rules based on your immediate security needs.

Can I use opengrep to find hardcoded secrets and insecure configurations in my codebase?

Yes, opengrep can be used to generate SAST rules that detect hardcoded secrets and insecure configurations, extending static code analysis beyond security vulnerabilities to identify broader code quality issues across your project.

Do I need the opengrep CLI installed to generate and validate SAST rules?

You need Claude Code or Claude Desktop to generate and analyze the SAST rules, while the opengrep or semgrep CLI is optional and only required if you want to validate the generated rules against your actual codebase locally.

Does opengrep work with semgrep rules for command injection detection?

Yes, opengrep works with semgrep rules for command injection detection, allowing you to create and analyze SAST patterns that identify unsafe command execution functions and sanitize user input handling across your codebase.