Cloud Run の脅威検出を使用する

このページでは、Cloud Run リソースの Cloud Run Threat Detection を構成する方法について説明します。

このページの手順は、Cloud Run Threat Detection ランタイム検出器にのみ適用されます。Cloud Run のコントロール プレーン検出器の操作方法については、Event Threat Detection を使用するをご覧ください。

始める前に

Cloud Run Threat Detection を有効または無効にする

組織、フォルダ、プロジェクトで Cloud Run Threat Detection を有効にすると、そのスコープ内でサポートされているすべての Cloud Run リソースが自動的にモニタリングされます。

Cloud Run Threat Detection を有効にした後、モニタリングする Cloud Run サービスを再デプロイする必要があります。

Cloud Run Threat Detection を有効または無効にする手順は次のとおりです。

コンソール

  1. Google Cloud コンソールで、Cloud Run Threat Detection の [サービス有効化] ページに移動します。

    [サービス有効化] に移動

  2. 組織またはプロジェクトを選択します。

  3. [サービスの有効化] タブの [Cloud Run Threat Detection] 列で、変更する組織、フォルダ、またはプロジェクトの有効化ステータスを選択し、次のいずれかを選択します。

    • 有効にする: Cloud Run の脅威検出を有効にします。
    • 無効: Cloud Run の脅威検出を無効にします。
    • 継承: 親フォルダまたは組織から有効化ステータスを継承します。プロジェクトとフォルダでのみ使用できます。

gcloud

gcloud scc manage services update コマンドは、Security Command Center のサービスまたはモジュールの状態を更新します。

