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

# Patching

> Learn how to generate proposed fix pull requests for security findings using the GitHub integration, then review, validate, and merge.

## Overview

Patching turns a finding into a proposed pull request against the repository and branch you select, giving engineers a concrete change to review and validate.

## Patching Use Cases

Use patching when you want MindFort to turn finding context into a proposed code change.

| Use Case | How It Helps |
| - | - |
| **Address a confirmed finding** | Generate a proposed fix PR from the finding's evidence, impact, and remediation advice. |
| **Speed up remediation review** | Give engineers a concrete patch to inspect instead of starting from a blank ticket. |
| **Handle repeated bug classes** | Propose changes for similar access-control, validation, or configuration issues after a pattern is understood. |
| **Prepare for retest** | Deploy reviewed changes, then re-run an assessment or retest to check whether the issue still reproduces. |
| **Connect security and engineering workflows** | Keep the finding linked to the generated PR so teams can move from evidence to code review. |

Patching is best for platform-generated pull requests. If your team wants to use a local AI copilot inside its own checkout, connect the copilot through [MCP](/guides/mcp) so it can read MindFort finding evidence and remediation advice from the platform.

## Prerequisites

* Connect GitHub under **Settings → Integrations**.
* [Link at least one enabled repository to the target](/guides/targets#link-source-repositories).

## Create a Patch

1. Open a finding from the **Findings** view.
2. Select **Patch** in the finding actions.
3. Select a linked repository.
4. Select the **base branch** the PR should target.
5. Click **Create PR**.

MindFort will begin generating the patch. While the patch is being created, the button shows a "Patching" status indicator. Once complete, a **View PR** link appears so you can review the changes on GitHub.

## Review and Merge

After the PR is created:

1. Review the proposed changes on GitHub.
2. Run your CI/CD checks as usual.
3. Merge when satisfied.

## Recommended Process

1. Start with high- and critical-severity findings.
2. Always review the generated PR before merging — treat it as a starting point.
3. Deploy the reviewed changes, then re-run an assessment or retest to check whether the reported issue still reproduces.

## Patch status and finding status

Patch status tracks the generated pull request. A merged patch does not, by itself, prove that a deployed vulnerability is fixed or mark the finding resolved.

When the organization has automatic retesting after patch merge configured, the finding shows the queued or scheduled validation and its result. See [Automatic retest status](/guides/retesting#automatic-retest-status).


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