> 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/denoise-via-secret-keyword-filter.md).

# シークレットキーワードフィルターによるノイズ除去

Secret Keyword Filter はシークレットスキャンのノイズを減らします。gitleaks が評価する前に、既知の安全なキーワードを含む行をワークスペース管理者がスキップできるようにします。

{% hint style="warning" %}
このフィルターは **行全体** をシークレットスキャンから除外します。慎重に使用してください。広範すぎるキーワードは、該当行上の実際のシークレットを隠してしまう可能性があります。
{% endhint %}

### ユースケース

Secret Keyword Filter を使うのは次のような場合です：

* 同じ誤検知が多数のファイルまたはリポジトリで発生する
* トリガーが、設定キーや変数名のような安定した文字列である
* 行ごとのコメントではなく、ワークスペース全体の設定にしたい

使用する **しません** 一般的な allowlist の代替として。gitleaks の allowlist を補完します。それらの代わりにはなりません。

### Secret Keyword Filter の追加方法

**ステップ 1.** 次へ移動 **設定** → **Advanced** → **Secret Keyword Filter** を開き、Manage をクリックします

<figure><img src="/files/16cd452e9640cf2f6e4a5228ea39d749fd4a85f3" alt=""><figcaption></figcaption></figure>

**ステップ 2. キーワードを追加する** を入力欄に入力します。複数追加できます。<br>

<figure><img src="/files/f672c881a5d93d25330553ce9d4e1c57bf35dd0e" alt=""><figcaption></figcaption></figure>

**ステップ 3. 保存してスキャンを実行し、変更を適用します**

### 重要な注意事項

* **最低 5 文字：** それより短いキーワードは拒否されます
* **大文字・小文字を区別：** `MySecret` および `mysecret` は別のキーワードです
* **次回のスキャンのみ：** 保存した変更は次回以降のスキャンにのみ適用されます

### マッチの仕組み

このフィルターは **単純な文字列一致**を使用します。これは **しません** 正規表現フィルターではありません。

設定されたキーワードが行のどこかに現れると、その行全体がシークレット検出から除外されます。

例：

```javascript
const EXAMPLE_TOKEN = process.env.EXAMPLE_TOKEN;
const apiKey = "sk_live_123456";
```

もし `EXAMPLE_TOKEN` がキーワード一覧にある場合、1 行目はスキップされます。2 行目は引き続きスキャンされます。

1 行目に実際のシークレットも含まれていた場合、そのシークレットもスキップされます。このフィルターはトークン単位ではなく行単位で動作します。

### ベストプラクティス

* 一般的な用語ではなく、具体的なキーワードを使う
* 設定キーや変数名のような安定した識別子を優先する
* 必要に応じて複数の表記ゆれを追加する
* 保存する前に一致箇所を慎重に確認する
* 変更後は再スキャンして、実際の問題を隠さずにノイズが減ったことを確認する

適した候補：

* `EXAMPLE_SENDGRID_KEY`
* `dummyStripeSecret`
* `integration_test_token`

不適な候補：

* `token`
* `secret`
* `auth`

### 代替の抑制方法

Secret Keyword Filter は次のような場合に使用します **ワークスペース全体にわたる繰り返し発生する誤検知**.

使用 [コードコメント](/docs/docs-ja/kdosukyan/scanning-practices/ignoring-secrets-via-code-comments.md) 次のような **単一の、既知の安全な行** をコード内で抑制したいとき。

使用 [.aikido ファイルの除外](/docs/docs-ja/kdosukyan/scanning-practices/ignore-via-code-with-aikido-files.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/denoise-via-secret-keyword-filter.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.
