GCP Vertex AI Elevated Safety Rating on Response

Last updated 18 days ago on 2026-11-03
Created 2 months ago on 2026-10-02

About

Detects Vertex AI prompt-response logs where a candidate safety_ratings.probability is HIGH or MEDIUM. Those values are stronger signals than NEGLIGIBLE or LOW alone. Requires the request to include safetySettings so ratings are logged.
Tags
Domain: GenAIDomain: CloudData Source: GCP Vertex AIData Source: GCPData Source: Google Cloud PlatformPlatform: GCPService: GCP Vertex AIUse Case: Policy ViolationUse Case: Threat DetectionTactic: Defense EvasionThreat: Unauthorized AI UsageRule Type: ES|QLLanguage: esql
Severity
medium
Risk Score
47
False Positive Examples
Borderline creative-writing or news-summarization prompts can occasionally score MEDIUM. Confirm category and prompt text before escalating.
License
Elastic License v2(external, opens in a new tab or window)

Definition

Integration Pack
Prebuilt Security Detection Rules
Related Integrations

gcp_vertexai(external, opens in a new tab or window)

Query
text code block:
from logs-gcp_vertexai.prompt_response_logs-* metadata _id, _version, _index | where data_stream.dataset == "gcp_vertexai.prompt_response_logs" and ( MV_CONTAINS(gcp.vertexai.prompt_response_logs.full_response.candidates.safety_ratings.probability, "HIGH") or MV_CONTAINS(gcp.vertexai.prompt_response_logs.full_response.candidates.safety_ratings.probability, "MEDIUM") ) | keep _id, _version, _index, @timestamp, cloud.project.id, gcp.vertexai.prompt_response_logs.model, gcp.vertexai.prompt_response_logs.api_method, gcp.vertexai.prompt_response_logs.full_request.contents.parts.text, gcp.vertexai.prompt_response_logs.full_request.safety_settings.threshold, gcp.vertexai.prompt_response_logs.full_response.candidates.finish_reason, gcp.vertexai.prompt_response_logs.full_response.candidates.safety_ratings.category, gcp.vertexai.prompt_response_logs.full_response.candidates.safety_ratings.probability, gcp.vertexai.prompt_response_logs.full_response.candidates.safety_ratings.severity

Install detection rules in Elastic Security

Detect GCP Vertex AI Elevated Safety Rating on Response in the Elastic Security detection engine by installing this rule into your Elastic Stack.

To setup this rule, check out the installation guide for Prebuilt Security Detection Rules(external, opens in a new tab or window).