semgrep-rule-variant-creator

Port Semgrep security rules to new target languages through a four-phase workflow.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill solves the challenge of maintaining consistent security coverage across polyglot codebases by automating the porting of existing Semgrep rules to new target languages.

Core Features & Use Cases

  • Test-Driven Porting: Enforces a strict test-first methodology to ensure ported rules are accurate and reliable.
  • Applicability Analysis: Guides the user through a mandatory assessment phase to determine if a vulnerability pattern is truly relevant in the target language.
  • Use Case: If you have a SQL injection rule for Python, use this Skill to systematically generate, test, and validate equivalent rules for Go and Java, ensuring each variant is idiomatic and effective.

Quick Start

Use the semgrep-rule-variant-creator skill to port the existing sql-injection 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 new programming language?

Port Semgrep rules to new languages using a structured four-phase workflow that automates AST-based pattern translation, adapts language-specific idioms, and validates results through test-driven development.

What is the best way to maintain static-analysis security coverage across polyglot codebases?

Maintain static-analysis security coverage across polyglot codebases by systematically translating existing vulnerability detection patterns into target-language variants, ensuring consistent security enforcement. This approach automates the porting of Semgrep security rules.

Does porting Semgrep security rules require applicability analysis for the target language?

Yes, porting Semgrep security rules requires a mandatory applicability analysis phase to determine if the original vulnerability pattern is truly relevant and applicable in the target programming language before translation begins.

How do I validate ported static-analysis rules for accuracy?

Validate ported static-analysis rules for accuracy by enforcing a strict test-first methodology, which ensures that newly generated language variants are tested rigorously before deployment in security testing pipelines.

Can I use this automated rule porting approach for translating SQL injection rules to Go and Java?

Yes, you can use automated rule porting to translate a SQL injection rule from Python into equivalent, idiomatic Semgrep variants for Go and Java, ensuring each target variant is effective and properly tested.