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

# CodeRabbit Security check

> Publish Security review checks on GitHub, GitLab, Bitbucket, and Azure DevOps, and configure each provider's merge requirements.

All Platforms (Security check publication supports GitHub, GitLab, Bitbucket, and Azure DevOps, including their supported self-managed variants. Merge enforcement depends on the provider and plan.) | Cloud Only (This feature is available on CodeRabbit Cloud only. It is not available on self-hosted CodeRabbit deployments.)

**CodeRabbit Security** publishes a native check, build result, or pull request status that fails while blocking Security review comments remain. Choose a severity threshold, then configure your provider's merge requirements separately.

The check is **off by default for every repository**. It appears only after you enable it for a repository with PR Security review access. It is separate from the general **CodeRabbit** review check and from Deep Scan results.

## Provider support and merge enforcement

Publishing a result does not automatically block merging. Use the setup for your provider:

| Provider | Published result | Merge requirement |
| - | - | - |
| GitHub Cloud and GitHub Enterprise Server | **CodeRabbit Security** check | [Require the check from the CodeRabbit App](#require-the-check-in-github). |
| GitLab Cloud and GitLab Self-Managed, Ultimate | **CodeRabbit Security** external status check | [Register the external check and require status checks to succeed](#require-the-check-in-gitlab). |
| GitLab Cloud and GitLab Self-Managed, Free or Premium | MR-specific **CodeRabbit Security** pipeline status | Pipeline requirements do not guarantee that this specific check is present. |
| Bitbucket Cloud | **CodeRabbit Security** build status on the source commit | [Premium merge checks](#configure-merge-checks-in-bitbucket-cloud) can reject failed or unfinished builds, but build-count rules cannot require this specific check. |
| Bitbucket Data Center | **CodeRabbit Security** build on the source commit | [Require the build](#require-the-build-in-bitbucket-data-center) with parent key `coderabbit-security`. |
| Azure DevOps Services and Azure DevOps Server | `coderabbit/security` PR status | [Require the status in the target branch policy](#require-the-status-in-azure-devops). |

Self-managed Git providers must be connected to CodeRabbit Cloud. This guide does not describe support for self-hosted CodeRabbit deployments. Availability of the repository setting and PR Security review access are required for every provider.

## Enable the check

You need Security write permission to change this setting. Your repository must have [PR Security review access](https://docs.coderabbit.ai/security.md#access-and-billing).

On GitHub Enterprise Server, the CodeRabbit GitHub App installation also needs **Checks: Read and write** repository permission. If your App was configured with read-only Checks access, update the App and approve the updated installation permissions first. See [GitHub Enterprise Server setup](https://docs.coderabbit.ai/platforms/github-enterprise-server.md).

For GitLab, complete the [Cloud setup](https://docs.coderabbit.ai/platforms/gitlab-com.md) or [Self-Managed setup](https://docs.coderabbit.ai/platforms/self-hosted-gitlab.md). Ultimate external checks also need the project-specific setup described [below](#require-the-check-in-gitlab).

For Bitbucket Data Center, complete the [provider setup](https://docs.coderabbit.ai/platforms/bitbucket-data-center.md), including the service account and webhook configuration. The service account needs repository write access to publish builds and resolve comments, and read access to the source repository for fork pull requests. For [Bitbucket Cloud](https://docs.coderabbit.ai/platforms/bitbucket-cloud.md), the integration must be able to publish build statuses on the source commit, including for fork pull requests.

For Azure DevOps Services or Server, give the CodeRabbit bot repository access and permission to contribute to pull requests. If you use a PAT, include **Code (status)** in addition to **Code (Read & Write)**. Confirm that `coderabbit/security` appears on a test pull request before requiring it. See [Azure DevOps setup](https://docs.coderabbit.ai/platforms/azure-devops.md).

**1. Open repository Security settings**

In the CodeRabbit app, open **Security > Repositories**, select your repository, and open **Settings**.

**2. Enable publication**

Under **Pull request check**, turn on **Publish CodeRabbit Security check**. The setting saves automatically.

**3. Choose what blocks merging**

Set **Block on** to the lowest severity you want to block. The default is **Critical**. This selection also saves automatically.

**4. Run a review**

The check starts with the next review. To evaluate an existing pull request now, comment `@coderabbitai full review` on it. If your integration uses a configured CodeRabbit bot or service account, mention that account instead of `@coderabbitai`.

The first evaluation includes existing visible Security comments on the pull request. Configure publication in these repository settings; there is no `.coderabbit.yaml` option for this check.

### Severity thresholds

The threshold includes the selected severity and every higher severity.

| Block on | Comments that can block |
| - | - |
| Critical | Critical |
| Major and above | Major, Critical |
| Minor and above | Minor, Major, Critical |
| Trivial and above | Trivial, Minor, Major, Critical |
| Info and above | Info, Trivial, Minor, Major, Critical |

Threshold changes apply to newly published comments. Raising the threshold does not clear existing blockers, and lowering it does not turn comments previously below the threshold into blockers. Existing comments retain the decision made when they were first evaluated.

## Require the check in GitHub

Publishing the check does not change your repository's merge rules. To block merging, a GitHub repository administrator must configure a ruleset for the protected branch, or a branch protection rule, that requires **CodeRabbit Security**.

1. Let **CodeRabbit Security** complete a review with **Success** or **Neutral** so GitHub can list it as an available required check.
2. In your GitHub repository, open **Settings > Rules > Rulesets**. Create or edit a branch ruleset and select the branches you want to protect. If you use classic branch protection, edit the rule under **Settings > Branches** instead.
3. Enable **Require status checks to pass before merging** and add **CodeRabbit Security**. Select the **CodeRabbit App** as the expected source.
4. Save the rule. For a ruleset, set its enforcement status to **Active**.

See GitHub's guide to [creating a branch ruleset](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/creating-rulesets-for-a-repository) and its [required status check rules](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets#require-status-checks-to-pass-before-merging) for setup details. GitHub requires the check to pass on the latest commit; both **Success** and **Neutral** satisfy this requirement. A failed or unfinished required check blocks merging, subject to your GitHub bypass rules.

> [!WARNING]
>
> The Security check currently runs on pull request commits, not merge queue commits. Do not require it for a GitHub merge queue: the queue can wait for a check that is not published on its temporary commit.

## Require the check in GitLab

On GitLab Cloud and Self-Managed, **Ultimate** supports requiring the named external check. After enabling publication:

1. In CodeRabbit's repository Security settings, select **Copy GitLab Ultimate setup**. The copied values contain the check name, project-specific callback URL, and shared secret.
2. In GitLab, open **Settings > Merge requests > Status checks** and add an external status check. Use the copied **CodeRabbit Security** name, URL, and HMAC shared secret exactly as supplied. Select the target branches to protect.
3. Enable **Status checks must succeed** and save the project settings.
4. Create a new merge request to validate the rule. GitLab applies newly registered checks to new merge requests, not retroactively to existing ones.

Keep the shared secret private. Copy the setup separately for each project; do not reuse another project's URL or secret. See GitLab's [external status check configuration](https://docs.gitlab.com/user/project/merge_requests/status_checks/).

On **Free** and **Premium**, CodeRabbit publishes an MR-specific pipeline status such as `CodeRabbit Security / <project-id>!<merge-request-number>`. Requiring successful pipelines can reject a failed pipeline, but does not require this particular Security status to exist. A passing ordinary CodeRabbit review or another pipeline does not establish that the Security check ran.

## Configure merge checks in Bitbucket Cloud

CodeRabbit publishes a separate build status for the reviewed source commit. To enforce Bitbucket's built-in build checks, a repository administrator must configure merge checks for the target branches and use **Bitbucket Premium** to prevent merges with unresolved checks.

Use the successful-build requirement that also rejects failed or in-progress builds. Choose the required build count for your repository's workflow. See Atlassian's [merge check setup](https://support.atlassian.com/bitbucket-cloud/docs/suggest-or-require-checks-before-a-merge/).

> [!WARNING]
>
> Build-count rules cannot require CodeRabbit Security by name. Other successful builds may satisfy the count when the Security status is missing. This integration publishes a build status; it does not install a custom merge check that requires Security publication. Without Premium enforcement, unresolved merge checks are warnings and users can still merge.

## Require the build in Bitbucket Data Center

Publishing a build does not configure merge blocking. A repository administrator must add a **Required builds** rule on a licensed Bitbucket Data Center instance. A minimum successful-build count does not require CodeRabbit Security specifically.

1. Enable publication and let a review publish **CodeRabbit Security** so its build key is available.
2. In the target repository, open **Repository settings > Required builds** and select **Add required builds**.
3. Select the Security build with parent key `coderabbit-security`. This is the shared required-build identifier, not the individual `coderabbit-security/...` key for one pull request.
4. Choose the protected target branches. Leave exempt source branches at **None** unless you intend to allow a bypass, then save.
5. Validate the rule on a disposable pull request in your instance: confirm a failed or unfinished Security build prevents merging, then fix the blocker and confirm a successful build satisfies this requirement. Other merge requirements still apply.

See Atlassian's [Required builds setup](https://confluence.atlassian.com/bitbucketserver/checks-for-merging-pull-requests-776640039.html#Checksformergingpullrequests-Requiredbuildsmergecheck). For API-managed rules, the [required-builds API](https://developer.atlassian.com/server/bitbucket/rest/v802/api-group-required-builds/) selects this identifier through `buildParentKeys`.

## Require the status in Azure DevOps

Use the same setup for Azure DevOps Services and registered Azure DevOps Server instances connected to CodeRabbit Cloud. You need permission to edit branch policies.

1. Enable publication and confirm that a review posts `coderabbit/security` on a test pull request.
2. Open the target branch's **Branch policies**, find **Status checks**, and add `coderabbit/security`.
3. Set the policy to **Required** and select the CodeRabbit bot as the **Authorized identity**.
4. Apply the policy by default when a pull request is created, and enable **Reset status whenever there are new changes**. Applying it only after the first status is posted can leave pull requests without a Security result outside the requirement.
5. Save and validate a new pull request: missing, pending, and failed results should prevent completion; a successful result satisfies this policy. Other policies and configured bypass permissions still apply.

The Security result belongs to the reviewed PR head and iteration. See Microsoft's [external service branch policy guide](https://learn.microsoft.com/en-us/azure/devops/repos/git/pr-status-policy?view=azure-devops).

## Understand the result

Each provider shows the outcome in its own state:

| Outcome | Meaning | GitHub | GitLab | Bitbucket | Azure DevOps |
| - | - | - | - | - | - |
| In progress | The review is still running. | In progress | `pending` | `INPROGRESS` | `pending` |
| Failure | At least one blocking Security comment remains. | Failure | `failed` | `FAILED` | `failed` |
| Success | Security comments are tracked, and none remain blocking. | Success | `passed` (external check) or `success` (pipeline status) | `SUCCESSFUL` | `succeeded` |
| Neutral | No Security comments are tracked, or comment history cannot be confirmed and there are no known blockers. | Neutral | Same as success | `SUCCESSFUL` | `succeeded` |

Known blockers continue to fail the check even when other review evidence is unavailable. Incomplete analysis alone does not cause failure. A successful or neutral result does not guarantee that the code has no security issues.

Outside GitHub, a neutral outcome uses the provider's passing state. Read the result description to distinguish a verified result from a result with unavailable evidence. If CodeRabbit cannot read the source or confirm publication, the latest commit can have no Security result or an unfinished result; a missing result is not a successful evaluation.

### What counts as a Security comment?

The check tracks visible inline comments published by CodeRabbit under **Security & Privacy**. Each comment counts once. When one comment contains multiple Security issues, its highest displayed Security severity applies. Replies, summary-only items, comments in other categories, and unpublished analysis do not count.

### Read the report

On GitHub, open **CodeRabbit Security** in the pull request's **Checks** tab to see:

* The commit that was evaluated.
* Comment counts by severity: **Found**, **Verified fixed**, **Remaining**, and **Blocking**.
* Blocking comments with their file locations and direct links.
* The **Block on** threshold used for that review and a link to repository settings.

Counts carry across reviews of the same pull request. A dash (`—`) means the history needed for that count is unavailable; it does not mean zero. The report can list blockers admitted under an earlier threshold even after you change the setting.

On Bitbucket Data Center, open the pull request's builds and find **CodeRabbit Security** for the reviewed source commit. The build contains a short verdict and a link to the pull request; it does not contain GitHub's detailed report table. Read the Security comments on the pull request for the findings and their locations. Each pull request has a separate build key, while all Security builds share the required-build parent key `coderabbit-security`.

Inspect **CodeRabbit Security** in GitLab's merge request external checks or pipeline statuses, the Security build status for the source commit in Bitbucket Cloud, or `coderabbit/security` in Azure DevOps' pull request status or policy results. Use the result description and Security comments to understand the blockers; these provider statuses do not expose GitHub's detailed Checks report.

## Clear a blocking comment

Fix the issue, push a new commit, and let CodeRabbit review it. CodeRabbit uses its code-based comment resolution results to verify that the current code addresses the issue. Unrelated pushes do not clear blockers.

> [!NOTE]
>
> Manually resolving a conversation or thread, marking it outdated, or replying that an issue is fixed does not establish a verified fix and does not clear a Security blocker. This applies across providers.

If a published comment is deleted, a later review removes it from blocking only after confirming the deletion. Deleted comments are not counted as **Verified fixed**.

## Disable or troubleshoot the check

Before turning off **Publish CodeRabbit Security check**, remove its specific requirement from GitHub's merge rules, GitLab Ultimate's external status checks, Bitbucket Data Center's **Required builds**, or Azure DevOps' branch status policies. Preserve unrelated requirements. Otherwise, your provider can block merging while waiting for a check that will no longer be published.

On GitLab Free and Premium, **Pipelines must succeed** can block merging when no qualifying pipeline runs. If Security is the only qualifying pipeline, configure another pipeline to validate merge requests before disabling Security publication. If your project will no longer use pipelines, an administrator can turn off **Pipelines must succeed** under **Settings > Merge requests > Merge checks**. Turning off this setting removes the successful-pipeline requirement for the project, including unrelated pipelines; keep it enabled when other pipelines must still pass. See GitLab's [pipeline merge check guidance](https://docs.gitlab.com/user/project/merge_requests/auto_merge/#require-a-successful-pipeline-for-merge).

Bitbucket Cloud build-count rules cannot target Security by name. If the remaining successful builds cannot meet the configured count after Security stops publishing, administrators must adjust the required count or replace the missing Security build with another build that validates the commit. Lowering the count can weaken enforcement of unrelated builds, so confirm that the resulting policy still meets your team's merge requirements.

Disabling applies to subsequent reviews. A check already in progress finishes normally, and previously published checks remain visible. Disabling and re-enabling does not erase tracked blockers or history.

If the check does not appear, confirm that publication is enabled for the correct repository, PR Security reviews are available, and a review has run since you enabled it.

When your plan no longer provides PR Security reviews, new checks stop publishing even if the saved preference remains enabled. Unless you restore that access, follow the provider-specific guidance above: remove the named Security requirement, replace or remove GitLab Free/Premium's pipeline requirement, or adjust Bitbucket Cloud's build-count requirement. Otherwise, pull requests can remain blocked waiting for a result that will not be published.

For rejected publication, check the integration's credentials and repository permissions, then request a new review. For forks, check source repository access as well as target repository access. For GitLab Ultimate, also confirm that the external check uses the setup copied for this project and that you are testing a new merge request. A GitLab status-check retry refreshes saved results; request a CodeRabbit review to evaluate code changes.

## What's next

> [card] [CodeRabbit Security](https://docs.coderabbit.ai/security.md)
>
> Explore PR Security reviews and repository-wide Deep Scans.

> [card] [Review commands](https://docs.coderabbit.ai/reference/review-commands.md)
>
> Request a full review or check your review status.

> [card] [Automatic Approvals](https://docs.coderabbit.ai/pr-reviews/automatic-approvals.md)
>
> Configure review approvals across all actionable review feedback.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.