[Yandex Cloud documentation](../../../index.md) > [Yandex Security Deck](../../index.md) > [Step-by-step guides](../index.md) > [Cloud Security Posture Management (CSPM)](index.md) > Creating a custom rule

# Creating a custom rule

To work with [custom rules](../../concepts/custom-rules.md), you need the `security-deck.rules.editor` [role](../../security/cspm-roles.md) or higher.

{% list tabs group=instructions %}

- Security Deck UI {#cloud-sd}

  1. Go to [Yandex Security Deck](https://center.yandex.cloud/security/).
  1. In the left-hand panel, select ![file-text](../../../_assets/console-icons/file-text.svg) **Rules and exceptions**.
  1. At the top of the window, select the [workspace](../../concepts/workspace.md).
  1. Navigate to the **Configuration** tab and click **Create rule**.
  1. Under **Basic rule**, select the rule whose parameters will be used as the basis for creating a custom rule.

     You can also select a basic rule from the general list of rules. If a rule in the list allows you to create a custom rule based on it, you can click ![image](../../../_assets/console-icons/ellipsis.svg) next to it and select ![image](../../../_assets/console-icons/copy-plus.svg) **Create rule based on**.

  1. Under **Main parameters**:
     
     1. Update the rule name and description.
     1. Select the rule criticality.
     1. In the **Recommendations** field, describe the set of actions required to fix the violation.

  1. Optionally, Under **Customizable parameters**, edit the settings specific to the basic rule.
  1. Click **Save**.

  {% note info %}
  
  To check rule compliance, [add](../custom-rules-sets/update-set.md) the rule to a new or existing custom rule set. Then check the [workspace settings](../workspaces/update.md) to make sure the rule set is active.
  
  {% endnote %}

{% endlist %}

#### Useful links {#see-also}

* [Custom rules](../../concepts/custom-rules.md)
* [Editing a custom rule](edit-custom-rule.md)
* [Deleting a custom rule](delete-custom-rule.md)
* [Custom rule sets](../custom-rules-sets/index.md)