> 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>                スキャン結果をAikidoに送信するためのAPIキー。(env: AIKIDO_API_KEY)
  --platform <platform>            プラットフォームを設定します（たとえば、amd64システム上でarm64イメージを取得する場合など）
  --image-name <name>              スキャンするイメージの名前を指定します。これにより、<image> 引数からイメージ名を推測する既定の動作が上書きされます。イメージ名が分かりやすくない場合に、説明的な名前を指定するために使用できます。
  --multi-arch <arch>              指定した各アーキテクチャごとに個別のスキャンを実行します（例: linux/amd64）。複数のアーキテクチャをスキャンするには、このオプションを複数回指定します。各アーキテクチャは一意のイメージ名（<image-name>-<arch>）で報告され、--output-cyclonedx-json と組み合わせた場合は、各アーキテクチャがそれぞれ独自のファイル（<name>-<arch>.json）に書き込まれます。gatingモードではサポートされず、--platform と組み合わせることもできません。
  --tag <tag>                      スキャンされたイメージのタグをレポート用に指定します。これにより、<image> または <image-name> 引数からタグを推測する既定の動作が上書きされます。
  --debug                          コマンド出力に追加のデバッグ情報を加えます。
  --fail-on <severity>             スキャナーをgatingモードで実行し、指定した重大度以上で失敗させます。(choices: "low", "medium", "high", "critical")
  --gating-mode <mode>             スキャナーをリリースゲーティングモードまたはPRゲーティングモードで実行するかを指定します。リリースゲーティングモードではメインブランチをスキャンし、リリースを妨げる可能性のある問題があるかを待ちます。プルリクエストモードでは、Aikido はブランチで新たに導入された脆弱性のみを探します。比較を機能させるには base と head のコミットを指定する必要があります。--fail-on フラグと組み合わせる必要があります。(choices: "release", "pr", default: "release")
  --sla-mode                       リリースゲーティングモードでは、SLA外の問題でのみゲートを失敗させます。
  --base-commit-id <commit-id>     Base commit id。これは、Aikido が新しい検出結果かどうかを判断するために比較するコミットです。PRゲーティングモードでのみ使用されます。
  --head-commit-id <commit-id>     Head commit id。スキャン対象のコミットです。PRゲーティングモードでのみ使用されます。
  --gating-result-output <output>  問題を書き込むJSONファイル（gatingモードで実行する場合のみ）
  --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ファイル。
  --scan-javascript-lockfiles.     イメージ内で見つかったロックファイル（例: package-lock.json, yarn.lock）から、インストール済みパッケージに加えてJavaScriptパッケージも検出します。
  --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 image-scan my-image 
--apikey AIK_CI_xxx 
--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
```

**1つのコマンドでレジストリイメージに対して複数アーキテクチャのイメージスキャンを実行したい。これにより、アーキテクチャごとの結果を持つ個別のイメージがフィードに作成されます。**

```shellscript
aikido-local-scanner image-scan my-image
--apikey AIK_CI_xxx 
--multi-arch linux/amd64
--multi-arch linux/arm64
```


---

# 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.
