> 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/kdosukyan/connect-your-source-code/connect-gitlab-account-to-aikido/code-scanning-with-a-service-account-access-token.md).

# Service Account Access Tokenを使ったコードスキャン

### ⚠️ 免責事項

このガイドは以下の対象者のみご利用いただけます: **Gitlab Premium と** **Gitlab Ultimate** ユーザー。セットアップ方法をご確認ください: [パーソナルアクセストークン](/docs/docs-ja/kdosukyan/connect-your-source-code/connect-gitlab-account-to-aikido/code-scanning-with-a-personal-access-token.md) 〜用の **Gitlab Free** ユーザー

### はじめに

Aikido がコードスキャンの実行に使用するサービスアカウントトークンを使用できます。このトークンは、 [ワークスペースのアクセストークンを更新](https://app.aikido.dev/onboarding/gitlab/update-workspace-access-token) ページ。

### サービスアカウントとアクセストークンの作成 <a href="#creating-a-personal-access-token" id="creating-a-personal-access-token"></a>

1. 「Service Accounts」設定ページに移動します。Group > Settings > Service accounts

   <figure><img src="/files/fa82b709986507a28bf908b95df1f07cb7937f2e" alt="Gitlab group sidebar: highlighting &#x22;Service accounts&#x22; under the &#x22;Settings&#x22; option"><figcaption></figcaption></figure>
2. 「**service account を追加**"
3. ～を付与する **名前** および **ユーザー名** サービスアカウントに付与して、クリックします **作成**
4. 新しく作成したサービスアカウントのオプションをクリックし、次を選択します: **アクセス トークンを管理**

   <figure><img src="/files/eb4559c5491f4fb6c41928141f6c94113c18aa9d" alt="Gitlab Service Accounts overview"><figcaption></figcaption></figure>
5. 「**新しいトークンを追加**"
6. トークン名を入力し、有効期限を削除するか最大値に設定して、次を選択します: **api** スコープ

   <figure><img src="/files/98cb55402e70d00254350aa39fad668acedb2a21" alt=""><figcaption></figcaption></figure>
7. 「**トークンを作成**"

   <figure><img src="/files/43ee62fd3575791b768b8dbdf437b43b48851f67" alt=""><figcaption></figcaption></figure>
8. トークンをコピーし、「[ワークスペースのアクセストークンを更新](https://app.aikido.dev/onboarding/gitlab/update-workspace-access-token)」ページ用に保管してください
9. メンバーのページへ移動します: **グループ** > **管理** > **メンバー**

   <figure><img src="/files/cd001dce0d5bf48869bdb3b65ac51975dab2e4ae" alt="Gitlab Group sidebar; showing members under the manage option"><figcaption></figcaption></figure>
10. クリック「**メンバーを招待**"
11. 先ほど作成した新しいサービスアカウントを検索し、ロールを「**Maintainer**"

    <figure><img src="/files/751064887f9dcf911f972244f0521da56564d849" alt=""><figcaption></figcaption></figure>


---

# 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/kdosukyan/connect-your-source-code/connect-gitlab-account-to-aikido/code-scanning-with-a-service-account-access-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.
