> 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/local-image-scanning/cli-options-for-local-image-scanning.md).

# ローカルイメージスキャンの CLI オプション

イメージスキャンのCLIオプション:

```
使い方: aikido-local-scanner image-scan [options] <image>

イメージスキャンを実行します。

引数:
  image                            スキャンしたいイメージ。

オプション:
  --apikey <apikey>                スキャン結果をAikdoに送信するためのAPIキー。（env: AIKIDO_API_KEY）
  --platform <platform>            プラットフォームを設定します（例: amd64システムでarm64イメージを取得するため）。
  --image-name <name>              スキャン対象イメージの名前を指定します。これにより、<image>引数からイメージ名を推測するデフォルトの動作が上書きされます。イメージ名が名前ではない場合に、説明的な名前を指定するために使用できます。
  --tag <tag>                      レポート目的で、スキャン対象イメージのタグを指定します。これにより、<image>または<image-name>引数からタグを推測するデフォルトの動作が上書きされます。
  --debug                          コマンド出力に追加のデバッグ情報を含めます。
  --fail-on <severity>             スキャナーをゲーティングモードで実行し、指定した重要度以上で失敗させます。（選択肢: "low", "medium", "high", "critical"）
  --gating-mode <mode>             スキャナーをリリースゲーティングモードで実行するか、PRゲーティングモードで実行するかを示します。リリースゲーティングモードではメインブランチをスキャンし、リリースを妨げる問題があるかどうかを確認します。プルリクエストモードでは、Aikidoはブランチで新たに導入された脆弱性のみを検索します。比較を機能させるには、baseコミットとheadコミットを指定する必要があります。--fail-onフラグと組み合わせて使用する必要があります。（選択肢: "release", "pr", デフォルト: "release"）
  --sla-mode                       リリースゲーティングモードでは、SLA超過の問題のみでゲートを失敗させます。
  --base-commit-id <commit-id>     BaseコミットID。Aikidoが新しい検出結果かどうかを判断するために比較するコミットです。PRゲーティングモードでのみ使用されます。
  --head-commit-id <commit-id>     HeadコミットID。スキャン対象のコミットです。PRゲーティングモードでのみ使用されます。
  --gating-result-output <output>  問題を書き出すJSONファイル（ゲーティングモード実行時のみ）
  --no-fail-on-timeout             スキャン結果のポーリングがタイムアウトしてもプロセスを失敗させません（リリースゲーティングモードのみ）
  --max-polling-attempts <amount>  スキャン結果をポーリングする回数。デフォルト値の20では足りない場合は増やしてください（リリースゲーティングモードのみ）
  --linked-team-name <name>        イメージを関連付けるチーム名。
  --force-create-image-for-tag     既存のイメージのタグを更新する代わりに、そのタグでAikidoに新しいイメージを作成します。
  --scan-timeout <timeout>         各スキャンのタイムアウト（ミリ秒）。既定値は900000msです。
  --output-cyclonedx-json <output> CycloneDX JSON SBOMを書き出すJSONファイル。
  --enable-proxy                   HTTPS_PROXY環境変数を使用してリクエストをプロキシします。
  --ca-bundle <path>               --enable-proxy使用時に信頼するカスタムルートCAを含むPEMファイルへのパス。（env: AIKIDO_CA_BUNDLE）
  --linked-repository-name <name>  イメージを関連付けるリポジトリ名。
  -h, --help                       コマンドのヘルプを表示します
```

リポジトリスキャンのCLIオプションについては、 [こちら](/docs/docs-ja/kdosukyan/local-code-scanning/cli-options-for-local-scanner.md).

## 一般的な使用例 <a href="#common-use-cases" id="common-use-cases"></a>

以下に、一般的な使用例の設定例をいくつか示します。<br>

**イメージスキャンを実行したい**

```shellscript
aikido-local-scanner image-scan my-image
--apikey AIK_CI_xxx 
```

**イメージスキャンを実行し、イメージを「Cloud Team」に関連付けたい**

```shellscript
aikido-local-scanner image-scan my-image
--apikey AIK_CI_xxx 
--linked-team-name "Cloud Team"
```

**リポジトリスキャンを実行し、リポジトリを「Dev Team 1」と「Dev Team 2」に関連付けたい**

```shellscript
aikido-local-scanner scan ./ 
--apikey AIK_CI_xxx 
--repositoryname DemoApp 
--branchname main 
--linked-team-name "Dev Team 1"
--linked-team-name "Dev Team 2"
```

**イメージスキャンを実行し、SBOMをJSONファイルに出力したい**

```shellscript
aikido-local-scanner image-scan my-image
--apikey AIK_CI_xxx 
--output-cyclonedx-json sbom.json
```


---

# 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/local-image-scanning/cli-options-for-local-image-scanning.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.
