> 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 フィルター** を開き、\[管理] をクリックします

<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`

適さない候補：

* `トークン`
* `シークレット`
* `認証`

### 代替の抑制方法

Secret Keyword Filter を使うのは **繰り返し発生する、ワークスペース全体に及ぶ誤検知**.

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

使用 [.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.
