semgrep-rule-variant-creator

Port Semgrep rules to new languages with generated test cases.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the process of adapting existing Semgrep rules to new programming languages, ensuring consistent security analysis across diverse codebases.

Core Features & Use Cases

  • Rule Porting: Translates Semgrep rules from one language to others, handling language-specific syntax and idioms.
  • Test Generation: Creates independent test cases for each ported rule variant.
  • Use Case: You have a critical Semgrep rule for detecting SQL injection in Python. Use this Skill to port that rule to Go and Java, generating new, runnable rule files and tests for each language.

Quick Start

Use the semgrep-rule-variant-creator skill to port the 'sql-injection' Semgrep rule to Golang and Java.

Frequently Asked Questions about semgrep-rule-variant-creator

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

FAQPage Schema
How do I port Semgrep rules to a different programming language?

Porting Semgrep rules to a new language involves analyzing the original rule's applicability, translating the syntax and idioms, and generating an independent rule variant. This Skill automates that translation to expand static analysis coverage across different languages.

Can I automatically generate test cases when translating static analysis rules to new languages?

Yes, you can automatically generate test cases when translating static analysis rules. This Skill creates independent, language-specific test cases for each ported Semgrep rule variant to validate the translated detection logic.

What is the best way to expand Semgrep code security coverage across a polyglot codebase?

The best way to expand Semgrep code security coverage across a polyglot codebase is to port existing rules to each target language. This Skill generates independent rule variants and test cases, ensuring consistent security analysis across diverse codebases.

Does this tool work with existing developer tools for static analysis in Go and Java?

Yes, it works with existing developer tools for static analysis in Go and Java by taking an established Semgrep rule and porting it to those target languages. It outputs new runnable rule files and tests tailored to each specific environment.

What are the limitations of automating Semgrep rule creation for multiple programming languages?

The main limitation of automating Semgrep rule creation is that not all detection logic translates directly between languages due to differing syntax and idioms. The process requires applicability analysis and generating independent variants to ensure accuracy.