> 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 フィルター** を開き、\[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) 次のものを抑制したい場合 **既知の安全な 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.
