> 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. 「**サービスアカウントを追加**"
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.
