An attacker with a stolen service account key, user token or API key calls Gemini and other models through Agent Platform, formerly Vertex AI (aiplatform.googleapis.com), and your project pays. Some also widen the allowed models, deploy models, or read prompts your applications log to BigQuery. Save the audit entries and cut off model access first.
Look here
Log
Search for
Data Access audit log for aiplatform.googleapis.com (only if enabled)
Model calls by principalEmail and callerIp: gcloud logging read 'protoPayload.serviceName="aiplatform.googleapis.com" AND logName:"cloudaudit.googleapis.com%2Fdata_access"' --project=<project> --freshness=30d
Admin Activity audit log for aiplatform.googleapis.com
Endpoint, model, tuning and agent changes: gcloud logging read 'protoPayload.serviceName="aiplatform.googleapis.com" AND logName:"cloudaudit.googleapis.com%2Factivity"' --project=<project> --freshness=30d
Admin Activity audit log for apikeys.googleapis.com
Keys created, changed or restored, and key strings read. The last method is a Data Access entry and appears only if enabled: google.api.apikeys.v2.ApiKeys.CreateKey, google.api.apikeys.v2.ApiKeys.UpdateKey, google.api.apikeys.v2.ApiKeys.UndeleteKey, google.api.apikeys.v2.ApiKeys.GetKeyString
API keys
Keys with no API target, or targeting aiplatform.googleapis.com or generativelanguage.googleapis.com: gcloud services api-keys list --project=<project> --format=json
API keys
The project that owns a leaked key string: gcloud services api-keys lookup <key-string>
Organization policy
Which models are allowed. By default all models are allowed: gcloud org-policies describe vertexai.allowedModels --project=<project> --effective
Request-response logging (only if configured)
The BigQuery table named in the endpoint's logging settings. BigQuery Data Access logs, on by default, show who read it: gcloud ai endpoints describe <endpoint> --region=<region>
Cloud Billing reports
Agent Platform (Vertex AI) SKUs by project and day, compared with the first Data Access entry
Security Command Center
AI threat findings. Event Threat Detection needs the Premium or Enterprise tier: Persistence: New AI API Method, Persistence: New Geography for AI ServiceInitial Access: Dormant Service Account Activity in AI ServicePersistence: Sensitive AI Permission Added to Custom Role
Copy the window's audit entries to a bucket before you change anything: gcloud logging copy _Default storage.googleapis.com/<bucket> --location=global --log-filter='<filter>' --project=<project>
3
Save the API key list as evidence: gcloud services api-keys list --project=<project> --format=json
4
Write a deny policy file that blocks model calls for everyone outside the response team. It names principalSet://goog/public:all in deniedPrincipals, responders and the project's service agents in exceptionPrincipals, and this permission in deniedPermissions: aiplatform.googleapis.com/endpoints.predict
5
Attach the deny policy to the project: gcloud iam policies create <policy-id> --attachment-point=cloudresourcemanager.googleapis.com/projects/<project-id> --kind=denypolicies --policy-file=<file>
6
Test the deny policy with a model call from an identity outside the exceptions, and confirm it is refused
7
Allow only the models production uses. The policy file lists vertexai.allowedModels values in the form publishers/google/models/<model>:predict: gcloud org-policies set-policy <file>
8
Remove IAM bindings the attacker added with gcloud projects remove-iam-policy-binding
9
Undeploy models the attacker deployed: gcloud ai endpoints undeploy-model <endpoint> --region=<region> --deployed-model-id=<id>
10
Delete a leaked API key destructive. gcloud services api-keys undelete restores it within 30 days: gcloud services api-keys delete <key-id>
11
If calls continue, disable the API for the project destructive, stops every workload using it: gcloud services disable aiplatform.googleapis.com --project=<project>
Eradicate and recover
#
Item
1
Restore endpoints, models, agents and custom roles from source control, using Admin Activity entries as the change list
2
Restrict each replacement API key to one service and known addresses: gcloud services api-keys update <key-id> --api-target=service=aiplatform.googleapis.com --allowed-ips=<cidr>
3
Stop API keys from being bound to service accounts. Enforce this constraint: constraints/iam.managed.disableServiceAccountApiKeyCreation
4
Enable ADMIN_READ, DATA_READ and DATA_WRITE Data Access audit logs for aiplatform.googleapis.com and apikeys.googleapis.com in the organization auditConfigs
5
Log requests and responses to a table only AI owners can read: gcloud ai endpoints update <endpoint> --region=<region> --request-response-logging-table=<bq-table-uri> --request-response-logging-rate=1.0
Endpoint, model and tuning job changes land in Admin Activity audit logs, which are always on. Model calls such as predict, rawPredict, generateContent, streamGenerateContent and countTokens appear only in Data Access audit logs of type DATA_READ, which are off by default. An empty Data Access result can mean the logs were never enabled.
Request-response logging writes full prompts and responses to BigQuery. Those tables can contain personal data and secrets.
Cost reaches Cloud Billing with a delay, and a new budget can take several hours to send its first alert. An alerts-only budget does not cap usage, so use the audit logs to time the abuse.
A deny policy usually takes effect within 2 minutes and can take 7 minutes or more. aiplatform.googleapis.com/endpoints.predict is on the list of permissions deny policies support, and the test call in step 6 shows whether it stops the calls you see.
Google Cloud documentation: Security Command Center AI threat findings, AI Protection overview; services with audit logs; Manage API keys; API Keys audit logging; Cloud Billing budgets; IAM deny policies and supported permissions; organization policy constraints; gcloud reference for ai endpoints, services api-keys, services disable, iam policies, org-policies and logging copy. Checked September 2026. Re-checked October 2026: Gemini Enterprise Agent Platform release notes (Vertex AI renamed Agent Platform on April 22, 2026); AI threat finding names; Permissions supported in deny policies; Deny access to resources; gcloud reference for ai endpoints update, services api-keys update and logging copy. Checked November 2026: Agent Platform audit logging information (page last updated November 9, 2026) for the Admin Activity and Data Access split.