> [!NOTE]
> Premium and Enterprise (Deprecated) [service tiers](https://docs.cloud.google.com/security-command-center/docs/service-tiers.md.txt)

> [!CAUTION]
> The Security Command Center Enterprise service tier will shut down on May 21, 2027. If your organization uses the Enterprise service tier, then the organization will automatically move to the Premium service tier on or after May 21, 2027. Contact your account representative or a [Google Cloud sales specialist](https://cloud.google.com/contact) if you have questions.

This document describes a threat finding type in Security Command Center. Threat findings are generated by
[threat detectors](https://docs.cloud.google.com/security-command-center/docs/concepts-security-sources.md.txt#threats) when they detect
a potential threat in your cloud resources. For a full list of available threat findings, see [Threat findings index](https://docs.cloud.google.com/security-command-center/docs/threat-findings-index.md.txt).

## Overview

The [Service
Account Token Creator IAM role](https://docs.cloud.google.com/iam/docs/service-account-permissions#token-creator-role) was granted to an AI agent at
the folder level. Findings are classified as **High** severity by
default.

[Event Threat Detection](https://docs.cloud.google.com/security-command-center/docs/concepts-event-threat-detection-overview.md.txt) is the source of
this finding.

## How to respond

To respond to this finding, do the following:

### Review finding details

1. Open the `Defense Evasion: Folder Level TokenCreator Role Granted to AI Agent` finding as directed in
   [Reviewing findings](https://docs.cloud.google.com/security-command-center/docs/how-to-investigate-threats.md.txt#reviewing_findings).
   Review the details in the **Summary** and **JSON** tabs.

2. Identify other findings that occurred at a similar time for this resource.
   Related findings might indicate that this activity was malicious, instead of
   a failure to follow best practices.

3. Review the settings of the affected resource.

4. Check the logs for the affected resource.

### Research attack and response methods

Review the MITRE ATT\&CK framework entry for this finding type:
[Access Token Manipulation: Token Impersonation/Theft](https://attack.mitre.org/techniques/T1134/001/).

## Example finding JSON

The following is an example of the finding JSON, with default values omitted.

```json
{
  "finding": {
    "name": "organizations/ORGANIZATION_ID/sources/SOURCE_ID/locations/global/findings/FINDING_ID",
    "parent": "organizations/ORGANIZATION_ID/sources/SOURCE_ID/locations/global",
    "resourceName": "//cloudresourcemanager.googleapis.com/folders/PROJECT_NUMBER",
    "state": "ACTIVE",
    "category": "Defense Evasion: Folder Level TokenCreator Role Granted to AI Agent",
    "securityMarks": {
      "name": "organizations/ORGANIZATION_ID/sources/SOURCE_ID/locations/global/findings/FINDING_ID/securityMarks"
    },
    "eventTime": "TIMESTAMP",
    "createTime": "TIMESTAMP",
    "severity": "HIGH",
    "canonicalName": "folders/PROJECT_NUMBER/sources/SOURCE_ID/locations/global/findings/FINDING_ID",
    "findingClass": "THREAT",
    "contacts": {
      "security": {
        "contacts": [
          {
            "email": "USER_EMAIL"
          }
        ]
      }
    },
    "access": {
      "principalEmail": "PRINCIPAL_EMAIL",
      "callerIp": "IP_ADDRESS",
      "userAgent": "USER_AGENT",
      "serviceName": "cloudresourcemanager.googleapis.com",
      "methodName": "SetIamPolicy",
      "principalSubject": "user:PRINCIPAL_EMAIL"
    },
    "mitreAttack": {
      "primaryTactic": "DEFENSE_EVASION",
      "primaryTechniques": [
        "ACCOUNT_MANIPULATION"
      ],
      "additionalTactics": [
        "PRIVILEGE_ESCALATION"
      ],
      "additionalTechniques": [
        "ADDITIONAL_CLOUD_ROLES"
      ]
    },
    "iamBindings": [
      {
        "action": "ADD",
        "role": "roles/iam.serviceAccountTokenCreator",
        "member": "serviceAccount:service-PROJECT_NUMBER@gcp-sa-aiplatform-re.iam.gserviceaccount.com"
      }
    ],
    "parentDisplayName": "Event Threat Detection",
    "domains": [
      {
        "category": "AI"
      },
      {
        "category": "IDENTITY_AND_ACCESS"
      }
    ],
    "logEntries": [
      {
        "cloudLoggingEntry": {
          "insertId": "INSERT_ID",
          "logId": "cloudaudit.googleapis.com/activity",
          "resourceContainer": "folders/PROJECT_NUMBER",
          "timestamp": "TIMESTAMP"
        }
      }
    ]
  },
  "resource": {
    "name": "//cloudresourcemanager.googleapis.com/folders/PROJECT_NUMBER",
    "displayName": "agentengine",
    "type": "google.cloud.resourcemanager.Folder",
    "cloudProvider": "GOOGLE_CLOUD_PLATFORM",
    "service": "cloudresourcemanager.googleapis.com",
    "gcpMetadata": {
      "parent": "//cloudresourcemanager.googleapis.com/organizations/ORGANIZATION_ID",
      "parentDisplayName": "ORGANIZATION_DISPLAY_NAME",
      "folders": [
        {
          "resourceFolder": "//cloudresourcemanager.googleapis.com/folders/PROJECT_NUMBER",
          "resourceFolderDisplayName": "agentengine"
        }
      ],
      "organization": "organizations/ORGANIZATION_ID"
    },
    "resourcePath": {
      "nodes": [
        {
          "nodeType": "GCP_FOLDER",
          "id": "folders/PROJECT_NUMBER",
          "displayName": "agentengine"
        },
        {
          "nodeType": "GCP_ORGANIZATION",
          "id": "organizations/ORGANIZATION_ID"
        }
      ]
    },
    "resourcePathString": "organizations/ORGANIZATION_ID/folders/PROJECT_NUMBER"
  },
  "sourceProperties": {
    "sourceId": {
      "folderNumber": "PROJECT_NUMBER",
      "customerOrganizationNumber": "ORGANIZATION_ID"
    },
    "detectionCategory": {
      "ruleName": "ai_agent_granted_token_creator_role_folder"
    },
    "detectionPriority": "HIGH",
    "affectedResources": [
      {
        "gcpResourceName": "//cloudresourcemanager.googleapis.com/folders/PROJECT_NUMBER"
      }
    ],
    "evidence": [
      {
        "sourceLogId": {
          "resourceContainer": "folders/PROJECT_NUMBER",
          "timestamp": {
            "seconds": "TIMESTAMP_SECONDS",
            "nanos": TIMESTAMP_NANOS
          },
          "insertId": "INSERT_ID",
          "logId": "cloudaudit.googleapis.com/activity"
        }
      }
    ],
    "findingId": "FINDING_ID",
    "contextUris": {
      "mitreUri": {
        "displayName": "MITRE Link",
        "url": "https://attack.mitre.org/techniques/T1098/003/"
      },
      "cloudLoggingQueryUri": [
        {
          "displayName": "Cloud Logging Query Link",
          "url": "https://console.cloud.google.com/logs/query;query=timestamp%3D%22TIMESTAMP%22%0AinsertId%3D%22INSERT_ID%22?folder=PROJECT_NUMBER"
        }
      ]
    },
    "domains": [
      {
        "category": "AI"
      },
      {
        "category": "IDENTITY_AND_ACCESS"
      }
    ]
  }
}
```

## What's next

- Learn [how to work with threat
  findings in Security Command Center](https://docs.cloud.google.com/security-command-center/docs/how-to-investigate-threats).
- Refer to the [Threat findings index](https://docs.cloud.google.com/security-command-center/docs/threat-findings-index.md.txt).
- Learn how to [review a
  finding](https://docs.cloud.google.com/security-command-center/docs/how-to-investigate-threats#reviewing_findings) through the Google Cloud console.
- Learn about the [services that
  generate threat findings](https://docs.cloud.google.com/security-command-center/docs/concepts-security-sources#threats).