How do I download a rule yaml file directly?

1.3k Views Asked by At

Is there a way to download a Semgrep rule's yaml file from providing the rule name id? I know that you can bring them manually from the registry (via copy/paste).. but I am looking for a faster way so I can test rules locally.

1

There are 1 best solutions below

0
On BEST ANSWER

The best way to find all rule yaml files from Semgrep is through the Semgrep Rules Github Repository. You can use the rule-id to search for it using the "Go to file" button within the repo:

"Go to file button within repo"

"Searching for rules via rule-id".

Once you have located the rule you wish to download, right-click on the "Raw" button and then click "Save link as..." to download the yaml file directly.

"Rule yaml file within repo"