# レポート作成コマンド

### 概要

本セクションでは、レポートおよび監査ログに関連する **Keeperコマンダー** (CLI) のコマンドをまとめます。BreachWatch、チーム、ユーザー、ノード、レコードなどを対象とした詳細レポートを取得できます。

CLI および SDK で利用できるコマンドは以下です。

* [アクションレポートコマンド](/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/reporting-commands/action-report-command.md)
* [監査レポートコマンド](/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/reporting-commands/audit-report-command.md)
* [ユーザーレポートコマンド](/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/reporting-commands/user-report-command.md)
* [セキュリティ監査レポートコマンド](/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/reporting-commands/security-audit-report-command.md)
* [BreachWatchレポートコマンド](/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/reporting-commands/breach-watch-report-command.md)
* [共有レポートコマンド](/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/reporting-commands/share-report-command.md)
* [共有レコードレポートコマンド](/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/reporting-commands/shared-records-report-command.md)
* [MSPレガシーレポートコマンド](/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/reporting-commands/msp-legacy-report-command.md)
* [外部共有レポートコマンド](/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/reporting-commands/external-shares-report-command.md)
* [監査ログレポートコマンド](/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/reporting-commands/audit-log-report-command.md)
* [エイジングレポートコマンド](/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/reporting-commands/aging-report-command.md)
* [リスク管理レポートコマンド](/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/reporting-commands/risk-management-report-command.md)
* [ファイルレポートコマンド](/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/reporting-commands/file-report-command.md)

***

### ユーザーレポートコマンド <a href="#user-report-command" id="user-report-command"></a>

任意のユーザー状態レポートを生成します。出力形式や保存先の指定、最終ログインからの日数によるユーザーの絞り込み、最終ログイン情報のみに簡略化するオプションに対応します。

<details>

<summary>DotNet CLI</summary>

**近日公開**

</details>

<details>

<summary>DotNet SDK</summary>

**近日公開**

</details>

<details>

<summary>PowerCommander</summary>

**近日公開**

</details>

<details>

<summary>Python CLI</summary>

**コマンド:** `user-report`

**フラグ:**

* `--format` 出力形式 {table,csv,json}
* `--output` 結果ファイルの出力パス (形式が `table` のときは無視)
* `--days` 最終ログインを遡る日数 (0 は制限なし)。既定は 365
* `--last-login, -l` 最終ログイン情報に絞った簡易レポート

**例:**

```
My Vault> user-report --days 20 --last-login --format json --output json
```

</details>

<details>

<summary>Python SDK</summary>

**関数:**

```python
def generate_report(self) -> List[UserReportEntry]:
        """Generate the user report."""
        users = list(self._enterprise_data.users.get_all_entities())
        active_usernames = [u.username.lower() for u in users if u.status == 'active']
```

</details>

### セキュリティ監査レポートコマンド <a href="#security-audit-report-command" id="security-audit-report-command"></a>

エンタープライズユーザーのパスワード強度レポートを生成します。ノードによる絞り込み、出力形式と保存先、BreachWatch データの付与 (有効な場合のみ)、スコア計算方法、監査結果の保存や更新内容の表示、不正なセキュリティデータ向けの強制同期、非対話モードなどのオプションに対応します。

<details>

<summary>DotNet CLI</summary>

**近日公開**

</details>

<details>

<summary>DotNet SDK</summary>

**近日公開**

</details>

<details>

<summary>PowerCommander</summary>

**近日公開**

</details>

<details>

<summary>Python CLI</summary>

**コマンド:** `security-audit-report`

**フラグ:**

* `--format` 出力形式 {table, csv, json}
* `--output` 結果ファイルの出力パス (形式が `table` のときは無視)
* `--syntax-help` ヘルプの表示
* `-n, --node` ノード名またはノード UID で結果を絞り込み
* `-b, --breachwatch` BreachWatch レポートを表示 (無効な場合は無視)
* `-s, --save` 更新後のセキュリティ監査レポートを保存
* `-su, --show-updated` 更新後のデータを表示
* `-st, --score-type` スコア計算方法 {strong\_passwords, default}
* `--attempt-fix` セキュリティデータが不正なボルトに対して強制同期を実行 (関連スコアはリセットされ、再計算まで不正確になる場合あり)
* `-f, --force` 確認プロンプトを省略 (非対話モード)

