> 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-torirsugtingu/gitlab-mr-gating/gitlab-server-ci-mr-gating-via-aikido-dashboard-with-a-service-account-token.md).

# GitLab Premium、Ultimate、Server: MRスキャン設定

Aikidoからの問題について、MRのスキャン結果とコメントを公開します。パイプラインコードは不要です。

{% hint style="warning" %}
この設定は次の用途向けです **GitLab Premium、GitLab Ultimate、または GitLab Server**.

これらのプランではサービスアカウントを利用できます。MR スキャンを実行する推奨方法です。

もし **GitLab Free**をご利用の場合は、 [**ユーザーベースの設定**](/docs/docs-ja/pr-torirsugtingu/gitlab-mr-gating/gitlab-free-mr-scans-setup.md) を代わりに。
{% endhint %}

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

{% stepper %}
{% step %}
**専用のサービスアカウントを作成する**

GitLab で、次へ移動します **グループ** → **設定** → **サービスアカウント**.

選択します **サービスアカウントを追加**.

設定します **トークンの** と **ユーザー名**:

* 名前: `Aikido Security`
* ユーザー名: `AikidoSec`
* 選択します **作成**.

このアカウントは Aikido 専用にしてください。

<div data-with-frame="true"><figure><img src="https://715870456-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fgit-blob-51fea14179491fa5c6d20edb148dab2bedab57ee%2FScreenshot%202026-03-02%20at%2016.36.22.png?alt=media" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**アクセス トークンを作成する**

サービスアカウントで、縦三点リーダー → を選択します **アクセス トークンを管理**.

<div data-with-frame="true"><figure><img src="https://715870456-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fgit-blob-d9b924db9a81347e068bf96e57137ef354285030%2Fimage.png?alt=media" alt="GitLab Service Accounts overview"><figcaption></figcaption></figure></div>

新しいトークンを追加:

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

<div data-with-frame="true"><figure><img src="https://715870456-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fgit-blob-56519efe89f108bb6956c72f13c70336630ecc78%2FScreenshot%202026-03-02%20at%2013.56.26.png?alt=media" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

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

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

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

<div data-with-frame="true"><figure><img src="https://715870456-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fgit-blob-a2d8d9e3d350207e3a813133cfcc8474971bdf45%2FScreenshot%202026-03-02%20at%2013.58.27.png?alt=media" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**アカウントをグループに招待する**

移動して **グループ** GitLab で。

有効にしたい各グループを開きます。

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

サービスアカウントを招待します。

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

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

<div data-with-frame="true"><figure><img src="https://715870456-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fgit-blob-c35caac600cfc32332daa878b30f77c27c573a3d%2FScreenshot%202026-03-02%20at%2016.16.56.png?alt=media" 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="https://715870456-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fgit-blob-64c8b67d18466ff94b5a629a760a8c3125689a9d%2FScreenshot%202026-03-02%20at%2015.11.44.png?alt=media" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**アクセス トークンを貼り付ける**

手順 3 で作成したトークンを貼り付けます。

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

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

<div data-with-frame="true"><figure><img src="https://715870456-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fgit-blob-3f1c76782c61b3fad343be2f35571435563dc3d5%2FScreenshot%202026-03-02%20at%2015.02.03.png?alt=media" 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="https://715870456-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fgit-blob-4ebb8e939094cacb54ef2a025b41f8790882b46e%2FScreenshot%202026-03-02%20at%2015.17.32.png?alt=media" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

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

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

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

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

コメントはサービスアカウントとして表示されるはずです。たとえば、 `@AikidoSec`.

<div data-with-frame="true"><figure><img src="https://715870456-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fgit-blob-b93504f36ded78794326be2c72ad675e256aa439%2FScreenshot%202026-03-02%20at%2016.22.11.png?alt=media" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

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

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

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

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

<div data-with-frame="true"><figure><img src="https://715870456-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fgit-blob-c7a21923d205813b58496d7adf5e0929c38d71b5%2FScreenshot%202026-03-02%20at%2015.57.29.png?alt=media" 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="https://715870456-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fgit-blob-93adec5ff3627aaaf0030cd8ff160ffa3f594305%2FScreenshot%202026-03-02%20at%2015.36.19.png?alt=media" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

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

右上で `アクション` をクリックし、 `新しいリポジトリに対して既定に設定` また、今後追加されるリポジトリに対して自動構成を有効にします。

UI の手順が必要ですか？こちらをご覧ください [新しいリポジトリ向けのデフォルト PR/MR ゲーティング設定](/docs/docs-ja/pr-torirsugtingu/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 からその問題を直接無視できます:

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

例：

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

置き換えてください `@AikidoSec` を、手順 1 で作成したサービスアカウントのユーザー名に置き換えてください。異なる場合はその名前を使用します。

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

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

{% hint style="info" %}
無視権限がない場合、このコメントは次の場所にリクエストを作成します： [承認受信箱](/docs/docs-ja/hajimeni/core-functionalities/approval-inbox-for-ignored-issues.md) 問題をすぐに無視する代わりに。承認者が承認または却下するまで、検出結果はフィードに残ります。
{% 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-torirsugtingu/gitlab-mr-gating/gitlab-server-ci-mr-gating-via-aikido-dashboard-with-a-service-account-token.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.
