> 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/gitlab-mr-gating/gitlab-free-mr-scans-setup.md).

# GitLab Free: MR スキャンのセットアップ

{% hint style="warning" %}
このセットアップは、 **GitLab Free** Service Account が利用できず、代わりに専用ユーザーを使用するプラン向けです。

次のプランをお使いの場合は **GitLab Premium、GitLab Ultimate、または GitLab Server**の場合は、 [**サービスアカウント**](/docs/docs-ja/pr-torirsunogtingu/gitlab-mr-gating/gitlab-server-ci-mr-gating-via-aikido-dashboard-with-a-service-account-token.md) ユーザーベースのセットアップの代わりに使用します。
{% endhint %}

## GitLab MR スキャンを設定する

{% stepper %}
{% step %}
**専用の GitLab ユーザーを作成する**

次のような専用ユーザーを作成します： `AikidoSecurity[YourCompany]`。Aikido 専用にしてください。

見分けやすくするために、 [Aikido のロゴ](https://www.aikido.dev/press-kit) をプロフィール画像として使用してください。

<div data-with-frame="true"><figure><img src="/files/e140796ce286f9353ee7db400c5053cd4444ee0d" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**Personal Access Token を作成する**

新しいユーザーとしてログインします。

移動先 **設定** → [**個人用アクセストークン**](https://gitlab.com/-/user_settings/personal_access_tokens).

新しいトークンを追加：

* 名前：たとえば `Aikido Scans`
* 有効期限：ローテーションポリシーに合う期限を設定してください
* スコープ： `api`

<div data-with-frame="true"><figure><img src="/files/78541f18884a1b04445f46a6c397a54088aede95" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**トークンを保存する**

今すぐトークンをコピーしてください。GitLab では再表示されません。

手順 6 で Aikido に貼り付けます。

<div data-with-frame="true"><figure><img src="/files/6c297fa82d0cb22fb23b5cb4fae36ae00c5658df" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**Aikido ユーザーをグループに招待する**

自分の GitLab アカウントで再度ログインします。

移動先 [**グループ**](https://gitlab.com/dashboard/groups).

有効にしたい各グループについて、そのグループを開きます。

移動先 **管理** → **メンバー** → **メンバーを招待**.

専用の Aikido ユーザーを招待します。

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

少なくとも **Maintainer** 権限を付与してください。

<div data-with-frame="true"><figure><img src="/files/98367d7a73a7f229c8379d48ca6d0821bb59af52" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**統合を有効にする**

Aikido で、次を開きます： [連携](https://app.aikido.dev/settings/integrations?section=ci) ページ。その後、次を選択します： **GitLab CI** の下で **MR 品質ゲート**.

<div data-with-frame="true"><figure><img src="/files/72a86a1d9ee067a383da4812fd61913e2924d793" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**Personal Access Token を貼り付ける**

手順 3 で作成したトークンを貼り付けてください。

クリック **トークンを更新する**.

Aikido がグループアクセスと必要な権限を検証します。

<div data-with-frame="true"><figure><img src="/files/fc8b902bf3bf37efd9e29bccde48c9970165bc89" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**最初のリポジトリを設定する**

認可後、Aikido は次を開きます： [GitLab MR チェック](https://app.aikido.dev/settings/integrations/gitlab/checks) ページ。

まずは **1 つのリポジトリ** を最初に。広く展開する前に、すべてが正しく動作することを確認してください。

<div data-with-frame="true"><figure><img src="/files/07b16432ff7eca3146959ac011d74c629916786a" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**新しい MR で確認する**

設定したリポジトリで新しいマージリクエスト（MR）を開きます。

次に、チェックが実行されることを確認します **パイプライン** タブ。

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

コメントは専用ユーザーとして表示されるはずです。たとえば、 `@AikidoSecurity[YourCompany]`.

<div data-with-frame="true"><figure><img src="/files/2821423e4d747f9d79808cf86c8e888eab8ccc05" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**スキャンの成功を必須にする**

スキャンが成功するまでマージをブロックしたい場合は、次を設定します： **マージチェック** GitLab で。

GitLab で、次へ移動します **\[リポジトリ]** → **設定** → **マージリクエスト**。チェックを有効にする `パイプラインは成功しなければならない`.

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

<div data-with-frame="true"><figure><img src="/files/655ed7b0cbd40e9cc6409f85af7e6ec14107d5bb" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**すべてのリポジトリで有効にする**

結果に満足したら、次に戻ります： [GitLab MR チェック](https://app.aikido.dev/settings/integrations/gitlab/checks) ページで、残りのリポジトリのチェックを有効にします。

<div data-with-frame="true"><figure><img src="/files/b7e1f2e0c9287da9b6d41b36b2909365093d8f3b" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**新しいリポジトリの既定値を設定する**

右上の `アクション` をクリックして、次を選択します: `Set Default for New Repos` さらに、今後新しく追加されるリポジトリに対して自動構成を有効にします。

UI の手順が必要ですか？こちらを参照してください [新しいリポジトリの既定の PR/MR ガーティング設定](/docs/docs-ja/pr-torirsunogtingu/aikido-ci-gating-functionality/default-pr-mr-gating-configuration-for-new-repositories.md).
{% endstep %}
{% endstepper %}

## MR コメントから直接問題を無視する <a href="#ignore-issues-directly-from-mr-comments" id="ignore-issues-directly-from-mr-comments"></a>

Aikido が検出結果に対してインライン MR コメントを投稿した場合、コメントに次の内容で返信することで、GitLab からその問題を直接無視できます：

`@AikidoSecurity[YourCompany] ignore: [無視する理由]`

例:

`@AikidoSecurity[YourCompany] ignore: このシークレットはテスト専用です。`

置き換えてください `@AikidoSecurity[YourCompany]` ステップ 1 で作成した専用 GitLab ユーザーのユーザー名を使用します。

これは、Aikido プラットフォームで手動で問題を無視するのと同じ操作です:

* その問題は Aikido で無視済みとしてマークされます。
* 無視理由が保存されます。
* すべてのブロッキング問題が解決または無視されると、MR ゲートは緑になります。


---

# 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/gitlab-mr-gating/gitlab-free-mr-scans-setup.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.
