opengrep-rule-generator-research

Generate opengrep/semgrep SAST rules from CVEs, CWEs, or code snippets.

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-research
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opengrep-rule-generator-research
Source: https://github.com/Security-Phoenix-demo/security-skills-claude-code/tree/main/skills/opengrep-rule-generator-research
Command: npx skills add https://github.com/Security-Phoenix-demo/security-skills-claude-code --skill opengrep-rule-generator-research

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Claude Code, WebSearch, WebFetch, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill simplifies the process of creating and researching SAST rules, allowing users to automatically generate detection rules for known vulnerabilities, and integrate web research capabilities for a comprehensive analysis.

Core Features & Use Cases

  • Automated Rule Generation: Based on vulnerability information or code snippets, this Skill can generate rules for common security issues.
  • Web Research Integration: Before generating rules, it conducts web research on CVEs, CWEs, and vulnerability classes to build a comprehensive understanding of the attack surface.
  • Use Case: When you want to create a rule for a specific vulnerability in a given language, this Skill can research the vulnerability and generate a rule with embedded research documentation.

Quick Start

Generate rules for the 'SQL injection' vulnerability in Python using the 'opengrep-rule-generator-research' skill.

Frequently Asked Questions about opengrep-rule-generator-research

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

FAQPage Schema
How do I generate semgrep SAST rules for a specific CVE?

To generate semgrep SAST rules for a CVE, this Skill conducts web research on the vulnerability and CWE to understand the attack surface, then automatically creates a detection rule based on your input. It provides a guided workflow for comprehensive analysis.

Can I create opengrep rules directly from a vulnerable code snippet?

Yes, you can create opengrep rules directly from a code snippet. The Skill accepts code snippets as input to automatically generate detection rules for common security issues, streamlining the rule creation process without requiring a full CVE description.

Does the opengrep rule generator require Claude Code to run?

Yes, the opengrep rule generator requires Claude Code with WebSearch and WebFetch tools. These dependencies are necessary to perform the automated web research on vulnerabilities and build accurate detection rules during the generation workflow.

What is the best way to research a vulnerability class before writing a SAST rule?

The best way to research a vulnerability class for SAST rules is using an AI-assisted workflow that integrates web search. This Skill automatically fetches and analyzes CVE and CWE data to build a comprehensive understanding of the attack surface before generating the rule.

Are there limitations when generating SAST rules for unknown security issues?

A limitation when generating SAST rules is that the accuracy depends on available web research and the provided code snippets. If a vulnerability lacks sufficient public CVE or CWE documentation, the automated rule generation may be less comprehensive.

How does AI-assisted SAST rule generation compare to manual rule creation?

AI-assisted SAST rule generation automates vulnerability research and rule syntax creation, whereas manual creation requires developers to independently analyze CVEs and write rules. This approach embeds research documentation directly into the generated rule for better context.