> 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/kontenaimjisukyan/configuration/link-containers-to-code-repositories-via-kubernetes-annotations.md).

# Kubernetes アノテーションを使ってコンテナをコードリポジトリにリンクする

{% hint style="info" %}
この機能は現在、機能フラグの背後にあります。有効化するには Aikido に連絡してください。
{% endhint %}

コンテナをコードリポジトリにリンクすると、関連する脆弱性を1か所にまとめて管理できます。これは、多数のリポジトリやイメージを管理している場合に便利です。

Aikido は、Kubernetes ワークロード上の特定のラベルまたはアノテーションを読み取ることで、コンテナを自動的にリンクできます。

#### 標準アノテーション

キーを使用して、Kubernetes ワークロードにこのラベルまたはアノテーションを追加してください `aikido.dev/repository`。値には、たとえばご自身のリポジトリの URL を設定します:

```
aikido.dev/repository: 
https://github.com/AikidoSec/demo-app-1
```

{% hint style="info" %}
同じワークロードにこのキーのラベルとアノテーションの両方が設定されている場合は、アノテーションの値が使用されます。
{% endhint %}

#### カスタムアノテーション

組織にすでに独自の規則がある場合は、たとえば `repo-url`、Aikido がそのキーを標準のキーにマッピングできます。そのため、ワークロードのマニフェストを変更する必要はありません。

{% hint style="info" %}
カスタムのアノテーションキーを使用するには、Aikido サポートに連絡して、アカウント用にマッピングしてもらってください。
{% endhint %}

#### 仕組み

* Aikido は、Kubernetes ワークロードから関連するラベルまたはアノテーション（標準キー、またはマッピングされたカスタムキー）を読み取ります。
* Aikido はこのタグを使用して、コンテナを対応するコードリポジトリに自動的にリンクします。
* コンテナがすでにリポジトリにリンクされている場合、これはそれを上書きしません。


---

# 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/kontenaimjisukyan/configuration/link-containers-to-code-repositories-via-kubernetes-annotations.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.
