> 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/local-code-scanning/windows-setup-for-local-code-scanning.md).

# ローカルコードスキャン用のWindows設定

**目次：**

* [Local Scanning の設定方法](#how-to-set-up-local-scanning)
  * [1. 認証トークンを取得する](#1-get-your-authentication-token)
  * [2. プロジェクトに Local Scanner を追加する](#2-adding-the-local-scanner-to-your-project)
  * [3. Local Scanner を実行する](#3-running-the-local-scanner)
  * [4. スキャン結果を確認する](#4-check-your-scanning-results)

## ローカルコードスキャンのための Windows セットアップ

Aikido Security Local Scanner は、Aikido Security のスキャンをお使いの環境内で実行できるツールで、コードが外部に出ることはありません。スキャンはローカルで行われ、その結果は Aikido Security プラットフォームにアップロードされます。このセットアップにより、任意のリポジトリを自分のマシン上でローカルにスキャンできます。

### Local Scanning の設定方法 <a href="#how-to-set-up-local-scanning" id="how-to-set-up-local-scanning"></a>

**前提条件**：Local Scanning を利用できるアカウントが作成済みであることを確認してください。 [Local Scanning アカウントの作成に関する詳細情報](https://help.aikido.dev/en/articles/9070345-how-to-create-an-account-for-local-scanning-on-aikido).

#### 1. 認証トークンを取得する <a href="#id-1-get-your-authentication-token" id="id-1-get-your-authentication-token"></a>

1. へ移動してください [Local Scanner の設定ページ](https://app.aikido.dev/settings/integrations/localscan).
2. 認証トークンを生成してコピーします。このトークンは 1 回しか表示できないので注意してください。
3. このトークンを引数として追加します `--apikey` プロジェクトで Local Scanner を実行する際に。

#### 2. プロジェクトに Local Scanner を追加する <a href="#id-2-adding-the-local-scanner-to-your-project" id="id-2-adding-the-local-scanner-to-your-project"></a>

Aikido UI からローカルスキャナーのバイナリをダウンロードします。

#### 3. Local Scanner を実行する <a href="#id-3-running-the-local-scanner" id="id-3-running-the-local-scanner"></a>

あとはコンテナを起動してリポジトリをスキャンするだけです。リポジトリのルートに移動し、次のコマンドを実行してください。キー、リポジトリ名、ブランチ名を入力してください。

```shellscript
aikido-local-scanner.exe scan . --apikey AIK_CI_xxx --repositoryname DemoApp --branchname main
```

代わりに、私たちの [Dockerイメージ](https://hub.docker.com/r/aikidosecurity/local-scanner) リポジトリをスキャンするために。次のものがあることを確認してください。 [Docker がインストールされている](https://docs.docker.com/desktop/) に進む前に。スキャンしたいディレクトリに移動し、次のようなコマンドでスキャンを実行してください。

コマンドプロンプトを使用している場合:

```shellscript
docker run --rm -v "%cd%:/my-app" aikidosecurity/local-scanner scan /my-app --apikey AIK_CI_xxx --repositoryname RepoName --branchname main
```

PowerShell を使用している場合:

```shellscript
docker run --rm -v "${PWD}:/my-app" aikidosecurity/local-scanner scan /my-app --apikey AIK_CI_xxx --repositoryname RepoName --branchname main
```

デフォルトではすべてのスキャナーが実行されます。特定のスキャナーだけを実行したい場合は、スキャナー名を指定することで可能です `--scanners` オプションです。CLI オプションの詳細は以下で確認できます。 [こちら](https://help.aikido.dev/en/articles/9027526-local-scanner-cli-options).

#### 4. スキャン結果を確認する <a href="#id-4-check-your-scanning-results" id="id-4-check-your-scanning-results"></a>

最初のスキャンが完了したら、Aikido Feed で結果を確認できます。指定した名前のリポジトリが作成され、スキャン結果のすべてが含まれています。


---

# 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/local-code-scanning/windows-setup-for-local-code-scanning.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.
