Skip to content

Mastering Semgrep: How to Create Foolproof Rules Every Time

Original Post: Never write an invalid Semgrep rule again

Semgrep is a highly-customizable code scanning tool that allows users to write rules in YAML without needing to learn a vendor-specific DSL. However, writing rules in YAML can be error-prone, especially for new rule writers. Simple mode offers a more straightforward approach but lacks advanced features. Structure mode is a new rule editing mode that combines the robustness of advanced mode with the accessibility of simple mode. It provides a UI-based approach to writing rules, making it impossible to write an invalid rule. Structure mode includes features like selected keys, match badges, pattern extensibility, separate conditions, advanced mode interoperability, drag and drop functionality, and pattern disabling. Overall, Structure mode aims to make rule writing fast, fruitful, and frictionless.

Go here to read the Original Post

Leave a Reply

Your email address will not be published. Required fields are marked *