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

# Applying Fixes

> Start fixing vulnerable code.

## Scanning your repository

<Info>
  **Prerequisite** You [registered](https://www.corgea.app/registration/) in Corgea

  **Prerequisite** You have completed a [scan](scanning)
</Info>

Depending on the size of the results in the scan, it may take sometime for results to show up. For a couple of hundred findings, it should take 10 mins.

Go to [scanning](scanning) to learn more.

<Steps>
  <Step title="Select an Issue">
    * Navigate to the [projects](https://www.corgea.app/projects/) page.
    * Choose a project.
    * Click on a Scan.
    * Find an issue row with the `Fix Available` status.
    * Click the issue row to open the issue details sidebar.

    <Frame>
      <img src="https://mintcdn.com/corgea/y3xW6TraK0Q97XaD/images/issue_fixes/auto_fix_web_fix_available.png?fit=max&auto=format&n=y3xW6TraK0Q97XaD&q=85&s=56722a8656a3fcf4ab30eb310046634d" style={{ borderRadius: '0.5rem' }} width="829" height="234" data-path="images/issue_fixes/auto_fix_web_fix_available.png" />
    </Frame>
  </Step>

  <Step title="Review the fix">
    Review the suggested fix in the issue details sidebar before applying it.

    Corgea generates fixes using AI and runs quality checks before making them available. We still strongly recommend reviewing the suggested change for correctness and fit in your codebase before applying it.
  </Step>

  <Step title="Apply the fix">
    If the fix seems appropriate, there are two ways to apply fixes:

    * **Option 1**: Corgea Web Application

      In the issue details sidebar, click on the `Create Pull Request` button.
      <Tip>To issue a pull-request from Corgea, you need to setup the appropriate integration with [GitHub](github) or [Azure DevOps](azure_devops).</Tip>

          <Frame>
            <img src="https://mintcdn.com/corgea/y3xW6TraK0Q97XaD/images/issue_fixes/auto_fix_web_create_pr.png?fit=max&auto=format&n=y3xW6TraK0Q97XaD&q=85&s=591e747edc15cdf698476a77fc13b359" style={{ borderRadius: '0.5rem' }} width="384" height="224" data-path="images/issue_fixes/auto_fix_web_create_pr.png" />
          </Frame>

      Corgea automatically generates a pull request with issue and fix context. Wait for PR creation to complete, then click `View Pull Request`.

          <Frame>
            <img src="https://mintcdn.com/corgea/y3xW6TraK0Q97XaD/images/issue_fixes/auto_fix_web_view_pr.png?fit=max&auto=format&n=y3xW6TraK0Q97XaD&q=85&s=5453cc3411ccaccd29586dd6f433af96" style={{ borderRadius: '0.5rem' }} width="391" height="218" data-path="images/issue_fixes/auto_fix_web_view_pr.png" />
          </Frame>

      Alternatively, use `Download Fix` and select one of the available options:

      * `Download Git Patch`
      * `Download Fixed File`

          <Frame>
            <img src="https://mintcdn.com/corgea/y3xW6TraK0Q97XaD/images/issue_fixes/auto_fix_web_download_fix.png?fit=max&auto=format&n=y3xW6TraK0Q97XaD&q=85&s=56c00f0787b92cf8a4fa4c1ceb613b3b" style={{ borderRadius: '0.5rem' }} width="317" height="214" data-path="images/issue_fixes/auto_fix_web_download_fix.png" />
          </Frame>

    * **Option 2**: Corgea IDE Extensions

      Corgea supports applying fixes locally using our IDE extensions. Corgea supports [Visual Studio Code](vsc_extension) and [Visual Studio 2022](vs2022_extension) IDE extensions.

          <Frame>
            <img src="https://mintcdn.com/corgea/mpJUc1GyXtnVYEyT/images/vsc_apply_fix.png?fit=max&auto=format&n=mpJUc1GyXtnVYEyT&q=85&s=e3d38dac7fec426b3f0f322d61c954c3" style={{ borderRadius: '0.5rem' }} width="830" height="580" data-path="images/vsc_apply_fix.png" />
          </Frame>

      In Visual Studio Code, click a vulnerability in the sidebar to open issue details, review the suggested fix, then click `Apply Fix` and save the updated files.
  </Step>

  <Step title="Optionally: Vote on the fix">
    If the fix is good or bad, please leave a vote, and ideally a comment. We review your feedback and use it to make Corgea better, so we greatly appreciate them.

    <Frame>
      <img src="https://mintcdn.com/corgea/y3xW6TraK0Q97XaD/images/issue_fixes/auto_fix_web_give_feedback_button.png?fit=max&auto=format&n=y3xW6TraK0Q97XaD&q=85&s=521a2856483316fddf485e1ddb79db58" style={{ borderRadius: '0.5rem' }} width="362" height="139" data-path="images/issue_fixes/auto_fix_web_give_feedback_button.png" />
    </Frame>

    Click `Give Feedback` to open the feedback modal. In the modal, you can select a thumbs up or thumbs down, add an optional comment, and click `Submit`.

    <Frame>
      <img src="https://mintcdn.com/corgea/y3xW6TraK0Q97XaD/images/issue_fixes/auto_fix_web_provide_feedback_modal.png?fit=max&auto=format&n=y3xW6TraK0Q97XaD&q=85&s=252817d34f34f99dbf8912c340a38081" style={{ borderRadius: '0.5rem' }} width="502" height="343" data-path="images/issue_fixes/auto_fix_web_provide_feedback_modal.png" />
    </Frame>
  </Step>
</Steps>

## Troubleshooting

<AccordionGroup>
  <Accordion title="No Fix Generated">
    It might several minutes to hours for fix to be generated based on the backlog of other fixes that you sent.
  </Accordion>

  <Accordion title="I don't like the fix generated">
    Please leave a vote using the thumbs up and down icons, and ideally a comment. We review your feedback and use it to make Corgea better, so we greatly appreciate them.

    <Frame>
      <img src="https://mintcdn.com/corgea/y3xW6TraK0Q97XaD/images/issue_fixes/auto_fix_web_provide_feedback_modal.png?fit=max&auto=format&n=y3xW6TraK0Q97XaD&q=85&s=252817d34f34f99dbf8912c340a38081" style={{ borderRadius: '0.5rem' }} width="502" height="343" data-path="images/issue_fixes/auto_fix_web_provide_feedback_modal.png" />
    </Frame>
  </Accordion>
</AccordionGroup>
