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

# Unified policies

Unified policies allow you to choose the rules and rulesets used for Semgrep scans and define what happens to a finding after identification, such as whether a finding is monitored, generates a pull request (PR) or merge request (MR) comment, or blocks a PR or MR. With unified policies, there are two types of policy definitions available to you:

* **Detection policies**, which determine what rules are used to scan your project.
* **Remediation policies**, which determine what happens to the findings identified by Semgrep. These actions can include leaving PR/MR comments, blocking the PRs/MRs, creating Jira tickets, sending Slack notifications, and more.

## A comparison of legacy behavior versus the new behavior

Previously, you were able to [define Policies](/semgrep-code/policies) for each Semgrep product on a rule-by-rule basis. For each rule, you could determine whether findings identified based on that rule would be **monitored**, where the findings are only sent to Semgrep AppSec Platform for review, **generate a PR or MR comment**, or **block a PR or MR from being merged**:

| **Rule A** | Monitor |
| :--------- | :------ |
| **Rule B** | Comment |
| **Rule C** | Block   |
| **Rule D** | Block   |

With unified policies, your definitions are now split into detection and remediation policies. The following tables show the detection policy enabling the rules for all projects and the remediation policy defining the actions that occur when the specified rules generate findings:

### Detection policy

| **Rule A** | Enabled. <br />Scope: All projects |
| :--------- | :--------------------------------- |
| **Rule B** | Enabled. <br />Scope: All projects |
| **Rule C** | Enabled. <br />Scope: All projects |
| **Rule D** | Enabled. <br />Scope: All projects |

### Remediation policy

|                  |                   |                                                               |
| :--------------- | :---------------- | :------------------------------------------------------------ |
| **Automation 1** | <i>Name</i>       | Comment on PR or MR with findings                             |
| **Automation 1** | <i>Scope</i>      | All projects                                                  |
| **Automation 1** | <i>Conditions</i> | Rule is one of:<br /><ul><li>Rule B</li></ul>                 |
| **Automation 1** | <i>Actions</i>    | Comment on the PR or MR                                       |
| **Automation 2** | <i>Name</i>       | Block PR or MR merges with findings                           |
| **Automation 2** | <i>Scope</i>      | All projects                                                  |
| **Automation 2** | <i>Conditions</i> | Rule is one of: <br /><ul><li>Rule C</li><li>Rule D</li></ul> |
| **Automation 2** | <i>Actions</i>    | Block PR or MR                                                |

## Next steps

<CardGroup>
  <Card title="Get started with unified policies" icon="shield-check" href="/semgrep-appsec-platform/unified-policies/get-started" horizontal />
</CardGroup>
