Security Health Analytics 用のカスタム モジュールの概要

このページでは、Security Health Analytics 用のカスタム モジュールの概要について説明します。

カスタム モジュールを使用すると、脆弱性、構成ミス、コンプライアンス違反を確認するために定義したルールを使用して、特定の Google Cloud リソースとポリシーをスキャンするカスタム検出機能を作成し、Security Health Analytics の検出機能を拡張できます。

カスタム モジュールの構成または定義は、Google Cloud コンソールで作成することも、自分でコーディングすることもできます。これらの構成または定義により、検出機能でチェックされるリソース、検出機能で評価されるプロパティ、脆弱性または構成ミスの検出時に検出機能から返される情報が決定されます。

カスタム モジュールは、Security Command Center がサポートする任意のリソースまたはアセットに作成できます。

カスタム モジュールの定義を自分でコーディングする場合は、YAML 式と Common Expression Language(CEL)式を使用します。カスタム モジュールを Google Cloud コンソールで作成する場合、ほとんどのコーディングはシステム側で行われますが、CEL 式をコーディングする必要があります。

カスタム モジュール定義の YAML ファイルの例については、カスタム モジュール定義の例をご覧ください。

カスタム モジュールは、Security Health Analytics の組み込み検出機能とともに、リアルタイムとバッチの両方のスキャンで実行されます。リアルタイム モードでは、アセットの構成が変更されるたびにスキャンがトリガーされます。バッチモード スキャンでは、登録された組織またはプロジェクトのすべての検出機能が 1 日に 1 回実行されます。

スキャン中に、各カスタム検出機能で有効になっている組織、フォルダ、プロジェクトと一致するすべてのアセットにカスタム検出機能が適用されます。

カスタム検出機能からの検出結果は、Security Command Center に書き込まれます。

詳しくは以下をご覧ください。

組み込みの検出機能とカスタム モジュールの比較

カスタム モジュールを使用すると、組み込みの Security Health Analytics 検出機能で検出できないものを検出できますが、組み込み検出機能は、カスタム モジュールがサポートしていない Security Command Center の機能をサポートしています。

機能サポート

Security Health Analytics のカスタム モジュールは攻撃パス シミュレーションでサポートされていません。このため、カスタム モジュールによって生成された検出結果には攻撃の発生可能性スコアまたは攻撃パスがありません。

検出ロジックの比較

カスタム モジュールで何ができるかを見てみましょう。ここでは、組み込み検出機能 PUBLIC_SQL_INSTANCE が確認する対象とカスタム モジュールでできることを比べてみます。

組み込み検出機能 PUBLIC_SQL_INSTANCE は、Cloud SQL インスタンスの authorizedNetworks プロパティが 0.0.0.0/0 に設定されているかどうかを確認します。設定されている場合、Cloud SQL インスタンスはすべての IP アドレスからの接続を受け入れるため、インスタンスが一般公開されていることを説明する検出結果が生成されます。

カスタム モジュールを使用すると、より複雑な検出ロジックを実装し、Cloud SQL インスタンスで次のようなものも確認できます。

  • 特定の接頭辞を持つ IP アドレス。ワイルドカードを使用します。
  • state プロパティの値。この値が MAINTENANCE に設定されている場合はインスタンスを無視し、別の値が設定されている場合は検出結果をトリガーするように使用できます。
  • region プロパティの値。これは、特定のリージョンのパブリック IP アドレスを持つインスタンスに対してのみ検出結果をトリガーする場合に使用できます。

必要な IAM ロールと権限

IAM ロールにより、Security Health Analytics のカスタム モジュールで実行できるアクションが決まります。

次の表に、Security Health Analytics のカスタム モジュール権限と、それらを含む IAM 事前定義ロールを示します。これらの権限は、少なくとも 2024 年 1 月 22 日まで有効です。それ以降は、2 番目の表に一覧表示されている権限が必要になります。

Google Cloud コンソールまたは Security Command Center API を使用すると、これらのロールを組織、フォルダ、またはプロジェクトのレベルで適用できます。

2024 年 1 月 22 日より前に必要な権限 ロール
securitycenter.securityhealthanalyticscustommodules.create
securitycenter.securityhealthanalyticscustommodules.update
securitycenter.securityhealthanalyticscustommodules.delete
roles/securitycenter.settingsEditor
roles/securitycenter.admin
securitycenter.securityhealthanalyticscustommodules.get
securitycenter.securityhealthanalyticscustommodules.list
roles/securitycenter.settingsViewer
roles/securitycenter.adminViewer
roles/securitycenter.admin
securitycenter.securityhealthanalyticscustommodules.test roles/securitycenter.securityHealthAnalyticsCustomModulesTester
roles/securitycenter.adminViewer
roles/securitycenter.adminEditor
roles/securitycenter.admin

