Security Command Center の Posture Violation ログを収集する

以下でサポートされています。

このドキュメントでは、Cloud Storage を使用して Security Command Center の Posture Violation ログをエクスポートし、Google Security Operations に取り込む方法について説明します。パーサーは、検出結果の未加工 JSON データを統合データモデル(UDM)に変換します。関連するフィールドを抽出し、データを再構造化して UDM フィールドにマッピングします。また、さまざまな検証と拡充を行い、データの品質と整合性を確保します。

始める前に

次の前提条件を満たしていることを確認します。

  • Google Cloud 環境で Security Command Center が有効になっている。
  • Google SecOps インスタンス。
  • Security Command Center と Cloud Logging に対する特権アクセス権。

Cloud Storage バケットを作成する

  1. Google Cloud コンソールにログインします。
  2. [Cloud Storage バケット] のページに移動します。

    [バケット] に移動

  3. [作成] をクリックします。

  4. [バケットの作成] ページでユーザーのバケット情報を入力します。以下のステップでは、操作を完了した後に [続行] をクリックして、次のステップに進みます。

    1. [始める] セクションで、次の操作を行います。

      1. バケット名の要件を満たす一意の名前を入力します(例: gcp-scc-posture-violation-logs)。
      2. 階層名前空間を有効にするには、展開矢印をクリックして [Optimize for file oriented and data-intensive workloads] セクションを開き、[このバケットで階層的な名前空間を有効にする] を選択します。

      3. バケットラベルを追加するには、展開矢印をクリックして [ラベル] セクションを開きます。

      4. [ラベルを追加] をクリックし、ラベルのキーと値を指定します。

    2. [データの保存場所の選択] セクションで、次の操作を行います。

      1. ロケーション タイプを選択してください。
      2. ロケーション タイプのメニューを使用して、バケット内のオブジェクト データが永続的に保存されるロケーションを選択します。

      3. クロスバケット レプリケーションを設定するには、[クロスバケット レプリケーションを設定する] セクションを開きます。

    3. [データのストレージ クラスを選択する] セクションで、バケットのデフォルトのストレージ クラスを選択します。あるいは、Autoclass を選択して、バケットデータのストレージ クラスを自動的に管理します。

    4. [オブジェクトへのアクセスを制御する方法を選択する] セクションで、[なし] を選択して公開アクセスの防止を適用し、バケットのオブジェクトの [アクセス制御モデル] を選択します。

    5. [オブジェクト データを保護する方法を選択する] セクションで、次の操作を行います。

      1. [データ保護] で、バケットに設定するオプションを選択します。
      2. オブジェクト データの暗号化方法を選択するには、[データ暗号化] というラベルの付いた展開矢印をクリックし、データの暗号化方法を選択します。
  5. [作成] をクリックします。

Security Command Center のロギングを構成する

  1. Google Cloud コンソールにログインします。
  2. [Security Command Center] ページに移動します。

    Security Command Center に移動

  3. 組織を選択する。

  4. [設定] をクリックします。

  5. [継続的エクスポート] タブをクリックします。

  6. [エクスポート名] で [Logging エクスポート] をクリックします。

  7. [シンク] で、[検出を Logging にロギング] をオンにします。

  8. [ロギング プロジェクト] で、検出結果を記録するプロジェクトを入力または検索します。

  9. [保存] をクリックします。

