> 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/ignore-via-code-with-aikido-files.md).

# .aikidoファイルを使ってスキャンを構成する

次の `.aikido` .aikido ファイルを使うと、Aikido が特定のリポジトリをどのように処理するかを細かく調整できます。Aikido は各スキャン時に自動的にこれを読み取ります。

## デフォルトの動作とカスタマイズ

Aikido はすでに、関連性の低い多くのファイルやディレクトリをデフォルトで除外しています。ほとんどのリポジトリでは、追加の設定は不要です。

次を使用します `.aikido` リポジトリ固有の例外や動作が必要な場合に使用します。一般的なユースケースには、特定のパスの除外、理由付きで承認済みの CVE を無視すること、そのリポジトリ向けの AutoFix の動作にカスタムコンテキストを与えることが含まれます。

## .aikido ファイルの設定 <a href="#setting-up-the-aikido-file" id="setting-up-the-aikido-file"></a>

作成する `.aikido` ファイル **リポジトリのルート内に**.

<div data-with-frame="true"><img src="/files/3517c77e9e3f201040a643b05aec6a55594d3051" alt=".aikido 設定ファイルを含むプロジェクト ディレクトリ。" width="375"></div>

### 特定のパスまたはファイルを除外する <a href="#exclude-specific-paths" id="exclude-specific-paths"></a>

次の `exclude` キーと `paths` サブキーを使うと、Aikido のコードスキャンで特定のファイルやディレクトリがスキャン対象にならないようにできます。これにより自動的に **シークレット、SAST の問題、ロックファイル、コード品質のスキャンが除外されます。**

{% hint style="info" %}
**注意:** パスの一致判定は `.aikido` に基づいています **単純な文字列包含**.

設定した値が完全なファイルパスのどこかに現れれば、除外されます。\
ワイルドカードや正規表現は **サポートされていません**.
{% endhint %}

```yaml
exclude:
  paths:
    - src/useless-folder
    - docs/example.js
    - .gen.ts
```

### CVE を無視する <a href="#ignore-cves" id="ignore-cves"></a>

CVE を無視するには、 `.aikido` YAML ファイルに理由を添えて追加します。Aikido UI でも、これらの特定の CVE が無視されていることが、 `.aikido` ファイル。

```yaml
ignore:
  cves:
    CVE-2020-8203:
      reason: この CVE は気にしません
    CVE-2025-22869:
      reason: これは対応済みです
```

<div data-with-frame="true"><img src="/files/3a7d5eaefe78919710605b55b92bd143ee7b7aff" alt="高重大度の CVE が .aikido 設定ファイルで引き下げられました。" width="375"></div>

## 無視の代替方法 <a href="#excluding-sast-findings-using-comments" id="excluding-sast-findings-using-comments"></a>

**コードコメントで SAST を無視する**

無視することも可能です [コード内のコメントを使って SAST の検出結果を無視することができます](/docs/docs-ja/kdosukyan/scanning-practices/excluding-sast-findings-using-comments.md).

### その他の .aikido のユースケース

次の `.aikido` .aikido ファイルでは、リポジトリ固有の AutoFix 動作も設定できます。

これを使って、カスタムのブランチ接頭辞や、リポジトリ全体に対する単一の AutoFix PR などの設定を定義します。

参照: [AutoFix PR の設定](/docs/docs-ja/to/configure/autofix-pr-configuration.md) 対応している `AutoFix` 設定と例


---

# 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/ignore-via-code-with-aikido-files.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.
