opengrep-rule-creator

Generates validated Opengrep YAML security rules from code reconnaissance reports and known-issue registers.

9|2|Updated Jul 15, 2026
One-click install
npx skills add https://github.com/IgorSasovets/devsecops-with-claude --skill opengrep-rule-creator-igorsasovets
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: opengrep-rule-creator
Source: https://github.com/IgorSasovets/devsecops-with-claude/tree/main/opengrep-rules-creator/.claude/skills/OPENGREP_RULE_CREATOR
Command: npx skills add https://github.com/IgorSasovets/devsecops-with-claude --skill opengrep-rule-creator-igorsasovets

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing accurate static-analysis security rules by hand is slow and error-prone, and generic rules produce false positives because they ignore a project's actual sanitizers and coding patterns. This Skill turns a Stage 1 code recon report (CODE_RECON.md) and a known-issues register into tailored, low-false-positive Opengrep rules with test files and validation logs. ## Core Features & Use Cases - Four input modes: interactive interview, KNOWN_ISSUES.md-driven, autonomous batch from recon hot spots, and tailored single-rule mode for a specific CVE or library. - Rule quality pipeline: builds a prioritized rule queue, writes one YAML rule per file with full CWE/OWASP/CVSSv3 metadata, generates four-type test files (vulnerable and safe cases), and validates with the opengrep CLI or a static-review fallback. - Use Case: After a pentest flags SQL injection and prototype pollution findings, record them in KNOWN_ISSUES.md, then run the skill to produce validated taint-mode rules, test fixtures, and a RULES_INDEX.md coverage map ready for CI scanning. ## Quick Start Ask the AI to create opengrep rules for your project directory using the CODE_RECON.md produced by the code recon stage, choosing interview or autonomous mode.

Frequently Asked Questions about opengrep-rule-creator

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

FAQPage Schema
How do I create custom Opengrep rules for my codebase?▼

Run the code recon stage first to produce CODE_RECON.md, then invoke this skill with your project directory. It proposes a prioritized rule queue from recon hot spots and known issues, writes each rule with tests, and validates them with the opengrep CLI.

How to write Opengrep taint rules with low false positives?▼

Prefer taint mode whenever user input flows to a dangerous sink, and list every sanitizer and validator found during code recon in pattern-sanitizers or pattern-not. The skill enforces this as a non-negotiable quality checklist before validation.

Can I generate a rule for a specific CVE or vulnerable library?▼

Yes, use tailored mode with a rule description such as a CVE ID or library and method name. The skill fetches advisory details, finds usages in the recon report, and builds a rule matching only the vulnerable API with safe-pattern exclusions.

Does the skill require the opengrep CLI to be installed?▼

No, the CLI is optional. When opengrep with the validate subcommand is available it performs schema and syntax validation; otherwise the skill falls back to a structured static review covering pattern correctness, false-positive risk, and coverage.

Does this skill run or scan my application code?▼

No, it never executes target application code and does not run scans against the target codebase. Validation uses only opengrep validate on the rule and test fixture files, and all output is written to the opengrep-rules-creator directory.

What is KNOWN_ISSUES.md and why does it matter for rule generation?▼

KNOWN_ISSUES.md is a vulnerability register documenting past findings with root-cause patterns and safe alternatives. Entries become the highest-priority rule candidates, and specific root-cause descriptions produce more precise, lower-false-positive rules.