> 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/applications/defining-business-applications/define-applications-by-code-criteria/reference-a-code-criteria-grouping-and-unification.md).

# Reference A: Code Criteria grouping and unification

Use this reference when you need to predict application boundaries before creating a Code Criteria.

## Grouping levels

Configure **Group by** independently for each provider tile.

| Level            | Result                                             |
| ---------------- | -------------------------------------------------- |
| **Organization** | Creates one application for each VCS organization. |
| **Project**      | Creates one application for each VCS project.      |
| **Repository**   | Creates one application for each repository.       |

Only providers with active integrations appear. Supported providers include GitHub, GitLab, Bitbucket, Azure Repos, and AWS CodeCommit.

## Scope behavior

Each selected provider has its own scope tab. An unfiltered tab includes every asset at its configured grouping level.

Scope filters combine as follows:

| Where                       | Logic | Result                          |
| --------------------------- | ----- | ------------------------------- |
| Values in one filter        | `OR`  | Any listed value can match.     |
| Filters in one provider tab | `AND` | Every filter must match.        |
| Provider tabs               | `OR`  | A match in any tab is included. |

Adding a provider tab widens the scope. It never narrows another tab's scope.

Available filter fields depend on the provider and grouping level:

* **Repository Name** is available at every level.
* **Organization Name** is available for organization, project, and repository grouping.
* **Project Name** is available for supported providers using project or repository grouping.

{% hint style="warning" %}

### Unfiltered provider tabs

An unfiltered provider tab includes all its assets. Multiple unfiltered tabs can create many applications.
{% endhint %}

## Application unification

The two unification settings determine whether matching names form one application.

| Setting                                                            | Effect                                                                                                        |
| ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- |
| **Merge organizations/projects/repositories with identical names** | Merges same-named applications within one provider type.                                                      |
| **Unify applications across providers**                            | Merges same-named applications across provider types. This setting enables and locks within-provider merging. |

When within-provider merging is off, generated application names include a provider suffix. Remaining name collisions receive a UTC timestamp suffix.

### Same-provider deployments

Cloud and self-managed deployments of the same provider share one provider tile. For example, GitHub Cloud and GitHub Enterprise are treated as GitHub.

Enable within-provider merging to combine same-named applications from those deployments. If identical organizations must remain separate, create separate Criteria and filter each by **Organization Name**.

### Outcome matrix

The following example uses a same-named repository in GitHub Cloud, GitHub Enterprise, and GitLab.

| Within-provider merge | Cross-provider unify | Result                                                                      |
| --------------------- | -------------------- | --------------------------------------------------------------------------- |
| Off                   | Off                  | Three separate applications.                                                |
| On                    | Off                  | Two applications: GitHub deployments merge; GitLab remains separate.        |
| On                    | On                   | One application across all providers.                                       |
| Off                   | On                   | Not available. Cross-provider unification requires within-provider merging. |

## Metadata behavior

Every generated application inherits the configured business owner and criticality.

Business criticality affects Urgency for issues associated with the application. You can also elevate criticality to **Critical** for internet-exposed mapped assets.


---

# 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/applications/defining-business-applications/define-applications-by-code-criteria/reference-a-code-criteria-grouping-and-unification.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.
