> 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/docs/docs-ja/pr-torirsunogtingu/aikido-ci-gating-functionality/autofix-suggestions-and-inline-commenting-for-pr-checks.md).

# PR チェックのための AutoFix 提案とインラインコメント

Aikido はプルリクエストにインラインでフィードバックを投稿するため、レビューのワークフローを離れずに問題を解決できます。

PR Checks は、SAST、Secrets、IaC、オープンソース依存関係（SCA）、コード品質、Deep Review の検出結果にコメントできます。

PR Check の設定モーダルで、リポジトリごとにコメントを設定してください。利用可能な場合、Aikido は AutoFix の提案も提供し、プルリクエストから直接修正を適用できます。

### 前提条件 <a href="#prerequisities" id="prerequisities"></a>

* CI Checks が有効になっていることを確認してください（Aikido ダッシュボード経由で）
* あなたは Aikido 内で管理者です

## インラインコメントを有効にする <a href="#enabling-inline-commenting" id="enabling-inline-commenting"></a>

**ステップ 1:** 次の経由で設定ページに移動してください **リポジトリ > Pull/Merge Requests > PR/MRチェックを管理**

<div data-with-frame="true"><figure><img src="/files/676bd66d4d118cc98fcdf307e6dcc29a889f748f" alt=""><figcaption></figcaption></figure></div>

**ステップ 2:** **対象のリポジトリを選択し** 有効にしたいものを選んでクリックします **PR スキャンの設定**

**ステップ 3:** **次のトグルを有効にする&#x20;**<mark style="color:紫;">**コメントを追加**</mark>。少なくとも SAST または Secrets スキャンが有効になっていることを確認してください。

<div data-with-frame="true"><figure><img src="/files/21253631b4435f73b3547771fac991b8d90897d9" alt=""><figcaption></figcaption></figure></div>

**ステップ 4:** 新しい問題が検出されると（スキャン失敗の重大度に基づいて）、SCM に新しいコメントが追加されます。

<div data-with-frame="true"><img src="/files/cb11f1df840a93b38de3417248fe523aede0bef5" alt="セキュリティボットが悪意のあるドメインからのスクリプトをフラグ付けし、コードから直ちに削除することを推奨します。" width="563"></div>

**ステップ 5.** 利用可能な場合、Aikido は AutoFix の提案を行います。差分を確認し、その提案をコミットして、新たに導入された脆弱性を一度に修正してください。

<div data-with-frame="true"><img src="/files/e75b596a1117e186318e19126e12dccc3e7d9f70" alt="AWS ALB リソース設定に「drop_invalid_header_fields」を追加するためのコード変更案。" width="563"></div>

## 問題を修正した後、コメントはどうなるか

後続のスキャンまたはレビューで問題が修正されたことが確認されると、Aikido は関連するインラインコメントを解決済みにします。

{% hint style="info" %}

### GitHub の権限例外

「 [AutoFix](/docs/docs-ja/autofix-to/overview-aikido-autofix.md) が有効になっている場合、Aikido はコメントスレッドを解決します。GitHub には解決済みの会話として残り、議論の履歴が保持されます。GitHub では **内容** これには書き込み権限が必要です。アプリにすでに Pull requests の書き込み権限がある場合でも同様です。 [GitHub はこの要件を公に確認しています](https://github.com/github/gh-aw/issues/35726).

AutoFix がない場合、Aikido は最小権限の原則に従い、 **内容** コメントを解決するためだけの書き込み権限は要求しません。そのため GitHub は Aikido がスレッドを解決することを妨げ、Aikido は問題が修正されたことを確認した後、コメントを削除します。
{% 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
