> 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/mashinsukyan/aws/managing-which-vms-are-scanned.md).

# スキャンする VM の管理

Aikidoでは、AWSタグを通じて、セキュリティスキャンに含める仮想マシン（VM）を正確に制御できます。これにより、特定のセキュリティ要件に基づいてスキャン範囲をカスタマイズできます。

### 利用可能なタグ

#### AIKIDO\_INCLUDE\_VM

このタグが、あるリージョン内の任意のVMに値 `true`、Aikidoは「オプトイン」スキャンモデルに切り替え、そこでは **この場合に限って** このタグの付いたVMは、そのリージョンでスキャンされます。

#### AIKIDO\_EXCLUDE\_VM

このタグが、あるVMに値 `true`、Aikidoは他のスキャン設定に関係なく、この特定のVMのスキャンをスキップします。

{% hint style="info" %}
**重要な注意事項**

* AIKIDO\_INCLUDE\_VMタグは、使用するとリージョン全体のスキャン動作を変更します
* 両方が適用されている場合は、AIKIDO\_EXCLUDE\_VMがAIKIDO\_INCLUDE\_VMより優先されます
* リージョンにAIKIDO\_INCLUDE\_VMタグが存在しない場合、AikidoはデフォルトですべてのVMをスキャンします（AIKIDO\_EXCLUDE\_VMが付いたものを除く）

これらのタグを活用することで、セキュリティ上の優先事項やリソース管理のニーズに合った、カスタマイズされたスキャン戦略を作成できます。
{% endhint %}

### ユースケース

#### 1. 本番環境のみをスキャンする

開発環境を無視し、本番ワークロードにセキュリティスキャンを集中させたい場合：

<pre><code><strong># すべての本番VMにタグを付ける
</strong>aws ec2 create-tags --resources i-1234567890abcdef0 i-0987654321fedcba0 --tags Key=AIKIDO_INCLUDE_VM,Value=true
</code></pre>

#### 2. 機密システムを除外する

機密データを含む、または特別な取り扱いが必要なVMの場合：

```
# 機密データベースサーバーを除外する
aws ec2 create-tags --resources i-db12345678901234 --tags Key=AIKIDO_EXCLUDE_VM,Value=true
```

#### 3. リージョン固有のスキャンポリシー

その `AIKIDO_INCLUDE_VM` タグはリージョン単位で適用されるため、リージョンごとに異なるスキャンポリシーを実装できます：

* us-east-1では：スキャン対象として重要なワークロードのみにタグを付ける
* us-west-2では：次のタグを使用しないことで、すべてのVMのスキャンを許可する `AIKIDO_INCLUDE_VM` タグ

### スキャン頻度 <a href="#scanning-frequency" id="scanning-frequency"></a>

毎日、スキャンが有効になっているすべてのVMの10%が再スキャンされるため、平均すると各VMは10日に1回スキャンされます。


---

# 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/mashinsukyan/aws/managing-which-vms-are-scanned.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.
