> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/application-security/application-security-posture-management-aspm/application-security-rules/manage-custom-rules.md).

# Manage custom rules

You can manage Cortex Cloud Application Security detection rules to customize and optimize your security configurations according to your specific needs and preferences: On the **AppSec Rules** inventory, **right-click on a rule or click to open the side panel** → **select an option**:

**UI workflow**

On the **AppSec Rules** inventory, **right-click on a rule or click to open the side panel** → **select an option**:

* Edit: Opens the **Edit Rule** wizard, allowing you to manage existing rules
* Duplication: Opens the selected rule in a **New Rule** dialog box, allowing you to save a copy of the rule. This allows you to customize default rules according to your requirements

**API workflow**

Use the `Modify rule` and `Delete rule API` operations to integrate rule lifecycle management into your automated pipelines.

* **Bulk labeling and organization**: Apply labels programmatically using the `Modify rule operation` to organize rules by team, compliance framework, or business unit
* **OOTB vs. custom constraints**: When automating rule management, note that custom rules accept modifications to all fields (name, severity, frameworks and so on). OOTB rules are maintained by Cortex Cloud and cannot be deleted; they only accept label modifications via the API

For information on managing endpoints, refer to [Manage AppSec rule API documentation](https://docs-cortex.paloaltonetworks.com/r/Cortex-Cloud-Platform-APIs/Modify-an-AppSec-rule).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/application-security/application-security-posture-management-aspm/application-security-rules/manage-custom-rules.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