次の表に、2024 年 1 月 22 日以降に必要な Security Health Analytics カスタム モジュールの権限と、それらを含む事前定義された IAM ロールを示します。

Google Cloud コンソールまたは Security Command Center API を使用すると、これらのロールを組織、フォルダ、またはプロジェクトのレベルで適用できます。

2024 年 1 月 22 日以降に必要な権限 ロール
securitycentermanagement.securityHealthAnalyticsCustomModules.create
securitycentermanagement.securityHealthAnalyticsCustomModules.update
securitycentermanagement.securityHealthAnalyticsCustomModules.delete
securitycentermanagement.securityHealthAnalyticsCustomModules.list
securitycentermanagement.securityHealthAnalyticsCustomModules.get
securitycentermanagement.effectiveSecurityHealthAnalyticsCustomModules.list
securitycentermanagement.effectiveSecurityHealthAnalyticsCustomModules.get
securitycentermanagement.securityHealthAnalyticsCustomModules.simulate
securitycentermanagement.securityHealthAnalyticsCustomModules.test
roles/securitycentermanagement.shaCustomModulesEditor
roles/securitycenter.settingsEditor
roles/securitycenter.admin
securitycentermanagement.securityHealthAnalyticsCustomModules.list
securitycentermanagement.securityHealthAnalyticsCustomModules.get
securitycentermanagement.effectiveSecurityHealthAnalyticsCustomModules.list
securitycentermanagement.effectiveSecurityHealthAnalyticsCustomModules.get
securitycentermanagement.securityHealthAnalyticsCustomModules.simulate
securitycentermanagement.securityHealthAnalyticsCustomModules.test
roles/securitycentermanagement.shaCustomModulesViewer
roles/securitycenter.settingsViewer
roles/securitycenter.adminViewer
roles/securitycenter.admin

IAM の権限とロールの詳細については、Google Cloud コンソールを使用して IAM ロールを付与するをご覧ください。

カスタム モジュールの割り当て

Security Health Analytics カスタム モジュールは割り当て上限の対象です。

カスタム モジュールの作成のデフォルトの割り当て上限は 100 ですが、必要に応じて割り当ての増加をリクエストできます。

カスタム モジュールのメソッドへの API 呼び出しも割り当て上限の対象になります。次の表に、カスタム モジュール API 呼び出しのデフォルトの割り当て上限を示します。

API 呼び出しの種類 上限
CustomModules 読み取りリクエスト(Get、List) 組織ごとに 1 分あたり 1,000 回の API 呼び出し
CustomModules 書き込みリクエスト(Create、Update、Delete) 組織ごとに 1 分あたり 60 回の API 呼び出し
CustomModules テスト リクエスト 組織ごとに 1 分あたり 12 回の API 呼び出し。

割り当てを増やすには、Google Cloud コンソールの [割り当て] ページでリクエストを送信します。

Security Command Center の割り当ての詳細については、割り当てと上限をご覧ください。

サポートされるリソースタイプ

