> 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/scanning-practices/live-secret-detection.md).

# ライブシークレット検出

当社の Live Secret Detection 機能は、露出したシークレットがまだ有効かどうかを確認し、潜在的なリスクを評価します。結果に応じて、問題の重大度は上がるか下がります。

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

* コードリポジトリ内の有効なシークレットを識別し、フラグ付けします。
* もはや有効ではないシークレット（例：すでにローテーション済み）のノイズを減らします。
* 露出したシークレットに付与されている権限の範囲を確認します。
* 危険なシークレットに即時対応のマークを付けることで、セキュリティを強化します。

## Live Secret Detection の仕組み <a href="#how-live-secret-detection-works" id="how-live-secret-detection-works"></a>

**識別と検証**

Aikido は、露出したシークレットを安全なエンドポイントに送信して、まだ有効かどうかを確認します。その結果、ログに Aikido からの IP が表示される場合があります。以下は Aikido の IP 一覧です。

* **52.214.244.18**
* **18.202.209.180**
* **52.50.198.227**
* **52.51.98.186**

**権限を確認**

Aikido はさらに一歩進んで、有効なシークレットの権限を確認します。それに基づいて、重大度の引き上げにおいて追加の区別を行います。確認する項目は以下のとおりです。

* **期限切れのシークレット**
* **読み取り専用スコープ**
* **書き込み/削除スコープ**

> プロバイダーごとに異なるチェックを行います（例：GitHub Access Tokens、Sendgrid tokens など）。確認したいシークレットがあればお問い合わせください。

## Secrets Detection における誤検知

テストファイル、モックデータ、サンプル設定を除外することで誤検知の最小化に努めていますが、見た目が正当なシークレットでも誤ってフラグ付けされることがあります。これは、特定のパターンをプログラムで区別することが不可能だからです。

### よくある誤検知のシナリオ

**ドキュメントやコメント内のサンプルシークレット** 開発者がコードコメントやドキュメントに、実際のシークレットとまったく同じパターンに一致するサンプル API キーを含めることがあります。

* 実際のシークレット: `SENDGRID_API_KEY = “SG.actualR3alK3y_1234567890abcdef”`
* サンプルシークレット: `SENDGRID_API_KEY = “SG.exampleK3y_1234567890abcdef”`

どちらも同じ形式であり、検証なしにどちらが本物かをパターン認識だけで判断することはできません。

**無効化済みまたはローテーション済みのシークレット** Live Secret Detection は、シークレットがまだ有効かどうかを確認することでこれらを減らすのに役立ちますが、検証ができない例外的なケースもあります。

**テスト環境のシークレット** テスト環境専用に使用され、実運用のパターンに一致するものの、実際のセキュリティリスクはないシークレット。

### できること

誤検知に遭遇した場合:

1. コンテキストを確認する - これはテストファイル、ドキュメント、またはサンプルコード内ですか？
2. 関連する API またはその他の方法を使用して、シークレットが有効かどうかを確認する
3. 誤検知だと確認できた場合は、今後のアラートを防ぐために問題を無視できます

できます [UI で問題を無視する](/docs/docs-ja/hajimeni/core-functionalities/ignore-issues-to-remove-issues-from-main-feed.md) または [コードコメントを使用してシークレットを無視する](/docs/docs-ja/kdosukyan/scanning-practices/ignoring-secrets-via-code-comments.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/kdosukyan/scanning-practices/live-secret-detection.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.
