> 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.** をクリック **認証**すると、このモーダルが表示されます：

![](/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) または、サイドバーのサブ課題のアクションメニューから実行できます。

## サービスアカウントの使用

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

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

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

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

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

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

**ステップ 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.
