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

# Editing a custom rule

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

{% 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. On the **Custom** tab, click ![image](../../../_assets/console-icons/ellipsis.svg) next to the rule and select ![image](../../../_assets/console-icons/pencil.svg) **Edit**.

{% endlist %}

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

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