> 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/autofix-to/configure/autofix-for-gitlab-self-managed.md).

# GitLab Self Managed向けAutoFix

## はじめに

Aikido AutoFix は、プロジェクト内のサードパーティ依存関係にある脆弱性を解決するために設計されたツールです。パッケージを更新したり、脆弱性を解消するための他の解決策を実装したりするプルリクエストを生成することで、これを実現します。状況によっては、Aikido AutoFix は単一の問題だけでなく、脆弱性の一カテゴリ全体に対処できます。

## GitLab Self Managed 用に Autofix を設定する

デフォルトでは、Aikido は GitLab Self Managed インスタンスに対して読み取り専用アクセスしか持っていません。Aikido AutoFix を使用するには、書き込みアクセス権を持つ別のアクセストークンが必要です。

**手順 1。** に書き込みアクセスを有効にし [AutoFix の設定](https://app.aikido.dev/settings/integrations/autofix) ページ。

**手順 2。** クリック **Authorize**すると、このモーダルが表示されます。

![](/files/1d82abe2e7d18d5b585b079eba0f38556ff07df0)

**手順 3。** Self Managed の GitLab アカウントに移動します。左上の個人アカウントアイコンをクリックし、設定に進みます。

![](/files/ba6e43859dc65e22189f84ead0c1187ec98aa615)

**手順 4。** サイドバーで「Access Token」を選択します。次に「Add new token」ボタンをクリックします

![](/files/542c534925f699cc951ff0b99781024fb140d971)

**ステップ 5。** トークン名を「Aikido Autofix」にして、次の権限を追加します： `api` & `write_repository`

![](/files/8b78706eac14ccd7bffe19069a84de0635d75b3a)

**ステップ 6。** 新しく作成したトークンをコピーし、Aikido のモーダルに貼り付けます。

![](/files/dd041813c6f921833da37d0b559f3a9beece7885)

![](/files/7d4cebc1e2c1cdc7fde22ed362ccdd1f20af4fb1)

**ステップ 7。** 保存をクリックすると完了です。これで、次の場所から autofix の PR を実行できるようになります： [Autofix ページ](https://app.aikido.dev/issues/fix) またはサイドバーのサブ issue のアクションメニューから。

## サービスアカウントを使用する

GitLab ユーザーの PAT で Autofix を設定した場合、AutoFix によって作成されたマージリクエストの作成者があなたになるため、混乱を招くことがあります。

GitLab Self Managed のプレミアムユーザーには、Aikido AutoFix 用にサービスアカウントを設定することを推奨します。これにより、どの PR が Aikido から来ているのかを簡単に確認できます。

**ステップ 1. サービスアカウントを設定する**

GitLab で、Group > `あなたのグループ` > Settings > Service accounts に移動して、サービスアカウントを設定します。

**ステップ 2. サービスアカウント用の PAT を作成する**

クリック `アクセス トークンを管理` GitLab のサービスアカウントページにある 3 つの点のメニューから新しいアクセストークンを作成します。次の権限を持つ PAT を作成します。 `api` および `write_repository` 権限。

**ステップ 3. サービスアカウントを GitLab グループのメンバーとして追加する**

GitLab で、Group > `あなたのグループ` > Manage > Members > Invite Members に進み、新しく作成したサービスアカウントを GitLab グループのメンバーとして追加します。

**ステップ 4. PAT を Aikido UI に貼り付ける**

GitLab から新しく作成したトークンをコピーし、Aikido のモーダルに貼り付けます。


---

# 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/autofix-to/configure/autofix-for-gitlab-self-managed.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.