Address
compute.googleapis.com/Address
Alert Policy
monitoring.googleapis.com/AlertPolicy
AlloyDB for PostgreSQL
alloydb.googleapis.com/Backup
alloydb.googleapis.com/Cluster
alloydb.googleapis.com/Instance
Artifact Registry Repository
artifactregistry.googleapis.com/Repository
Autoscaler
compute.googleapis.com/Autoscaler
Backend Service
compute.googleapis.com/BackendService
BigQuery Table
bigquery.googleapis.com/Table
Bucket
storage.googleapis.com/Bucket
Cloud Function
cloudfunctions.googleapis.com/CloudFunction
Cloud Run
run.googleapis.com/DomainMapping
run.googleapis.com/Execution
run.googleapis.com/Job
run.googleapis.com/Revision
run.googleapis.com/Service
Cluster
container.googleapis.com/Cluster
Cluster Role
rbac.authorization.k8s.io/ClusterRole
Cluster Role Binding
rbac.authorization.k8s.io/ClusterRoleBinding
Commitment
compute.googleapis.com/Commitment
Composer Environment
composer.googleapis.com/Environment
Compute Project
compute.googleapis.com/Project
compute.googleapis.com/SecurityPolicy
CryptoKey
cloudkms.googleapis.com/CryptoKey
CryptoKey Version
cloudkms.googleapis.com/CryptoKeyVersion
Dataflow Job
dataflow.googleapis.com/Job
Dataproc Cluster
dataproc.googleapis.com/Cluster
Dataset
bigquery.googleapis.com/Dataset
Datastream Connection Profile
datastream.googleapis.com/ConnectionProfile
Datastream Private Connection
datastream.googleapis.com/PrivateConnection
Datastream Stream
datastream.googleapis.com/Stream
Disk
compute.googleapis.com/Disk
DNS Policy
dns.googleapis.com/Policy
File Instance
file.googleapis.com/Instance
Firewall
compute.googleapis.com/Firewall
Firewall Policy
compute.googleapis.com/FirewallPolicy
Folder
cloudresourcemanager.googleapis.com/Folder
Forwarding Rule
compute.googleapis.com/ForwardingRule
Global Forwarding Rule
compute.googleapis.com/GlobalForwardingRule
Health Check
compute.googleapis.com/HealthCheck
Hub
gkehub.googleapis.com/Feature
gkehub.googleapis.com/Membership
Image
compute.googleapis.com/Image
Instance
compute.googleapis.com/Instance
Instance Group
compute.googleapis.com/InstanceGroup
Instance Group Manager
compute.googleapis.com/InstanceGroupManagers
Interconnect Attachment
compute.googleapis.com/InterconnectAttachment
Keyring
cloudkms.googleapis.com/KeyRing
KMS Import Job
cloudkms.googleapis.com/ImportJob
Kubernetes Service
k8s.io/Service
Log Bucket
logging.googleapis.com/LogBucket
Log Metric
logging.googleapis.com/LogMetric
Log Sink
logging.googleapis.com/LogSink
Managed Zone
dns.googleapis.com/ManagedZone
Namespace
k8s.io/Namespace
Network
compute.googleapis.com/Network
Network Endpoint Group
compute.googleapis.com/NetworkEndpointGroup
Node
k8s.io/Node
Node Group
compute.googleapis.com/NodeGroup
Node Template
compute.googleapis.com/NodeTemplate
Nodepool
container.googleapis.com/NodePool
Organization
cloudresourcemanager.googleapis.com/Organization
Organization Policy Service v2
orgpolicy.googleapis.com/CustomConstraint
orgpolicy.googleapis.com/Policy
Packet Mirroring
compute.googleapis.com/PacketMirroring
Pod
k8s.io/Pod
Project
cloudresourcemanager.googleapis.com/Project
Pubsub Snapshot
pubsub.googleapis.com/Snapshot
Pubsub Subscription
pubsub.googleapis.com/Subscription
Pubsub Topic
pubsub.googleapis.com/Topic
Region Backend Service
compute.googleapis.com/RegionBackendService
Region Disk
compute.googleapis.com/RegionDisk
Reservation
compute.googleapis.com/Reservation
Resource Policy
compute.googleapis.com/ResourcePolicy
Router
compute.googleapis.com/Router
Role
rbac.authorization.k8s.io/Role
Role Binding
rbac.authorization.k8s.io/RoleBinding
Service Account Key
iam.googleapis.com/ServiceAccountKey
ServiceUsage Service
serviceusage.googleapis.com/Service
Snapshot
compute.googleapis.com/Snapshot
Spanner Database
spanner.googleapis.com/Database
Spanner Instance
spanner.googleapis.com/Instance
SQL Instance
sqladmin.googleapis.com/Instance
SSL Certificate
compute.googleapis.com/SslCertificate
SSL Policy
compute.googleapis.com/SslPolicy
Subnetwork
compute.googleapis.com/Subnetwork
Target HTTP Proxy
compute.googleapis.com/TargetHttpProxy
Target HTTPS Proxy
compute.googleapis.com/TargetHttpsProxy
Target Instance
compute.googleapis.com/TargetInstance
Target Pool
compute.googleapis.com/TargetPool
Target SSL Proxy
compute.googleapis.com/TargetSslProxy
Target VPN Gateway
compute.googleapis.com/TargetVpnGateway
URL Map
compute.googleapis.com/UrlMap
Vertex AI
aiplatform.googleapis.com/BatchPredictionJob
aiplatform.googleapis.com/CustomJob
aiplatform.googleapis.com/DataLabelingJob
aiplatform.googleapis.com/Dataset
aiplatform.googleapis.com/Endpoint
aiplatform.googleapis.com/HyperparameterTuningJob
aiplatform.googleapis.com/Model
aiplatform.googleapis.com/SpecialistPool
aiplatform.googleapis.com/TrainingPipeline
VPC Connector
vpcaccess.googleapis.com/Connector
VPN Gateway
compute.googleapis.com/VpnGateway
VPN Tunnel
compute.googleapis.com/VpnTunnel

次のステップ