> 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).

# ライブ秘密情報検出

ライブシークレット検出機能では、公開されたシークレットがまだ有効かどうかを確認し、その潜在的なリスクを評価します。結果に基づいて、問題の重大度は上がるか下がります。

## 使用例 <a href="#use-cases" id="use-cases"></a>

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

## ライブシークレット検出の仕組み <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 Token、SendGrid トークンなど）。確認してほしいシークレットがあれば、お問い合わせください。

## シークレット検出における誤検知

テストファイル、モックデータ、サンプル設定を除外することで誤検知を最小限に抑えるよう努めていますが、一部の本物らしく見えるシークレットが誤ってフラグ付けされることがあります。これは、特定のパターンをプログラムで判別することが不可能だからです。

### よくある誤検知の例

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

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

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

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

**テスト環境のシークレット** 本番環境のパターンに一致するものの、実際のセキュリティリスクを伴わない、テスト環境専用のシークレット。

### できること

誤検知に遭遇した場合:

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.