後述のコマンドデータを使用する前に、次のように置き換えます。

  • RESOURCE_TYPE: 更新するリソースのタイプ(organizationfolder、または project
  • RESOURCE_ID: 更新する組織、フォルダ、またはプロジェクトの数値識別子。プロジェクトの場合、英数字のプロジェクト ID を使用することもできます。
  • NEW_STATE: Cloud Run Threat Detection を有効にする場合は ENABLED、Cloud Run Threat Detection を無効にする場合は DISABLED、親リソースの有効化ステータスを継承する場合(プロジェクトとフォルダにのみ有効)は INHERITED

gcloud scc manage services update コマンドを実行します。

Linux、macOS、Cloud Shell

gcloud scc manage services update cloud-run-threat-detection \
    --RESOURCE_TYPE=RESOURCE_ID \
    --enablement-state=NEW_STATE

Windows(PowerShell)

gcloud scc manage services update cloud-run-threat-detection `
    --RESOURCE_TYPE=RESOURCE_ID `
    --enablement-state=NEW_STATE

Windows(cmd.exe)

gcloud scc manage services update cloud-run-threat-detection ^
    --RESOURCE_TYPE=RESOURCE_ID ^
    --enablement-state=NEW_STATE

次のようなレスポンスが返されます。

effectiveEnablementState: ENABLED
intendedEnablementState: ENABLED
modules:
  CLOUD_RUN_ADDED_BINARY_EXECUTED:
    effectiveEnablementState: DISABLED
    intendedEnablementState: DISABLED
  CLOUD_RUN_ADDED_LIBRARY_LOADED:
    effectiveEnablementState: DISABLED
    intendedEnablementState: DISABLED
  CLOUD_RUN_ADDED_MALICIOUS_BINARY_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_ADDED_MALICIOUS_LIBRARY_LOADED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_BUILT_IN_MALICIOUS_BINARY_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_CONTAINER_ESCAPE:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_KUBERNETES_ATTACK_TOOL_EXECUTION:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_LOCAL_RECONNAISSANCE_TOOL_EXECUTION:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MALICIOUS_PYTHON_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MALICIOUS_SCRIPT_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MALICIOUS_URL_OBSERVED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MODIFIED_MALICIOUS_BINARY_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MODIFIED_MALICIOUS_LIBRARY_LOADED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_REPORT_CLI_ARGUMENTS:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_REPORT_ENVIRONMENT_VARIABLES:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_REVERSE_SHELL:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_UNEXPECTED_CHILD_SHELL:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
name: projects/1234567890123/locations/global/securityCenterServices/cloud-run-threat-detection
updateTime: '2025-03-14T00:27:36.589993683Z'

REST

Security Command Center Management API の RESOURCE_TYPE.locations.securityCenterServices.patch メソッドは、Security Command Center サービスまたはモジュールの状態を更新します。

リクエストのデータを使用する前に、次のように置き換えます。

  • RESOURCE_TYPE: 更新するリソースのタイプ(organizationsfolders、または projects
  • QUOTA_PROJECT: 課金と割り当てのトラッキングに使用するプロジェクト ID
  • RESOURCE_ID: 更新する組織、フォルダ、またはプロジェクトの数値識別子。プロジェクトの場合、英数字のプロジェクト ID を使用することもできます。
  • NEW_STATE: Cloud Run Threat Detection を有効にする場合は ENABLED、Cloud Run Threat Detection を無効にする場合は DISABLED、親リソースの有効化ステータスを継承する場合(プロジェクトとフォルダにのみ有効)は INHERITED

HTTP メソッドと URL:

PATCH https://securitycentermanagement.googleapis.com/v1/RESOURCE_TYPE/RESOURCE_ID/locations/global/securityCenterServices/cloud-run-threat-detection?updateMask=intendedEnablementState

リクエストの本文(JSON):

{
  "intendedEnablementState": "NEW_STATE"
}

リクエストを送信するには、次のいずれかのオプションを展開します。

次のような JSON レスポンスが返されます。

{
  "name": "projects/1234567890123/locations/global/securityCenterServices/cloud-run-threat-detection",
  "intendedEnablementState": "ENABLED",
  "effectiveEnablementState": "ENABLED",
  "modules": {
    "CLOUD_RUN_REPORT_CLI_ARGUMENTS": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_CONTAINER_ESCAPE": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MALICIOUS_SCRIPT_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MODIFIED_MALICIOUS_BINARY_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_MALICIOUS_BINARY_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_LIBRARY_LOADED": {
      "intendedEnablementState": "DISABLED",
      "effectiveEnablementState": "DISABLED"
    },
    "CLOUD_RUN_REVERSE_SHELL": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_LOCAL_RECONNAISSANCE_TOOL_EXECUTION": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_KUBERNETES_ATTACK_TOOL_EXECUTION": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_REPORT_ENVIRONMENT_VARIABLES": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_UNEXPECTED_CHILD_SHELL": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_BINARY_EXECUTED": {
      "intendedEnablementState": "DISABLED",
      "effectiveEnablementState": "DISABLED"
    },
    "CLOUD_RUN_MODIFIED_MALICIOUS_LIBRARY_LOADED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_MALICIOUS_LIBRARY_LOADED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_BUILT_IN_MALICIOUS_BINARY_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MALICIOUS_PYTHON_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MALICIOUS_URL_OBSERVED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    }
  },
  "updateTime": "2025-03-14T00:27:36.589993683Z"
}

Cloud Run Threat Detection モジュールを有効または無効にする

個々の Cloud Run Threat Detection モジュールを有効または無効にするには、次の操作を行います。すべての Cloud Run Threat Detection の脅威の検出結果とそのモジュールについては、Cloud Run Threat Detection 検出器をご覧ください。

gcloud

gcloud scc manage services update コマンドは、Security Command Center のサービスまたはモジュールの状態を更新します。

後述のコマンドデータを使用する前に、次のように置き換えます。

  • RESOURCE_TYPE: 更新するリソースのタイプ(organizationfolder、または project
  • RESOURCE_ID: 更新する組織、フォルダ、またはプロジェクトの数値識別子。プロジェクトの場合、英数字のプロジェクト ID を使用することもできます。
  • MODULE_NAME: 有効または無効にするモジュールの名前。有効な値については、Cloud Run の脅威検出検出器をご覧ください。
  • NEW_STATE: モジュールを有効にする場合は ENABLED、モジュールを無効にする場合は DISABLED、親リソースの有効化ステータスを継承する(プロジェクトとフォルダにのみ有効)場合は INHERITED

次の内容を request.json という名前のファイルに保存します。

{
  "MODULE_NAME": {
    "intendedEnablementState": "NEW_STATE"
  }
}

gcloud scc manage services update コマンドを実行します。

Linux、macOS、Cloud Shell

gcloud scc manage services update cloud-run-threat-detection \
    --RESOURCE_TYPE=RESOURCE_ID \
    --enablement-state=ENABLED \  
    --module-config-file=request.json

Windows(PowerShell)

gcloud scc manage services update cloud-run-threat-detection `
    --RESOURCE_TYPE=RESOURCE_ID `
    --enablement-state=ENABLED \  
    --module-config-file=request.json

Windows(cmd.exe)

gcloud scc manage services update cloud-run-threat-detection ^
    --RESOURCE_TYPE=RESOURCE_ID ^
    --enablement-state=ENABLED \  
    --module-config-file=request.json

次のようなレスポンスが返されます。

effectiveEnablementState: ENABLED
intendedEnablementState: ENABLED
modules:
  CLOUD_RUN_ADDED_BINARY_EXECUTED:
    effectiveEnablementState: DISABLED
    intendedEnablementState: DISABLED
  CLOUD_RUN_ADDED_LIBRARY_LOADED:
    effectiveEnablementState: DISABLED
    intendedEnablementState: DISABLED
  CLOUD_RUN_ADDED_MALICIOUS_BINARY_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_ADDED_MALICIOUS_LIBRARY_LOADED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_BUILT_IN_MALICIOUS_BINARY_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_CONTAINER_ESCAPE:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_KUBERNETES_ATTACK_TOOL_EXECUTION:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_LOCAL_RECONNAISSANCE_TOOL_EXECUTION:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MALICIOUS_PYTHON_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MALICIOUS_SCRIPT_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MALICIOUS_URL_OBSERVED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MODIFIED_MALICIOUS_BINARY_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MODIFIED_MALICIOUS_LIBRARY_LOADED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_REPORT_CLI_ARGUMENTS:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_REPORT_ENVIRONMENT_VARIABLES:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_REVERSE_SHELL:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_UNEXPECTED_CHILD_SHELL:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
name: projects/1234567890123/locations/global/securityCenterServices/cloud-run-threat-detection
updateTime: '2025-03-14T00:27:36.589993683Z'

REST

Security Command Center Management API の RESOURCE_TYPE.locations.securityCenterServices.patch メソッドは、Security Command Center サービスまたはモジュールの状態を更新します。

リクエストのデータを使用する前に、次のように置き換えます。

  • RESOURCE_TYPE: 更新するリソースのタイプ(organizationsfolders、または projects
  • QUOTA_PROJECT: 課金と割り当てのトラッキングに使用するプロジェクト ID
  • RESOURCE_ID: 更新する組織、フォルダ、またはプロジェクトの数値識別子。プロジェクトの場合、英数字のプロジェクト ID を使用することもできます。
  • MODULE_NAME: 有効または無効にするモジュールの名前。有効な値については、Cloud Run の脅威検出検出器をご覧ください。
  • NEW_STATE: モジュールを有効にする場合は ENABLED、モジュールを無効にする場合は DISABLED、親リソースの有効化ステータスを継承する(プロジェクトとフォルダにのみ有効)場合は INHERITED

HTTP メソッドと URL:

PATCH https://securitycentermanagement.googleapis.com/v1/RESOURCE_TYPE/RESOURCE_ID/locations/global/securityCenterServices/cloud-run-threat-detection?updateMask=modules

リクエストの本文(JSON):

{
  "modules": {
    "MODULE_NAME": {
      "intendedEnablementState": "NEW_STATE"
    }
  }
}

リクエストを送信するには、次のいずれかのオプションを展開します。

次のような JSON レスポンスが返されます。

{
  "name": "projects/1234567890123/locations/global/securityCenterServices/cloud-run-threat-detection",
  "intendedEnablementState": "ENABLED",
  "effectiveEnablementState": "ENABLED",
  "modules": {
    "CLOUD_RUN_REPORT_CLI_ARGUMENTS": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_CONTAINER_ESCAPE": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MALICIOUS_SCRIPT_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MODIFIED_MALICIOUS_BINARY_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_MALICIOUS_BINARY_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_LIBRARY_LOADED": {
      "intendedEnablementState": "DISABLED",
      "effectiveEnablementState": "DISABLED"
    },
    "CLOUD_RUN_REVERSE_SHELL": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_LOCAL_RECONNAISSANCE_TOOL_EXECUTION": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_KUBERNETES_ATTACK_TOOL_EXECUTION": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_REPORT_ENVIRONMENT_VARIABLES": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_UNEXPECTED_CHILD_SHELL": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_BINARY_EXECUTED": {
      "intendedEnablementState": "DISABLED",
      "effectiveEnablementState": "DISABLED"
    },
    "CLOUD_RUN_MODIFIED_MALICIOUS_LIBRARY_LOADED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_MALICIOUS_LIBRARY_LOADED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_BUILT_IN_MALICIOUS_BINARY_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MALICIOUS_PYTHON_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MALICIOUS_URL_OBSERVED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    }
  },
  "updateTime": "2025-03-14T00:27:36.589993683Z"
}

検出結果から環境変数を除外する

デフォルトでは、Cloud Run Threat Detection は検出結果を生成するときに、その検出結果で参照されているすべてのプロセスで使用される環境変数を報告します。環境変数の値は、脅威の調査で重要となる場合があります。

ただし、一部のソフトウェア パッケージでは、シークレットやその他の機密情報が環境変数に格納されているため、環境変数を検出結果から除外することをおすすめします。

  • Cloud Run Threat Detection の検出結果からプロセス環境変数を除外するには、CLOUD_RUN_REPORT_ENVIRONMENT_VARIABLES モジュールを DISABLED に設定します。

  • Cloud Run の脅威検出結果にプロセス環境変数を含めるには、CLOUD_RUN_REPORT_ENVIRONMENT_VARIABLES モジュールを ENABLED に設定します。

手順については、このページの Cloud Run Threat Detection モジュールを有効または無効にするをご覧ください。

検出結果から CLI 引数を除外する

すべてのプロセスには 1 つ以上のコマンドライン インターフェース(CLI)引数があります。デフォルトでは、Cloud Run Threat Detection は検出結果にプロセスの詳細を含めるときに、プロセスの CLI 引数を記録します。CLI の引数値は、脅威の調査で重要となる場合があります。

ただし、一部のユーザーが CLI 引数でシークレットなどの機密情報を渡す可能性があるため、CLI 引数を検出結果から除外することもできます。

  • Cloud Run Threat Detection の検出結果から CLI 引数を除外するには、CLOUD_RUN_REPORT_CLI_ARGUMENTS モジュールを DISABLED に設定します。

  • Cloud Run Threat Detection の検出結果に CLI 引数を含めるには、CLOUD_RUN_REPORT_CLI_ARGUMENTS モジュールを ENABLED に設定します。

手順については、このページの Cloud Run Threat Detection モジュールを有効または無効にするをご覧ください。

Cloud Run Threat Detection モジュールの設定を表示する

すべての Cloud Run Threat Detection の脅威の検出結果については、Cloud Run Threat Detection 検出器の表をご覧ください。

gcloud

gcloud scc manage services describe コマンドは、Security Command Center サービスまたはモジュールの状態を取得します。

後述のコマンドデータを使用する前に、次のように置き換えます。

  • RESOURCE_TYPE: 取得するリソースのタイプ(organizationfolder、または project
  • QUOTA_PROJECT: 課金と割り当てのトラッキングに使用するプロジェクト ID
  • RESOURCE_ID: 取得する組織、フォルダ、またはプロジェクトの数値識別子。プロジェクトの場合、英数字のプロジェクト ID を使用することもできます。

gcloud scc manage services describe コマンドを実行します。

Linux、macOS、Cloud Shell

gcloud scc manage services describe cloud-run-threat-detection \
    --RESOURCE_TYPE=RESOURCE_ID

Windows(PowerShell)

gcloud scc manage services describe cloud-run-threat-detection `
    --RESOURCE_TYPE=RESOURCE_ID

Windows(cmd.exe)

gcloud scc manage services describe cloud-run-threat-detection ^
    --RESOURCE_TYPE=RESOURCE_ID

次のようなレスポンスが返されます。

effectiveEnablementState: ENABLED
intendedEnablementState: ENABLED
modules:
  CLOUD_RUN_ADDED_BINARY_EXECUTED:
    effectiveEnablementState: DISABLED
    intendedEnablementState: DISABLED
  CLOUD_RUN_ADDED_LIBRARY_LOADED:
    effectiveEnablementState: DISABLED
    intendedEnablementState: DISABLED
  CLOUD_RUN_ADDED_MALICIOUS_BINARY_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_ADDED_MALICIOUS_LIBRARY_LOADED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_BUILT_IN_MALICIOUS_BINARY_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_CONTAINER_ESCAPE:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_KUBERNETES_ATTACK_TOOL_EXECUTION:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_LOCAL_RECONNAISSANCE_TOOL_EXECUTION:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MALICIOUS_PYTHON_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MALICIOUS_SCRIPT_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MALICIOUS_URL_OBSERVED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MODIFIED_MALICIOUS_BINARY_EXECUTED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_MODIFIED_MALICIOUS_LIBRARY_LOADED:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_REPORT_CLI_ARGUMENTS:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_REPORT_ENVIRONMENT_VARIABLES:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_REVERSE_SHELL:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
  CLOUD_RUN_UNEXPECTED_CHILD_SHELL:
    effectiveEnablementState: ENABLED
    intendedEnablementState: ENABLED
name: projects/1234567890123/locations/global/securityCenterServices/cloud-run-threat-detection
updateTime: '2025-03-14T00:27:36.589993683Z'

REST

Security Command Center Management API の RESOURCE_TYPE.locations.securityCenterServices.get メソッドは、Security Command Center サービスまたはモジュールの状態を取得します。

リクエストのデータを使用する前に、次のように置き換えます。

  • RESOURCE_TYPE: 取得するリソースのタイプ(organizationsfolders、または projects
  • QUOTA_PROJECT: 課金と割り当てのトラッキングに使用するプロジェクト ID
  • RESOURCE_ID: 取得する組織、フォルダ、またはプロジェクトの数値識別子。プロジェクトの場合、英数字のプロジェクト ID を使用することもできます。

HTTP メソッドと URL:

GET https://securitycentermanagement.googleapis.com/v1/RESOURCE_TYPE/RESOURCE_ID/locations/global/securityCenterServices/cloud-run-threat-detection

リクエストを送信するには、次のいずれかのオプションを展開します。

次のような JSON レスポンスが返されます。

{
  "name": "projects/1234567890123/locations/global/securityCenterServices/cloud-run-threat-detection",
  "intendedEnablementState": "ENABLED",
  "effectiveEnablementState": "ENABLED",
  "modules": {
    "CLOUD_RUN_REPORT_CLI_ARGUMENTS": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_CONTAINER_ESCAPE": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MALICIOUS_SCRIPT_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MODIFIED_MALICIOUS_BINARY_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_MALICIOUS_BINARY_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_LIBRARY_LOADED": {
      "intendedEnablementState": "DISABLED",
      "effectiveEnablementState": "DISABLED"
    },
    "CLOUD_RUN_REVERSE_SHELL": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_LOCAL_RECONNAISSANCE_TOOL_EXECUTION": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_KUBERNETES_ATTACK_TOOL_EXECUTION": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_REPORT_ENVIRONMENT_VARIABLES": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_UNEXPECTED_CHILD_SHELL": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_BINARY_EXECUTED": {
      "intendedEnablementState": "DISABLED",
      "effectiveEnablementState": "DISABLED"
    },
    "CLOUD_RUN_MODIFIED_MALICIOUS_LIBRARY_LOADED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_ADDED_MALICIOUS_LIBRARY_LOADED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_BUILT_IN_MALICIOUS_BINARY_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MALICIOUS_PYTHON_EXECUTED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    },
    "CLOUD_RUN_MALICIOUS_URL_OBSERVED": {
      "intendedEnablementState": "ENABLED",
      "effectiveEnablementState": "ENABLED"
    }
  },
  "updateTime": "2025-03-14T00:27:36.589993683Z"
}

指摘事項の確認

Cloud Run Threat Detection によって生成された検出結果は、Security Command Center で表示できます。

Security Command Center の IAM ロールは、組織レベル、フォルダレベル、またはプロジェクト レベルで付与できます。検出結果、アセット、セキュリティ ソースを表示、編集、作成、更新する権限は、アクセス権が付与されているレベルによって異なります。Security Command Center のロールの詳細については、アクセス制御をご覧ください。

Security Command Center で Cloud Run Threat Detection の検出結果を確認するには、次の操作を行います。

  1. Google Cloud コンソールで、Security Command Center の [検出結果] ページに移動します。

    [検出結果] に移動

  2. Google Cloud プロジェクトまたは組織を選択します。
  3. [クイック フィルタ] セクションの [ソースの表示名] サブセクションで、[Cloud Run Threat Detection] を選択します。検出結果クエリの結果は、このソースからの検出結果のみを表示するように更新されます。
  4. 特定の検出結果の詳細を表示するには、[カテゴリ] 列にある検出結果の名前をクリックします。検出結果の詳細パネルが開き、[概要] タブが表示されます。
  5. [概要] タブで、検出された内容、影響を受けるリソース、検出結果の修正手順(ある場合)に関する情報など、検出結果の詳細を確認します。
  6. 省略可: 検出結果の完全な JSON 定義を表示するには、[JSON] タブをクリックします。

調査に役立つように、脅威の検出には、次の外部リソースへのリンクも含まれます。

  • MITRE ATT&CK フレームワークのエントリ。このフレームワークは、クラウド リソースに対する攻撃の手口を説明し、修復するためのガイダンスを提供します。
  • VirusTotal は、悪意のある可能性のあるファイル、スクリプト、URL、ドメインに関するコンテキストを提供する、Alphabet 社のサービスです。

Cloud Run Threat Detection の検出結果のタイプの一覧については、Cloud Run Threat Detection の検出機能をご覧ください。

次のステップ