> 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/dast-sfesu/api-scanning/rest-api-scanning.md).

# REST API と Web アプリのスキャン

{% hint style="warning" %}
**Agentic Scan は、REST API と Web アプリをテストするための推奨オプションです。** REST スキャナーと同じ OWASP リスク（SQL インジェクション、パストラバーサル、シェルインジェクション）に加え、ファジングでは見つけられないビジネスロジックの欠陥、IDOR、クロステナントのデータ漏えいも対象です。詳しくは [Aikido Pentest](/docs/docs-ja/penetosuto/aikido-pentest.md).
{% endhint %}

Aikido は、REST API と Web アプリのエンドポイントをスキャンして、SQL インジェクションやパストラバーサルなどの重大なエンドポイント脆弱性を発見できます。Aikido は API ファジングを使用しており、これは実質的に API の各フィールドに危険なペイロードを大量に送信することを含みます。

{% hint style="danger" %}
本番環境では絶対に実行しないでください。潜在的なダウンタイムを避けるため、必ずステージングで実行してください
{% endhint %}

### 主なユースケース <a href="#main-use-cases" id="main-use-cases"></a>

**重大な脆弱性の検出**:

* SQL インジェクション
* NoSQL インジェクション
* パストラバーサル
* シェルインジェクション

すべてのチェックは [こちらのAikidoアプリで確認できます](https://app.aikido.dev/domains/checks?scanner=rest).

### REST API スキャンの設定 <a href="#setting-up-rest-api-scanning" id="setting-up-rest-api-scanning"></a>

**ステップ 1:** をクリック **ドメインを追加** の [ドメイン概要](https://app.aikido.dev/domains)、展開して **Advanced** スキャンタイプ選択メニューで **REST API**

![詳細セクションが展開され、REST APIとGraphQLのオプションが表示されているスキャンタイプ選択モーダル。](/files/6ca4eb8c65aaeeb20f08098f7b4d644c350cd53e)

**ステップ 2.** 以下のドメイン名を入力してください **ステージング環境の**。これが REST API のベース URL であることを確認してください（例： `https://example.io/api`)

![アプリケーション設定用の API ドメイン名入力欄。](/files/5da490366e0b3d5191f12793ba8d28c54f285745)

**ステップ 3:** 以下のいずれかの方法で OpenAPI 仕様を追加してください：

* [**Zen App に接続（推奨）**](/docs/docs-ja/zen-firewall/getting-started-with-zen-firewall.md)：Zen と連携して API エンドポイントを自動的に検出・更新し、継続的なスキャンを行えます。Zen の詳細 [はこちらで確認できます](https://help.aikido.dev/section/zen-by-aikido/sgIt4HRxlrFr)。手作業やメンテナンスは不要です！
* [**Aikido AI で生成（ベータ版）**](/docs/docs-ja/dast-sfesu/api-scanning/autogenerate-openapi-via-aikido-ai-code2swagger.md)**:** コードベースを使用して、Aikido が OpenAPI 仕様を生成します。手作業は不要です。定期的な再スキャンで、常に最新の状態を保てます。
* **URL から取得：** OpenAPI 仕様の最新バージョンがある URL を指定してください。Aikido は各スキャンの前に仕様を取得します。
* **手動アップロード**：OpenAPI ファイルをアップロードして API エンドポイントを定義します。新しい API エンドポイントが追加または変更されるたびに、仕様を手動で更新してアップロードする必要があります。

![セキュリティリスクをスキャンするために OpenAPI 仕様を追加またはアップロードしてください。ステージング環境での使用のみ。](/files/79f8c01d8786280851472b2d378845dfa25aec9a)

**ステップ 4:** Aikido がログインを必要とするエンドポイントにアクセスできるよう、API に認証情報を追加してください。これを行うには、ドメインの三点メニューをクリックし、次に「**ドメインを認証**'

![オプション付きのドメイン操作メニュー：スキャン開始、編集、認証、ドメインの削除。](/files/617f7757c32c747f24a5bda0223c1c0368df9526)

すると認証の詳細を入力できるモーダルが表示されます。対応している認証方法の全一覧は、を参照してください [REST/GraphQLの認証済みAPIスキャン](/docs/docs-ja/dast-sfesu/api-scanning/authenticated-api-scanning-for-rest-graphql.md).

![API URL、メールアドレス、パスワードの入力欄があるドメイン認証設定フォーム。](/files/9717cdffdf9e148e1515a86729a1cc2fdb5a648c)

### Aikidoトラフィックの識別

AikidoのRESTおよびGraphQLスキャンから送信されるすべてのリクエストには、以下が含まれます：

* この `User-Agent` に設定 `aikido-scan-agent/1.0`
* 次のヘッダー `aikido-api-test` 値として設定され `1` リクエスト内で
* [ここに記載されているIPから送信されます](/docs/docs-ja/dast-sfesu/miscellaneous/allowing-ip-addresses-for-dast-surface-monitoring.md)


---

# 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/dast-sfesu/api-scanning/rest-api-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.
