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

# Fix security requirements with Oplane

> Review the code fixes Oplane suggests for a pull or merge request and commit them to the branch in one click.

> [!NOTE]
>
> Click to fix is in early access. It's only available to organisations that Oplane has turned it on for. If you don't see the settings below, contact your Oplane representative.

When Oplane reviews a pull request or merge request and finds security requirements that need attention, it can also write the code fix for each one. You review the suggested changes in Oplane, pick the ones you want, and Oplane commits them to the PR or MR branch for you. For how reviews run, see [How reviews work](https://www.oplane.com/docs/how-it-works/reviews.md) and [Review pull and merge requests](https://www.oplane.com/docs/find/pull-and-merge-requests.md).

<video muted playsInline disablePictureInPicture disableRemotePlayback controlsList="nodownload noplaybackrate nofullscreen noremoteplayback" preload="auto" aria-label="Walkthrough: fixing security requirements on a pull request with Fix with Oplane" aria-describedby="click-to-fix-video-description" />

Show the video larger
Play the video
Replay the video

> [accordion] What the video shows
>
> The video follows click to fix on an example pull request, PR #14 "Add admin cache purge endpoint".
>
> 1. The **Oplane Security Review** comment on the pull request lists five security requirements, and three of them need attention. The video clicks **Fix with Oplane** under the table.
> 2. The fix page opens. Two requirements have a suggested fix and are selected: Constant-Time Comparison for Admin API Key Validation (high) and Sensitive Data Exposure Prevention in Admin Config Endpoint (critical). Network Access Restriction for Admin Endpoints needs a manual fix. The diff for the first fix adds a constant-time comparison for the admin API key.
> 3. The video clicks **Implement all (2 fixes)**. Oplane prepares the fixes, applies the patches, verifies them, commits, and pushes.
> 4. The result shows both fixes applied and says that a follow-up review is now running. The video clicks **View commit** and ends on "Fixed by Oplane".

## Turn on suggested fixes

Suggested fixes are off by default. You turn them on per repository in workspace settings, so you need to be a workspace owner or an org admin. See [Roles and permissions](https://www.oplane.com/docs/administration/roles.md#workspace-permissions).

**1. Open workspace settings**

Open the workspace connected to the repository and go to its settings.

**2. Find the repository**

Find the linked repository and make sure PR/MR analysis is enabled.

**3. Choose a fix level**

Under **Suggest fixes for findings**, select **Manual**. Oplane then generates a fix for each unresolved finding it can fix automatically, and nothing gets committed until you apply it.

The setting applies to reviews that run after you change it. To get fixes on an open PR or MR, push a new commit or comment `oplane review` on it.

> [!NOTE]
>
> If your organisation also has autofix turned on, the dropdown has an **Autofix** option. With **Autofix**, Oplane commits every suggested fix automatically without anyone clicking **Implement**.

## Open the fixes from your PR or MR

When suggested fixes are turned on and at least one requirement is unresolved, the **Oplane Security Review** comment on the PR or MR has a **Fix with Oplane** button. The button is there from the first review comment, even while Oplane is still generating the fixes.

Click **Fix with Oplane** to open the fix page for that threat model in Oplane. The page header shows the PR or MR title, which links back to the PR or MR.

If you click the button before the fixes are ready, the fix page shows a **Review in progress** notice. When the review finishes, the page refreshes on its own and shows the new fixes, already selected. You don't need to reload the page.

![Oplane Security Review comment on a GitHub pull request, listing six requirements with the Fix with Oplane button below the table](https://mintcdn.com/oplane-6a173d70/2LSAt3y0dhULkq5l/images/click-to-fix/pr-comment.webp?fit=max\&auto=format\&n=2LSAt3y0dhULkq5l\&q=85\&s=7f1dd1ed66d532013f10ce708905e203)

The Fix with Oplane button at the bottom of the Oplane Security Review comment.

## Review the suggested fixes

The fix page lists the PR or MR requirements in three groups in the sidebar:

| Group | What it contains |
| - | - |
| **Suggested fixes** | Requirements Oplane wrote a code fix for. Each one has a checkbox and starts out checked. |
| **Manual fix required** | Requirements that need a developer. You can open them with **Fix in Cursor**, **Fix in Claude Code**, or **Copy prompt**. |
| **Resolved requirements** | Requirements already implemented, or marked accepted risk, out of scope, or not applicable. |

Select a requirement to see its ID (such as `OPLANE_REQ-…`) under the title, its rationale, the affected files, and a diff of the suggested change. Switch between **Split** and **Unified** to change how the diff is shown.

![Oplane fix page for PR #14 showing the requirements sidebar grouped into suggested fixes, manual fix required, and resolved requirements, a diff of the selected fix, and the Implement all button](https://mintcdn.com/oplane-6a173d70/2LSAt3y0dhULkq5l/images/click-to-fix/fix-page.webp?fit=max\&auto=format\&n=2LSAt3y0dhULkq5l\&q=85\&s=2c6295367ec6e39512bca23280f95f16)

The fix page for a pull request, with a suggested fix selected and its diff in split view.

Uncheck any fix you don't want to apply. You can also use the **Resolution** menu on a requirement to pick **Exclude fix**, or set an implementation status such as **Accepted Risk** with a motivation.

> [!NOTE]
>
> If a new review starts on the PR or MR while you're on the fix page, Oplane pauses the page until the review finishes. That way you always apply fixes against the latest findings.

## Apply the fixes

Click **Implement all** (or **Implement** if you unchecked some fixes). The button shows how many fixes it will apply.

Oplane then shows the progress while it prepares the changes, applies them, and commits them. The fixes are committed together in one commit on the PR or MR source branch. If any of them can't be applied, Oplane commits nothing.

The Oplane app makes the commit, not your own Git account. Oplane still records who clicked **Implement** in its own audit log.

When the job is done, you see a list of the applied fixes and a **View commit** button. The new commit triggers a follow-up review, which checks that the fixes work and didn't introduce new issues.

If you leave the page while the job is running, you can come back to it later. The fix page shows a banner with **View progress** or **View result** until a newer review replaces the result.

## When a fix can't be applied

If Oplane can't commit the fixes, the result page tells you why:

| Message | What happened | What to do |
| - | - | - |
| **No fixes to apply** | None of the selected requirements had a fix ready. | Check that the requirements are in **Suggested fixes** and still checked. |
| **These fixes overlap** | Two or more fixes change the same lines, so they can't go in the same commit. | Apply the overlapping fixes one at a time, or fix the code manually. |
| **The branch changed since the review** | Someone pushed to the branch after Oplane reviewed it, so the fixes no longer match the code. If the branch was deleted, there's nothing to apply them to. | Wait for Oplane to review the latest commit (or comment `oplane review` on the PR or MR), then apply the new fixes. |
| **Oplane can't commit to this repository yet** | The Oplane app doesn't have permission to write to the repository. | On GitHub, approve the updated permissions for the Oplane GitHub App, or reinstall it. On GitLab, check that the Oplane bot still has Developer access to the project. |
| **Couldn't reach the repository** | Oplane couldn't access the repository. | Check that the Oplane app is still installed and has access to the repository, then try again. |
| **Implementation failed** | Something unexpected went wrong. | Try again. If it keeps failing, contact Oplane support. |

## Give feedback

Click to fix is in early access, so Oplane wants to hear what works and what doesn't. Send your feedback to your Oplane contact, and include a link to the PR or MR if you can.

## Read next

* [Respond to requirements](https://www.oplane.com/docs/find/respond-to-requirements.md), for other ways to resolve a requirement.
* [Merge gating](https://www.oplane.com/docs/prove/merge-gating.md), to block merges until requirements are resolved.


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