Security Command Center の Posture Violation ログのエクスポートを構成する

  1. Google Cloud コンソールにログインします。
  2. [ロギング] > [ログルーター] に移動します。
  3. [シンクを作成] をクリックします。
  4. 次の構成パラメータを指定します。

    • シンク名: わかりやすい名前を入力します(例: scc-posture-violation-logs-sink)。
    • シンク デスティネーション: [Cloud Storage Storage] を選択し、バケットの URI(gs://gcp-scc-posture-violation-logs など)を入力します。
    • ログフィルタ:

      logName="projects/<your-project-id>/logs/cloudsecurityscanner.googleapis.com%2Fposture_violations"
      resource.type="cloud_security_center_posture_violation"
      
    • エクスポート オプションを設定する: すべてのログエントリを含めます。

  5. [作成] をクリックします。

Cloud Storage の権限を構成する

  1. [IAM と管理] > [IAM] に移動します。
  2. Cloud Logging サービス アカウントを見つけます。
  3. バケットに対する roles/storage.admin を付与します。

フィードを設定する

Google SecOps プラットフォームでフィードを設定するには、次の 2 つのエントリ ポイントがあります。

  • [SIEM 設定] > [フィード]
  • [コンテンツ ハブ] > [コンテンツ パック]

[SIEM 設定] > [フィード] でフィードを設定する

フィードを構成する手順は次のとおりです。

  1. [SIEM Settings] > [Feeds] に移動します。
  2. [Add New Feed] をクリックします。
  3. 次のページで [単一フィードを設定] をクリックします。
  4. [フィード名] フィールドに、フィードの名前を入力します(例: Security Command Center Posture Violation Logs)。
  5. [Source type] として [Google Cloud Storage] を選択します。
  6. [ログタイプ] として [Security Command Center Posture Violation] を選択します。
  7. [Chronicle Service Account] フィールドの横にある [Get Service Account] をクリックします。
  8. [次へ] をクリックします。
  9. 次の入力パラメータの値を指定します。

    • ストレージ バケット URI: Cloud Storage バケットの URL(gs://gcp-scc-posture-violation-logs など)。
    • URI Is A: [サブディレクトリを含むディレクトリ] を選択します。
    • Source deletion options: 必要に応じて削除オプションを選択します。

  10. [次へ] をクリックします。

  11. [Finalize] 画面で新しいフィードの設定を確認し、[送信] をクリックします。

Content Hub からフィードを設定する

次のフィールドに値を指定します。

  • ストレージ バケット URI: Cloud Storage バケットの URL(gs://gcp-scc-posture-violation-logs など)。
  • URI Is A: [サブディレクトリを含むディレクトリ] を選択します。
  • Source deletion options: 必要に応じて削除オプションを選択します。

詳細オプション

  • フィード名: フィードを識別する事前入力された値。
  • ソースタイプ: Google SecOps にログを収集するために使用される方法。
  • アセットの名前空間: フィードに関連付けられた名前空間。
  • Ingestion Labels: このフィードのすべてのイベントに適用されるラベル。

UDM マッピング テーブル

ログフィールド UDM マッピング 論理
category read_only_udm.metadata.product_event_type 直接マッピング。
changed_policy read_only_udm.security_result.rule_name 直接マッピング。
cloudProvider read_only_udm.target.resource.attribute.cloud.environment 直接マッピング。
createTime read_only_udm.security_result.detection_fields[createTime] 直接マッピング。
finding.risks.riskCategory read_only_udm.security_result.detection_fields[risk_category] 直接マッピング。
ミュート read_only_udm.security_result.detection_fields[mute] 直接マッピング。
name read_only_udm.metadata.product_log_id 直接マッピング。
originalProviderId read_only_udm.target.resource.attribute.labels[original_provider_id] 直接マッピング。
read_only_udm.target.resource_ancestors[0].name 直接マッピング。
parentDisplayName read_only_udm.metadata.description 直接マッピング。
propertyDataTypes.changed_policy.primitiveDataType read_only_udm.security_result.rule_labels[changed_policy_primitive_data_type] 直接マッピング。
propertyDataTypes.policy_drift_details.listValues.propertyDataTypes[0].structValue.fields.drift_details.structValue.fields.detected_configuration.primitiveDataType read_only_udm.security_result.rule_labels[detected_configuration_primitive_data_type] 直接マッピング。
propertyDataTypes.policy_drift_details.listValues.propertyDataTypes[0].structValue.fields.drift_details.structValue.fields.expected_configuration.primitiveDataType read_only_udm.security_result.rule_labels[expected_configuration_primitive_data_type] 直接マッピング。
propertyDataTypes.policy_drift_details.listValues.propertyDataTypes[0].structValue.fields.field_name.primitiveDataType read_only_udm.security_result.rule_labels[field_name_primitive_data_type] 直接マッピング。
propertyDataTypes.posture_deployment_name.primitiveDataType read_only_udm.security_result.detection_fields[posture_deployment_name_primitiveDataType] 直接マッピング。
propertyDataTypes.posture_deployment_resource.primitiveDataType read_only_udm.security_result.detection_fields[posture_deployment_resource_primitiveDataType] 直接マッピング。
propertyDataTypes.posture_name.primitiveDataType read_only_udm.security_result.detection_fields[posture_name_primitiveDataType] 直接マッピング。
propertyDataTypes.posture_revision_id.primitiveDataType read_only_udm.security_result.detection_fields[posture_revision_id_primitiveDataType] 直接マッピング。
resource.cloudProvider read_only_udm.target.resource.attribute.cloud.environment 直接マッピング。
resource.displayName read_only_udm.target.resource.attribute.labels[resource_displayName] 直接マッピング。
resource.gcpMetadata.organization read_only_udm.target.resource.attribute.labels[resource_organization] 直接マッピング。
resource.gcpMetadata.parent read_only_udm.target.resource.attribute.labels[resource_parent] 直接マッピング。
resource.gcpMetadata.parentDisplayName read_only_udm.target.resource.attribute.labels[resource_parentDisplayName] 直接マッピング。
resource.gcpMetadata.project read_only_udm.target.resource.attribute.labels[resource_project] 直接マッピング。
resource.gcpMetadata.projectDisplayName read_only_udm.target.resource.attribute.labels[resource_projectDisplayName] 直接マッピング。
resource.organization read_only_udm.target.resource.attribute.labels[resource_organization] 直接マッピング。
resource.resourcePath.nodes.displayName read_only_udm.target.resource_ancestors.name 直接マッピング。
resource.resourcePath.nodes.id read_only_udm.target.resource_ancestors.product_object_id 直接マッピング。
resource.resourcePath.nodes.nodeType read_only_udm.target.resource_ancestors.resource_subtype 直接マッピング。
resource.resourcePathString read_only_udm.target.resource.attribute.labels[resource_path_string] 直接マッピング。
resource.service read_only_udm.target.resource_ancestors[10].name 直接マッピング。
resource.type read_only_udm.target.resource.attribute.labels[resource_type] 直接マッピング。
resourceName read_only_udm.target.resource.name 直接マッピング。
securityPosture.changedPolicy read_only_udm.security_result.rule_labels[changed_policy] 直接マッピング。
securityPosture.name read_only_udm.security_result.detection_fields[security_posture_name] 直接マッピング。
securityPosture.policyDriftDetails[0].detectedValue read_only_udm.security_result.rule_labels[policy_drift_details_detected_value] 直接マッピング。
securityPosture.policyDriftDetails[0].expectedValue read_only_udm.security_result.rule_labels[policy_drift_details_expected_value] 直接マッピング。
securityPosture.policyDriftDetails[0].field read_only_udm.security_result.rule_labels[policy_drift_details_field] 直接マッピング。
securityPosture.policySet read_only_udm.security_result.rule_set 直接マッピング。
securityPosture.postureDeployment read_only_udm.security_result.detection_fields[posture_deployment] 直接マッピング。
securityPosture.postureDeploymentResource read_only_udm.security_result.detection_fields[posture_deployment_resource] 直接マッピング。
securityPosture.revisionId read_only_udm.security_result.detection_fields[security_posture_revision_id] 直接マッピング。
重要度 read_only_udm.security_result.severity 直接マッピング。
sourceProperties.categories[0] read_only_udm.security_result.detection_fields[source_properties_categories] 直接マッピング。
sourceProperties.changed_policy read_only_udm.security_result.rule_name 直接マッピング。
sourceProperties.name read_only_udm.target.application 直接マッピング。
sourceProperties.policy_drift_details[0].drift_details.detected_configuration read_only_udm.security_result.rule_labels[policy_drift_details_detected_configuration] 直接マッピング。
sourceProperties.policy_drift_details[0].drift_details.expected_configuration read_only_udm.security_result.rule_labels[policy_drift_details_expected_configuration] 直接マッピング。
sourceProperties.policy_drift_details[0].field_name read_only_udm.security_result.rule_labels[policy_drift_details_field_name] 直接マッピング。
sourceProperties.posture_deployment read_only_udm.security_result.detection_fields[source_properties_posture_deployment_name] 直接マッピング。
sourceProperties.posture_deployment_name read_only_udm.security_result.detection_fields[source_properties_posture_deployment_name] 直接マッピング。
sourceProperties.posture_deployment_resource read_only_udm.security_result.detection_fields[source_properties_posture_deployment_resource] 直接マッピング。
sourceProperties.posture_name read_only_udm.target.application 直接マッピング。
sourceProperties.posture_revision_id read_only_udm.security_result.detection_fields[source_properties_posture_revision_id] 直接マッピング。
sourceProperties.revision_id read_only_udm.security_result.detection_fields[source_properties_posture_revision_id] 直接マッピング。
state read_only_udm.security_result.detection_fields[state] 直接マッピング。
read_only_udm.metadata.vendor_name パーサーは静的値 Google をマッピングします。
read_only_udm.metadata.product_name パーサーは静的値 Security Command Center をマッピングします。
read_only_udm.target.resource.resource_type パーサーは静的値 CLUSTER をマッピングします。
read_only_udm.security_result.about.investigation.status パーサーは静的値 NEW をマッピングします。
read_only_udm.security_result.alert_state パーサーは静的値 ALERTING をマッピングします。
read_only_udm.is_alert パーサーは静的値 true をマッピングします。
read_only_udm.is_significant パーサーは静的値 true をマッピングします。
read_only_udm.metadata.event_type パーサーは、デフォルト値として GENERIC_EVENT にマッピングします。フィールド「category」が「SECURITY_POSTURE_DRIFT」に等しく、かつ「client_device_present」と「token_target.application」が空でない場合、これは「SERVICE_MODIFICATION」にマッピングされます。フィールド「category」が「SECURITY_POSTURE_POLICY_DRIFT」、「SECURITY_POSTURE_POLICY_DELETE」、「SECURITY_POSTURE_DETECTOR_DRIFT」、「SECURITY_POSTURE_DETECTOR_DELETE」のいずれかに等しく、「network_edr_not_present」が false で、「client_device_present」が true の場合、「SCAN_UNCATEGORIZED」にマッピングされます。フィールド「token_metadata.event_type」が「GENERIC_EVENT」に等しく、「network_edr_not_present」が false で、「client_device_present」が true の場合、「STATUS_UPDATE」にマッピングされます。
read_only_udm.target.resource_ancestors[1].resource_type パーサーは静的値 CLOUD_PROJECT をマッピングします。
read_only_udm.target.resource.product_object_id パーサーは、2 番目と 3 番目の「/」文字の間にある「parent」フィールドから値を抽出します。
read_only_udm.target.resource_ancestors[1].name パーサーは、「resourceName」フィールドの 4 番目と 5 番目の「/」文字の間にある値を抽出します。
read_only_udm.security_result.url_back_to_product パーサーは、ログから抽出された組織 ID、ソース ID、検出 ID を使用して URL を動的に構築します。
securityMarks.name read_only_udm.security_result.detection_fields[securityMarks_name] 直接マッピング。

変更点

2025-02-07

  • security_result.url_back_to_product UDM フィールドのマッピングを更新しました。未加工ログのフィールド値 resource.projectDisplayName のプロジェクト ID 値を、;?project= という接頭辞で security_result.url_back_to_product UDM フィールドにマッピングされた URL の末尾に追加しました。

2024-11-21

  • SCC API の v2 バージョンのサポートを追加しました。このアップデートには、次のフィールドが含まれています。
  • resource.gcpMetadata.project
  • resource.gcpMetadata.projectDisplayName
  • resource.gcpMetadata.parent
  • resource.gcpMetadata.parentDisplayName
  • resource.gcpMetadata.folders.resourceFolder
  • resource.gcpMetadata.folders.resourceFolderDisplayName
  • resource.gcpMetadata.organization

2024-03-20

  • 新しく作成されたパーサー。

さらにサポートが必要な場合 コミュニティ メンバーや Google SecOps のプロフェッショナルから回答を得ることができます。