LoFP LoFP / approved research projects that document block_none for evaluation. prefer labeled service accounts and exclude those principals.

Techniques

Sample rules

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.

Detection logic

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