> 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/unified-application-security-policies/tenant-ui-workflow/create-a-policy.md).

# Create an AppSec policy

The policy creation wizard consists of six sequential steps: General, Conditions, Scope, Triggers & Actions, Exceptions, and Summary.

#### Step 1: General

Define the policy identity and type

1. Select **+ Add Policy** from the policy table.
2. Enter a **Policy Name** (required). The name must be unique across all policies.
3. Enter a Policy Description (optional).
4. Select the **Policy Type**. Refer to [Policy types](https://cortex-docs.paloaltonetworks.com/application-security/application-security-posture-management-aspm/unified-application-security-policies/references/core-concepts.md) for descriptions.
5. Optional (Code Scanners only): select **Apply only to AI Code Scanner findings** to evaluate the policy only against findings from the AI Code Scanner. The option appears only when the AI Code Scanner is enabled on the tenant.
6. Select **Next**.<br>

   **Note**: When you edit an existing policy and change its name, issues that the policy already created show the new name after the next scan.

#### Step 2: Conditions

Define the finding types and filters that determine which findings the policy matches

1. Select one or more finding types.

   Refer to [Finding types](https://cortex-docs.paloaltonetworks.com/application-security/application-security-posture-management-aspm/unified-application-security-policies/references/reference-a-finding-type-details.md) for the available options per policy type.
2. Configure condition filters to narrow the scope.

   Refer to [Condition Filters](https://cortex-docs.paloaltonetworks.com/application-security/application-security-posture-management-aspm/unified-application-security-policies/references/reference-b-condition-filters-and-logic.md) for the available filters per policy type.
3. To add additional condition groups, select **+ Add Condition Group**.

   Refer to [Condition Filters](https://cortex-docs.paloaltonetworks.com/application-security/application-security-posture-management-aspm/unified-application-security-policies/references/reference-b-condition-filters-and-logic.md) for `OR` logic.
4. For **Vulnerabilities** finding type, optionally configure a grace period.

   Refer to [Reference E: Grace period logic and configuration](https://cortex-docs.paloaltonetworks.com/application-security/application-security-posture-management-aspm/unified-application-security-policies/references/reference-e-grace-period-logic-and-configuration.md) for information about grace periods.
5. Select **Next**.

#### Step 3: Scope

Define the asset boundaries for policy evaluation

* **Asset Groups**: Select one or more pre-configured asset groups. If no asset groups are selected, the policy applies to all assets
* **Applications**: Select specific applications to scope the policy (not applicable to Build Images)

{% hint style="info" %}

### Note

To create a new asset group or application, select the corresponding link in the scope step. The link opens the asset group or application configuration in a new tab
{% endhint %}

Refer to [Scope](https://cortex-docs.paloaltonetworks.com/application-security/application-security-posture-management-aspm/unified-application-security-policies/references/reference-c-scope-mapping-details.md) for additional details.

#### Step 4: Triggers and actions

Configure when the policy evaluates findings and what actions to execute on matches

1. Enable one or more triggers.

   The wizard offers only the triggers that the selected finding types support. The Periodic Scan trigger runs every 12 hours, and also when a scan is requested manually. The wizard groups triggers by SDLC stage: **Code** (IDE Scan, Pre-Receive Scan, PR Scan, Periodic Scan), **Build** (CI Code Scan, CI Image Scan), and **Deploy** (Registry Image Scan). Refer to [Reference D: Trigger and actions mapping](https://cortex-docs.paloaltonetworks.com/application-security/application-security-posture-management-aspm/unified-application-security-policies/references/reference-d-trigger-and-actions-mapping.md) for additional information.
2. Configure at least one action per enabled trigger. When you select **Create an issue** on CI Image Scan or Registry Image Scan, select an issue severity for that trigger. The wizard does not continue until a severity is selected.
3. Optionally configure **Override Issue Severity**.

   Refer to [Reference D: Trigger and actions mapping](https://cortex-docs.paloaltonetworks.com/application-security/application-security-posture-management-aspm/unified-application-security-policies/references/reference-d-trigger-and-actions-mapping.md) for additional information.
4. Select **Next**.

**Note**: For CI/CD Configuration scanners and Drift Detection scanner policies, the step shows **This policy supports issue creation during periodic scans only.** For Code Scanners policies, the step shows **Third-party scanners can create issues only. They cannot perform blocking actions.**

**Note**: A trigger card is unavailable when none of the finding types in the conditions supports that trigger. Turning a trigger off clears its actions. Selecting an action turns its trigger on<br>

#### Step 5: Exceptions

The Exceptions step attaches existing rules only. To create or approve exception rules, see AppSec policy exceptions.

* This step is optional. Select **Next** without selecting a rule to continue to the summary
* The list shows only approved exception rules. If none exist, the step shows **No Exceptions Found** and **Only approved exception rules can be attached to a policy**
* Rules that apply to all Application Security policies (global rules) are listed but cannot be selected. They already apply to this policy. To stop a global rule from applying to this policy, an approver must change the rule's binding to **Selected policies only** and select every policy that should keep it
* Saving the policy fails if an attached exception rule has expired. Clear the expired rule, then save
* Attaching and detaching exception rules requires the policy exceptions **Edit** permission. Each change is recorded in the audit log
* The issue-volume estimate on the Summary step excludes findings covered by the selected rules

**Note**: To create or approve exception rules, see [AppSec policy exceptions](https://cortex-docs.paloaltonetworks.com/application-security/application-security-posture-management-aspm/unified-application-security-policies/appsec-policy-exceptions.md).

#### Step 6: Summary

Review the complete policy configuration before saving.

The summary displays a structured **If / When / Then** table.

| Column | Maps To    | Description                                            |
| ------ | ---------- | ------------------------------------------------------ |
| If     | Triggers   | The SDLC stage and scan type that activates the policy |
| When   | Conditions | The finding types and filters that must match          |
| Then   | Actions    | The enforcement actions executed on matched findings   |

**Row splitting logic**

If a trigger supports only a subset of the selected finding types, the summary splits the row to display only the relevant finding types and their corresponding filters per trigger.

Example: If both Vulnerabilities and Malware are selected with both CI Code Scan and CI Image Scan triggers, the CI Code Scan row displays only Vulnerabilities, and the CI Image Scan row displays both Vulnerabilities and Malware. Malware is an image finding type, so code triggers do not evaluate it.

The summary also displays:

* **General details**: Policy name, description, and type
* **Editor details**: Created by, created at, updated by, updated at
* **Issue-volume estimate**: When the Periodic Scan trigger has the Create an Issue action selected, the Periodic Scan row shows how many issues the policy is estimated to create. If the estimate is over the threshold, narrow the conditions or scope before you save. Refer to [Reference F: Engine evaluation and Urgency logic](https://cortex-docs.paloaltonetworks.com/application-security/application-security-posture-management-aspm/unified-application-security-policies/references/reference-f-engine-evaluation-and-urgency-logic.md) for details

Select **Done** to create and enable the policy. The policy begins evaluating findings during the next scan cycle

**What happens next**

* **Proactive (PR scan)**: When a developer opens a PR that introduces a finding matching the policy conditions, the policy blocks the PR from merging (if Block PR is configured). The developer receives a PR comment with the finding details and remediation guidance. The vulnerability never reaches the protected branch
* **Proactive (CI scan)**: When a CI pipeline builds an artifact containing a finding matching the policy conditions, the policy blocks the CI pipeline (if Block CI is configured). The vulnerable artifact is not deployed
* **Reactive (Periodic scan)**: During the next periodic scan, the policy engine evaluates all existing findings against the policy conditions. Matched findings generate issues in the AppSec Issues table. The Urgency engine classifies each issue based on Code-to-Cloud deployment context, exploit intelligence, and business criticality. Issues affecting deployed, internet-exposed, business-critical assets receive Top Urgent or Urgent classification. Prioritize remediation by Urgency level

**AI recommendation-based policy creation**

The **Recommendations** panel suggests policies based on scan findings and coverage gaps. Each recommendation identifies a finding pattern that is not covered by an existing policy.

1. Select the AI Recommendations tab in the policies table view.
2. Review the recommended policy configurations.
3. Select **Accept** on a recommendation.

   Expected outcome: The policy wizard opens with the recommended configuration pre-populated.
4. Review and modify the pre-populated configuration as needed.
5. Complete the remaining wizard steps, then select **Done** on the Summary step.

   Expected outcome: The policy is created with the recommended configuration.

#### **Create a policy from a supply chain attack**

When a supply chain attack affects packages in your environment, you can open the policy wizard from the attack. The wizard opens with a suggested policy that targets the affected packages, marked **AI Recommended**. Review each step, adjust the configuration as needed, then select **Done** on the Summary step.


---

# 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/unified-application-security-policies/tenant-ui-workflow/create-a-policy.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.
