> 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). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# Manage custom rules

Manage Application Security detection rules from the AppSec Rules inventory.

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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
