create_rule
Create a new Semgrep rule to detect code patterns by specifying a search pattern, target language, and message. Output the rule to a file for use in static analysis.
Instructions
Creates a new Semgrep rule
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output_path | Yes | Absolute path for output rule file | |
| pattern | Yes | Search pattern for the rule | |
| language | Yes | Target language for the rule | |
| message | Yes | Message to display when rule matches | |
| severity | No | Rule severity (ERROR, WARNING, INFO) | WARNING |
| id | No | Rule identifier | custom_rule |