> For the complete documentation index, see [llms.txt](https://help.aikido.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.aikido.dev/pr-and-release-gating/aikido-ci-gating-functionality/autofix-suggestions-and-inline-commenting-for-pr-checks.md).

# AutoFix Suggestions and Inline Commenting for PR Checks

Aikido posts inline feedback on your pull requests, so you can resolve issues without leaving your review workflow.

PR Checks can comment on SAST, Secrets, IaC, open-source dependencies (SCA), Code Quality, and Deep Review findings.

Configure comments for each repository in the PR Check settings modal. When available, Aikido also provides AutoFix suggestions that let you apply the fixes directly from the pull request.

### Prerequisites <a href="#prerequisities" id="prerequisities"></a>

* Make sure to have your CI Checks enabled (via the Aikido Dashboard)
* You are an admin within Aikido

## Enabling Inline Commenting <a href="#enabling-inline-commenting" id="enabling-inline-commenting"></a>

**Step 1:** Go to the settings page via **Repositories > Pull/Merge Requests > Manage PR/MR Checks**

<div data-with-frame="true"><figure><img src="https://3149773201-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fgit-blob-54ce3c380a3e443d7d6a3b8d262f0bcf26f31f85%2FScreenshot%202026-01-14%20at%2017.37.08.png?alt=media" alt=""><figcaption></figcaption></figure></div>

**Step 2:** **Select the repo(s)** for which you want to enable it and click **Setup PR Scans**

**Step 3:** **Enable the toggle for&#x20;**<mark style="color:purple;">**Add comments**</mark>. Make sure at least SAST or Secrets scan is enabled.

<div data-with-frame="true"><figure><img src="https://3149773201-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fgit-blob-3faedf1b41c8508e02b037cb2f1e4de5879c4307%2FScreenshot%202026-03-04%20at%2011.50.00.png?alt=media" alt=""><figcaption></figcaption></figure></div>

**Step 4:** When a new issue is introduced (based on the scan failure severity), a new comment will be added in your SCM.

<div data-with-frame="true"><img src="https://3149773201-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fgit-blob-90f716535082dcceb5e48577dc7b6c4c1f3d80ba%2Fucarecdn-c879fc1f-6a0b-4142-ade4-9c6e0bc8f952.png?alt=media" alt="Security bot flags script from malicious domain, recommends its immediate removal from code." width="563"></div>

**Step 5.** When available, Aikido will make AutoFix suggestions. Review the diff and commit the suggestion to fix the newly introduced vulnerability all at once.

<div data-with-frame="true"><img src="https://3149773201-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fgit-blob-45c89e4bfcd11b9442b1849378751ce8f178e464%2Fautofix-suggestions-and-inline-commenting-for-pr-checks_d5405ee7-a7ec-4996-be54-b6e3577304ee.png?alt=media" alt="Suggested code change to add &#x22;drop_invalid_header_fields&#x22; to AWS ALB resource configuration." width="563"></div>

## What happens to comments after you fix an issue

When a later scan or review confirms that you fixed an issue, Aikido resolves the related inline comment.

{% hint style="info" %}

### GitHub permission exception

With [AutoFix](/autofix-and-remediation/overview-aikido-autofix.md) enabled, Aikido resolves the comment thread. It remains in GitHub as a resolved conversation, preserving the discussion history. GitHub requires **Contents** write permission for this, even when an app already has Pull requests write permission. [GitHub has confirmed this requirement publicly](https://github.com/github/gh-aw/issues/35726).

Without AutoFix, Aikido follows the principle of least privilege and doesn't request **Contents** write permission solely to resolve comments. GitHub then prevents Aikido from resolving the thread, so Aikido deletes the comment after confirming the issue is fixed.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.aikido.dev/pr-and-release-gating/aikido-ci-gating-functionality/autofix-suggestions-and-inline-commenting-for-pr-checks.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
