You can clone an existing SAST rule and use that as a base to build your own rule.
Cloning a rule provides the following benefits:
- You can make changes to a rule and review the results instead of directly editing an existing rule.
- You can create a clone of a rule that you do not have permission to edit and make your changes.
To clone a SAST rule:
-
Select Policies & Rules from the left sidebar.
-
Select SAST RULES.
-
Click on the vertical three dots next to a rule and select Clone.
A copy of the rule appears in the list of rules with the rule name in the format,
<original rule name\>-\<Clone number\>. For example, the first clone ofArbitrary Code Execution - Unsanitized inputsbecomesArbitrary Code Execution - Unsanitized inputs Clone, with subsequent clones appended withClone 1,Clone 2, etc.
-
Select Edit to edit the cloned rule according to your requirements.
See Edit a SAST Rule for more information.