> 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/penetorshontesuto/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/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.
