GCP Vertex AI Safety Filters Set to BLOCK_NONE
Description
Detects Vertex AI GenerateContent requests that set safety_settings.threshold to BLOCK_NONE. That threshold disables category blocking for the listed harm categories when clients explicitly send safetySettings. Attackers and careless apps use BLOCK_NONE to weaken built-in Gemini filters.
Query · esql
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_request.safety_settings.threshold, "BLOCK_NONE")
| 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.category,
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
Investigation fields
Pivot points the source recommends for triage.
gcp.vertexai.prompt_response_logs.modelgcp.vertexai.prompt_response_logs.api_methodgcp.vertexai.prompt_response_logs.full_request.safety_settings.categorygcp.vertexai.prompt_response_logs.full_request.safety_settings.thresholdgcp.vertexai.prompt_response_logs.full_request.contents.parts.textgcp.vertexai.prompt_response_logs.full_response.candidates.finish_reasongcp.vertexai.prompt_response_logs.full_response.candidates.safety_ratings.categorygcp.vertexai.prompt_response_logs.full_response.candidates.safety_ratings.probability
Implementation guide
Requires prompt_response_logs with full_request.safety_settings.threshold. The field is only present when the client sends safetySettings on the GenerateContent request.
Known false positives
- Approved research projects that document BLOCK_NONE for evaluation. Prefer labeled service accounts and exclude those principals.
Analyst notes
Investigating GCP Vertex AI Safety Filters Set to BLOCK_NONE
The GenerateContent request set safety_settings.threshold to BLOCK_NONE for one or more harm
categories. Category blocking is disabled for those categories (the model may still refuse in text,
but built-in filters will not stop generation for that category). Attackers and misconfigured apps
use this to weaken Gemini safety controls.
Possible investigation steps
- Confirm which categories were set to BLOCK_NONE via
full_request.safety_settings.categoryandthresholdon the alert. - Read the prompt text. Look for disallowed content that would normally be blocked.
- Hunt the same
cloud.project.id/ model for subsequent HIGH/MEDIUM safety ratings or unusual successful completions after filters were weakened. - Identify the caller via auditlogs GenerateContent (
source.ip,client.user.email). - Check whether org policy or an approved wrapper SDK requires stricter defaults (BLOCK_MEDIUM_AND_ABOVE or higher).
False positive analysis
- Documented research or red-team projects that intentionally use BLOCK_NONE. Prefer labeled service accounts and exclude those principals.
Response and remediation
- Require stricter thresholds via org policy, admission control, or application defaults; revoke non-compliant callers.
- If abuse is confirmed, rotate credentials and review other config changes (including SetPublisherModelConfig) by the same actor.