> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hiddenlayer.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Runtime Security Policy Packs

> Create, manage, and assign reusable Policy Packs that control how AI Runtime Security responds to prompts and responses.

A Policy Pack is reusable Runtime Security behavior: the rules it enforces, what each rule does, and how redaction and prompt injection are handled. You assign one Policy Pack per Project, and a single Policy Pack can serve many Projects. For information about rules that make up a policy pack, see [Runtime Security Rules](https://docs.hiddenlayer.ai/docs/products/runtime/console/runtime_security_rules.md).

## Prerequisites

* For HiddenLayer client credentials, set the Policy permission to `Read` to view Policy Packs. To create, edit, duplicate, or delete Policy Packs, set the Policy permission to `Write`. See [Permissions for Products and Features](https://docs.hiddenlayer.ai/docs/products/console/apikey_aisec_platform.md#permissions-for-products-and-features).

## View Policy Packs

In the Console, go to **Runtime Security > Policy**. The page has two tabs:

* **Policy Packs** - The Policy Packs available to your organization.
* **Rules** - The detection rules that Policy Packs use. See [Rules](#rules).

Each Policy Pack card shows:

* The pack name, description, and whether the pack is enabled or disabled.
* The pack category. See [Policy Pack categories](#policy-pack-categories).
* The number of Projects using the pack.
* **Blocks** - The number of rules that stop the interaction and return a block message.
* **Detects** - The number of rules that are recorded in Findings without interrupting the interaction.
* **Redacts** - The number of entity types masked before content leaves the boundary.

### Search, filter, and sort

* Use **Search Policy Packs** to find a pack by name.
* Use the filter to narrow the list by:
  * **Category** - Protection Level Packs, Application Packs, or Custom Packs.
  * **Status** - Enabled or disabled.
  * **Contains rule** - Packs that include a specific rule.
* Use the sort menu to sort packs by name, ascending or descending.

## Policy Pack categories

| Category | Description |
| - | - |
| Protection Level | Managed by HiddenLayer. You can view and duplicate these packs, but you can't edit their rules or configuration. |
| Application | Managed by HiddenLayer. You can view and duplicate these packs, but you can't edit their rules or configuration. |
| Custom | Created by your organization. You can view, edit, duplicate, and delete these packs. |

> [!TIP]
>
> To customize a Protection Level or Application pack, duplicate it. The copy is saved as a Custom pack that you can edit.

## Create a Policy Pack

1. In the Console, go to **Runtime Security > Policy**.
2. On the **Policy Packs** tab, click **+ Add Policy Pack**.
3. In **Policy details**, enter a **Policy name** and an optional **Description**. Policy names must be unique and can be up to 64 characters.
4. In **Rules and actions**, build the policy from any combination of rule packs and individual rules. Overlapping rules are included once.
   * **Include rule packs** - Select curated groups of HiddenLayer rules, organized by category or by framework.
     * Click the toggle to select or deselect the rule pack.
   * **Include individual rules** - Search for and select specific rules.
     * Click the checkbox to select or deselect an individual rule.
5. In **Selected rules**, choose the action Runtime Security takes when each rule matches. New rules start as **Detect**.
   * **Block** - Stops the interaction and returns a block message.
   * **Detect** - Records the match in Findings without interrupting the interaction.
6. In **Redaction list**, choose what gets masked in prompts and responses.
   * **Pre-built entity types** - Select the HiddenLayer entity types this policy should redact.
   * **Trusted entity patterns** - Add regular expressions for values that should not be redacted.
7. In **Custom entities**, optionally define your own entity types with regular expressions. HiddenLayer detects values that match them in prompts and responses.
8. Configure **Prompt Injection** detection.
   * **Prompt Injection Appeals** - Use application context to have the configured appeal model review prompt injection detections. When enabled, enter an **Application description** and **System prompt**.
   * **Allow List** - Strings that will be allowed even if they match injection signatures. All entries are case-insensitive.
   * **Block List** - Strings that should always be blocked, even if not detected by the scanner. All entries are case-insensitive.
9. Review **What this pack will do**, a summary of the rules, actions, redactions, custom entities, and affected Projects.
   * This also lists required information that is missing, like a name for the policy.
10. Click **Create Policy**.

A Policy Pack must have a name and at least one rule pack or rule before you can save it. Saving creates a Custom pack.

## View a Policy Pack

1. In the Console, go to **Runtime Security > Policy**.
2. Click a Policy Pack card, or open the card's actions menu and select **View Details**.

The details page shows the pack's rules and actions, included rule packs, redaction and prompt injection behavior, and the Projects assigned to the pack.

## Edit a Policy Pack

You can only edit Custom packs.

1. In the Console, go to **Runtime Security > Policy**.
2. Open the actions menu on the Policy Pack card and select **Edit Policy**.
3. Make your changes.
4. Click **Save Policy**.

Changes apply to every Project that uses the pack.

## Duplicate a Policy Pack

1. In the Console, go to **Runtime Security > Policy**.
2. Open the actions menu on the Policy Pack card and select **Duplicate**.
3. The new pack is named **Copy of** followed by the original name. Change the name and configuration as needed.
4. Click **Create Policy**.

## Delete a Policy Pack

You can only delete Custom packs. You can't delete the pack assigned to the Default Project; assign another pack to the Default Project first.

1. In the Console, go to **Runtime Security > Policy**.
2. Open the actions menu on the Policy Pack card and select **Delete Policy**.
3. Confirm the deletion.

> [!NOTE]
>
> Projects using the deleted Policy Pack move to the default Policy Pack.

## Assign a Policy Pack to a Project

Every Project receives a system-assigned default policy. The Default Project's pack covers critical and high severity detections, and traffic that isn't assigned to another Project goes to the Default Project.

### When creating a Project

When you create a Project, select a Policy Pack that matches the Project's purpose and risk profile. You can:

* Search for a pack by name, or filter by category.
* Click **Help me find a Policy Pack** to get a recommendation. Answer the questions about your application, then click **Use this pack**.
  * What kind of application is this? (General or unknown, Chatbot, or Coding harness)
  * Is the application internet-facing, or internal only?
  * Is the application in production, or still in development or research?
* Click **Create new Policy Pack** to create a pack without leaving the Project flow.

You can also turn on **Monitor Mode**. In monitor mode, all findings are detected, but nothing is blocked or redacted. You can turn off monitor mode later from Manage Project.

### For an existing Project

1. In the Console, open the Project and go to **Manage Project > Policy Pack**.
2. Under **Change policy pack**, search for and select a Policy Pack.

The new pack is assigned to the Project.

## Related

* [Policy](https://docs.hiddenlayer.ai/docs/products/runtime/console/runtime_security_policy.md)
* [Projects](https://docs.hiddenlayer.ai/docs/products/runtime/console/runtime_security_projects.md)
* [Rules](https://docs.hiddenlayer.ai/docs/products/runtime/console/runtime_security_rules.md)
