> For the complete documentation index, see [llms.txt](https://docs.prismacloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.prismacloud.io/content-collections/application-security/risk-management/monitor-and-manage-code-build/pull-request-scan.md).

# Pull Request Scanning

Pull request scans are initiated by events triggered by version control systems such as GitHub, GitLab Bitbucket and Azure Repos, or via webhooks. These scans are run on default or non-default branches containing open Pull Requests (PR) or Merge Requests (MR) from your integrated repositories. The scan results are based on the default **Enforcement** thresholds or custom configurations.

Pull request scans run automatically on the default branch of your repositories. To scan non-default branches, manual configuration is required. For more on non-default branch scans, refer to [Non-default branch scans](/content-collections/application-security/get-started/non-default-branch-scan.md).

## Configure Pull Request Scans

Configure PR scan settings using the **Comment Bot Enforcement** threshold.

1. Before you begin, configure branch protection rules in your Version Control System (VCS) to fail builds if a step fails.
2. In **Application Security** select **Projects** > **Action** menu.
3. Select **Enforcement** from the menu.

   <figure><img src="/files/uf5CuuUAj1yQLaAeY3TG" alt="enfor 1.1"><figcaption></figcaption></figure>
4. In a code category, drag the **Comments bot** threshold rule arrow to your required severity.

   The 'hard-fail level' sets the threshold for failing a pull request (PR) scan conducted by Prisma Cloud. When the severity of a finding is at or above this threshold, the PR scan will fail, and PR comments will be added. This ensures that any identified issues meeting or exceeding the specified severity threshold will result in a failed PR scan and the addition of comments to the PR. For more information on Enforcement, refer to [Enforcement](/content-collections/application-security/risk-management/monitor-and-manage-code-build/enforcement.md).

   <figure><img src="/files/GRRd4mUrUor4PHTSyiLk" alt="pr sca enforcement"><figcaption></figcaption></figure>
5. Select **Save**.

## Manage Pull Request Scan Results

You can manage pull request scan results within the pull request itself or through the Prisma Cloud Console.

### On the Pull Request

Errors detected by a PR scan triggered by changes to a resource are displayed as a PR comment within the pull request. Details of the error and suggested remediation can be viewed by clicking the arrow in the comment.

SCA PR comments are for any vulnerability in a modified package manager file. Secrets PR comments are only for new or modified lines of code that include a secret finding.

<figure><img src="/files/hgcrNmVtycopRFvAkH9J" alt="pr comment"><figcaption></figcaption></figure>

During pull request (PR) scans, Prisma Cloud reviews all modified resources within the PR. However, due to constraints in many version control systems (VCS), comments can only be added to modified lines. Despite this limitation, the scanner accurately identifies the relevant lines for each comment. It’s important to note that scan results are not filtered on a line-by-line basis, so results for other lines in the same resource may also be provided, even if only one line was changed. This approach is particularly valuable for customers who already have existing Infrastructure as Code (IaC) with identified issues. By identifying these issues during pull requests when changes are made, Prisma Cloud can expedite the resolution of older issues. While this may introduce additional notifications, it ensures that issues within actively modified resources are not overlooked.

### On the Prisma Cloud Console

In addition, you can view results of a pull request scan on the Prisma Cloud console: In **Application Security**, select **Projects** and click the **VCS Pull Requests** tab.

<figure><img src="/files/sFRD0oOSRSBtswoHF5o1" alt="pull request console1.1"><figcaption></figcaption></figure>

For more information on managing scan results, including fixing or suppressing issues detected during a scan, refer to [Monitor and Manage Code Build Issues](https://github.com/PaloAltoNetworks/pc-docs-md/tree/main/enterprise-edition/content-collections/application-security/risk-management/monitor-and-manage-code-build/monitor-and-manage-code-build.md)


---

# 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://docs.prismacloud.io/content-collections/application-security/risk-management/monitor-and-manage-code-build/pull-request-scan.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.