**例:**

```
My Vault> security-audit-report --format json --output security_score.json
My Vault> security-audit-report --score-type=strong_passwords --save
```

</details>

<details>

<summary>Python SDK</summary>

**関数:**

```python
def _get_updated_security_report_row(
        self,
        sr: APIRequest_pb2.SecurityReport,
        last_saved_data: Dict[str, int],
        current_email: str
    ) -> Dict[str, int]:
```

</details>

### 共有レポートコマンド <a href="#share-report-command" id="share-report-command"></a>

**呼び出し元が共有したレコード**および**呼び出し元に共有されたレコード**の詳細レポートを表示します。レコードまたはユーザーの選択、所有者情報や共有日 (権限がある場合)、共有フォルダ、詳細出力、共有フォルダのチームユーザー表示などのフィルターに対応します。

<details>

<summary>DotNet CLI</summary>

**近日公開**

</details>

<details>

<summary>DotNet SDK</summary>

**近日公開**

</details>

<details>

<summary>PowerCommander</summary>

**近日公開**

</details>

<details>

<summary>Python CLI</summary>

**コマンド:** `share-report`

**フラグ:**

* `--format` 出力形式 {table,csv,json}
* `--output` 結果ファイルの出力パス (形式が `table` のときは無視)
* `-r, --record` レコード名または UID
* `-e, --email` ユーザーのメールアドレスまたはチーム名
* `-o, --owner` レコードの所有者情報
* `--share-date` レコードが共有された日付を含める。詳細な所有者向けレポートにのみ適用。エンタープライズのレポート実行権限を持つユーザーのみ。例: `share-report -v -o --share-date --format table`
* `-sf, --shared-folders` 共有フォルダの詳細 (省略時はレコード)
* `-v, --verbose` 詳細情報の表示
* `-f, --folders` 共有フォルダのみに限定 (共有レコードは除外)
* `-tu, --show-team-users` 共有フォルダのチームメンバー表示 (`--folders` / `-f` と併用。管理者以外では無視)

**例:**

```
My Vault> share-report --email <email>
My Vault> share-report --record 
```

</details>

<details>

<summary>Python SDK</summary>

**関数:**

```python
def generate_report(self) -> List[SharedRecordReportEntry]:
        """Generate the shared records report.
        
        Returns:
            List of SharedRecordReportEntry objects containing share information
        """
        records = self._get_records_to_report()
        if not records:
            return []
```

</details>

### 共有レコードレポートコマンド <a href="#shared-records-report-command" id="shared-records-report-command"></a>

呼び出し元が他ユーザーと共有したレコードに限定した情報を表示します。他者から呼び出し元に共有されたレコードは含みません。

<details>

<summary>DotNet CLI</summary>

**近日公開**

</details>

<details>

<summary>DotNet SDK</summary>

**近日公開**

</details>

<details>

<summary>PowerCommander</summary>

**近日公開**

</details>

<details>

<summary>Python CLI</summary>

**コマンド:** `shared-record-report`

**別名:** `srr`

**フラグ:**

* `--format` 出力形式 {table,csv,json}
* `--output` 結果ファイルの出力パス (形式が `table` のときは無視)
* `-tu, --show-team-users` チームフォルダ経由で共有されたレコードについて、チームのメンバーを表示
* `--all-records` ボルト内の全レポート対象。省略時は所有レコードのみ

**例:**

```
My Vault> shared-records-report --all-records --format json --output json
```

</details>

<details>

<summary>Python SDK</summary>

**関数:**

```python
def generate_shared_folders_report(self) -> List[SharedFolderReportEntry]:
        """Generate a report of shared folders and their permissions.
        
        Returns:
            List of SharedFolderReportEntry objects containing folder share information
        """
        entries: List[SharedFolderReportEntry] = []
```

</details>


---

# Agent Instructions: 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:

```
GET https://docs.keeper.io/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/reporting-commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
