> 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-personal-access-token.md).

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

### ⚠️ 免責事項

SCAでは、 **GitLab Premium と GitLab Ultimate** 私たちが使用を推奨するユーザー [GitLab Service Accounts](/docs/docs-ja/pr-torirsunogtingu/gitlab-mr-gating/gitlab-server-ci-mr-gating-via-aikido-dashboard-with-a-service-account-token.md)。この方法を使う場合は、AikidoSec という名前の統合ユーザーを必ず設定してください。

### はじめに

個人アクセストークンまたはグループトークンのどちらも使用できます（GitLab Premium が必要です）。Aikido はこれらを使用してコードスキャンを実行します。このトークンは 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>

GitLab Cloud は複数の異なる個人アクセストークンをサポートしており、いずれも同じように機能します。通常はグループ PAT の作成を推奨していますが、GitLab Cloud ではこれはプレミアム顧客のみ可能です。

1. 次へ移動し、 **トークン設定ページ**
   1. グループアクセストークンの場合 **グループアクセストークン**: グループページ > 設定 > アクセストークンへ移動します<br>

      <figure><img src="/files/879263a67a419e9f1eefe4ef3e005f15fc92b000" alt=""><figcaption></figcaption></figure>
   2. グループアクセストークンの場合 **個人アクセストークン**: プロフィールページ > ユーザー設定 > アクセストークンへ移動します
2. 「**新しいトークンを追加**"
3. トークンの名前を入力し、期限を削除して、次を選択してください **read\_api、read\_user、read\_repository** スコープ<br>

   <figure><img src="/files/98cb55402e70d00254350aa39fad668acedb2a21" alt=""><figcaption></figcaption></figure>
4. 「**トークンを作成**"
5. トークンをコピーし、Aikido のアクセス トークン更新ページの入力欄に入力します<br>

   <figure><img src="/files/43ee62fd3575791b768b8dbdf437b43b48851f67" 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-personal-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.
