---
title: "Semgrep Rule Variants: review, setup & limitations · Undominated.ai"
canonical: https://undominated.ai/skills/trailofbits-semgrep-rule-variant-creator/
description: "Port one verified rule to target languages with applicability review and language-specific positive and negative fixtures."
---

# Semgrep Rule Variants: review, setup & limitations · Undominated.ai

> Port one verified rule to target languages with applicability review and language-specific positive and negative fixtures.

[← Explore all skills](/skills/)

SECURITY / trailofbits

# Semgrep Rule Variants

Port one verified rule to target languages with applicability review and language-specific positive and negative fixtures.

 [See setup guidance ↓](#setup)[Original source ↗](https://github.com/trailofbits/skills/tree/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/semgrep-rule-variant-creator/skills/semgrep-rule-variant-creator)

SOURCE REVIEW

 Reviewed 2026-10-14
 Evidence 3 linked sources
 Publisher trailofbits
 Licence [CC-BY-SA-4.0 ↗](https://github.com/trailofbits/skills/blob/8e54050ae63c2f62224c35b1616efe71865b4777/LICENSE)
 Revision 8e54050ae63c
 [Read what was—and wasn’t—checked ↓](#review)

“Creates language variants of existing Semgrep rules. Use when porting a Semgrep rule to specified target languages. Takes an existing rule and target languages as”

 [trailofbits · upstream description ↗](https://github.com/trailofbits/skills/blob/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/semgrep-rule-variant-creator/skills/semgrep-rule-variant-creator/SKILL.md) Our analysis follows below.

01 / THE REASONING

## Why this made the selection.

 - This skill ports one finished Semgrep rule to named languages. A new rule from a bug description is sent to semgrep-rule-creator instead.
- A green semgrep --test only shows that the new rule and the new tests match each other, because the same run wrote both.
- The procedure separates applicability from implementation, uses an independent refutation step, and requires per-language tests before accepting variants.
- Translate a known rule across a specified language list

### A good fit for

 - Porting an existing Semgrep rule to languages Semgrep can actually parse, with tests written first.
- Stopping when the plugin reference directory cannot be resolved, instead of inventing a path.
- Translate a known rule across a specified language list
- Record non-applicable languages separately from unsupported parser failures

### Weigh up before choosing

 - allowed-tools includes WebFetch and Write. Resume does not survive a new session, because runs live under that session's directory.
- The file says a skipped rule or a mismatched test extension can still print that all tests passed.
- This review did not execute the resource.
- A language port must preserve bug semantics, not merely translate syntax. Passing fixtures do not measure real-world precision.
- Workflow execution requires the complete plugin; the definition also permits manual single-language work. Fresh output directories prevent stale files from masquerading as resumed output.

02 / THE REVIEW RECORD

## What we actually inspected.

Source review has boundaries. A clear record is more useful than a “safe” badge.

### Material inspected

 - plugins/semgrep-rule-variant-creator/skills/semgrep-rule-variant-creator/SKILL.md
- plugins/semgrep-rule-variant-creator/skills/semgrep-rule-variant-creator/references/workflow.md
- LICENSE
- README.md

### Our findings

 - Declared tools include WebFetch, Write, and Workflow. referencesDir has to be a real absolute path because the workflow script does not expand plugin-root variables.
- If that path cannot be found, the skill says to stop. A hand-built missing path can report every language as passed without reading the guidance.
- It does not invent a rule from a prose bug, and a same-session resume is not available after the session ends.
- The procedure separates applicability from implementation, uses an independent refutation step, and requires per-language tests before accepting variants.

### Not established by this review

 - The resource was not executed and its tools were not called.
- The port workflow and semgrep --test were not run.
- No skill execution, authenticated service operation, or outcome benchmark was performed.

The review applies to the material and revision named here. A newer upstream release can change its behavior.

03 / PUT IT TO WORK

## Add a skill to your workflow.

[Upstream setup instructions ↗](https://github.com/trailofbits/skills/blob/8e54050ae63c2f62224c35b1616efe71865b4777/README.md)
 - Check out trailofbits/skills at 8e54050ae63c2f62224c35b1616efe71865b4777 and install the complete semgrep-rule-variant-creator plugin through the publisher-supported host workflow, retaining sibling agents, workflows, scripts and references.
- Supply the original rule path, target languages, absolute reference directory and a fresh output directory.
- Validate and test with the same Semgrep version; inspect skipped tests and include vulnerable, safe and edge cases.

### Before you start

 - A local checkout and the tools required by the selected workflow

### Compatibility

A supported full-plugin host; Workflow orchestration requires the Workflow capability named in the definition

### Local instructions; runtime access depends on the workflow

 - Read the source rule and target examples; write YAML rules and test files; run Semgrep locally and optional agent workers.

### Cost model

Instructions are free; agent usage and separately licensed tools can incur charges.

04 / FOLLOW THE EVIDENCE

## The source trail.

Our notes are separate from the original resource. Check upstream before adopting a new version.

 - [Pinned skill definition ↗](https://github.com/trailofbits/skills/blob/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/semgrep-rule-variant-creator/skills/semgrep-rule-variant-creator/SKILL.md) Checked 2026-10-14 https://github.com/trailofbits/skills/blob/8e54050ae63c2f62224c35b1616efe71865b4777/plugins/semgrep-rule-variant-creator/skills/semgrep-rule-variant-creator/SKILL.md Supports: summary, whySelected, bestFor, limitations, install, access, review
- [Publisher repository and installation guidance ↗](https://github.com/trailofbits/skills/blob/8e54050ae63c2f62224c35b1616efe71865b4777/README.md) Checked 2026-10-14 https://github.com/trailofbits/skills/blob/8e54050ae63c2f62224c35b1616efe71865b4777/README.md Supports: install
- [CC-BY-SA-4.0 licence ↗](https://github.com/trailofbits/skills/blob/8e54050ae63c2f62224c35b1616efe71865b4777/LICENSE) Checked 2026-10-14 https://github.com/trailofbits/skills/blob/8e54050ae63c2f62224c35b1616efe71865b4777/LICENSE Supports: license

KEEP COMPARING

## Other approaches to consider.

Related by category or shared topics. These are alternatives to inspect, not a measured quality order.

 [### Burp Project Parser ↗ Extract and search captured Burp traffic while distinguishing empty results from parser startup failures.](/skills/trailofbits-burpsuite-project-parser/)[### C and C++ Security Review ↗ Coordinate scoped native C/C++ security review and assemble findings with an explicit coverage ledger.](/skills/trailofbits-c-review/)[### DWARF Debug Information ↗ Inspect DWARF symbols, types, line tables and address mappings using tool-specific commands.](/skills/trailofbits-dwarf-expert/)

 [AI Tools ↗](/tools/)[Skills ↗](/skills/)[Agents ↗](/agents/)[MCP Servers ↗](/mcp-servers/)[Workflows ↗](/workflows/)

## Continue your investigation

 - [Choose a toolkit](/tools/)
- [Inspect execution hosts](/agents/)
- [Check tool access](/mcp-servers/)
- [Check project dependencies](/check-repo/)
