Prerequisites
- For HiddenLayer client credentials, set the Policy permission to
Readto view Policy Packs. To create, edit, duplicate, or delete Policy Packs, set the Policy permission toWrite. See 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.
- The pack name, description, and whether the pack is enabled or disabled.
- The pack category. See 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
Create a Policy Pack
- In the Console, go to Runtime Security > Policy.
- On the Policy Packs tab, click + Add Policy Pack.
- In Policy details, enter a Policy name and an optional Description. Policy names must be unique and can be up to 64 characters.
- 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.
- Include rule packs - Select curated groups of HiddenLayer rules, organized by category or by framework.
- 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.
- 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.
- In Custom entities, optionally define your own entity types with regular expressions. HiddenLayer detects values that match them in prompts and responses.
- 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.
- 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.
- Click Create Policy.
View a Policy Pack
- In the Console, go to Runtime Security > Policy.
- Click a Policy Pack card, or open the card’s actions menu and select View Details.
Edit a Policy Pack
You can only edit Custom packs.- In the Console, go to Runtime Security > Policy.
- Open the actions menu on the Policy Pack card and select Edit Policy.
- Make your changes.
- Click Save Policy.
Duplicate a Policy Pack
- In the Console, go to Runtime Security > Policy.
- Open the actions menu on the Policy Pack card and select Duplicate.
- The new pack is named Copy of followed by the original name. Change the name and configuration as needed.
- 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.- In the Console, go to Runtime Security > Policy.
- Open the actions menu on the Policy Pack card and select Delete Policy.
- Confirm the deletion.
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.
For an existing Project
- In the Console, open the Project and go to Manage Project > Policy Pack.
- Under Change policy pack, search for and select a Policy Pack.

