Stay organized with collections
Save and categorize content based on your preferences.
This document describes a threat finding type in Security Command Center. Threat findings are generated by
threat detectors when they detect
a potential threat in your cloud resources. For a full list of available threat findings, see Threat findings index.
Overview
This finding is generated when Google Cloud service account credentials
are accidentally leaked online or compromised.
On the page that appears, in the Filter box, enter the name of the
compromised service account and check the service account's keys and key
creation dates.
Review related findings by clicking the link in relatedFindingURI.
Related findings are the same finding type and the same instance and network.
To develop a response plan, combine your investigation results with MITRE
research.
Step 5: Implement your response
The following response plan might be appropriate for this finding, but might also impact operations.
Carefully evaluate the information you gather in your investigation to determine the best way to
resolve findings.
Contact the owner of the project with leaked credentials.
Consider deleting the compromised service account and rotate and delete
all service account access keys for the compromised project. After deletion,
resources that use the service account for authentication lose access.
Before proceeding, your security team should identify all impacted resources
and work with resource owners to ensure business continuity.
Work with your security team to identify unfamiliar resources, including
Compute Engine instances, snapshots, service accounts, and IAM
users. Delete resources not created with authorized accounts.
Respond to notifications from Google Cloud Support.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-10 UTC."],[],[],null,["| Standard, Premium, and Enterprise [service tiers](/security-command-center/docs/service-tiers) (requires [organization-level activation](/security-command-center/docs/activate-scc-overview#overview_of_organization-level_activation))\n\nThis document describes a threat finding type in Security Command Center. Threat findings are generated by\n[threat detectors](/security-command-center/docs/concepts-security-sources#threats) when they detect\na potential threat in your cloud resources. For a full list of available threat findings, see [Threat findings index](/security-command-center/docs/threat-findings-index).\n\nOverview\n\nThis finding is generated when Google Cloud service account credentials\nare accidentally leaked online or compromised.\n\n[Anomaly Detection](/security-command-center/docs/concepts-security-sources#anomaly_detection) is the\nsource of this finding.\n\nHow to respond\n\nTo respond to this finding, do the following:\n\nStep 1: Review finding details\n\n1. Open an `account_has_leaked_credentials` finding, as directed in\n [Reviewing finding details](/security-command-center/docs/how-to-investigate-threats#reviewing_findings). The details panel\n for the finding opens to the **Summary** tab.\n\n2. On the **Summary** tab, review the information in the following sections:\n\n- **What was detected**\n- **Affected resource**\n\n1. Click the **Source Properties** tab and note the following fields:\n\n - `Compromised_account`: the potentially compromised service account\n - `Project_identifier`: the project that contains the potentially leaked account credentials\n - `URL`: the link to the GitHub repository\n2. To see the complete JSON for the finding, click the **JSON** tab.\n\nStep 2: Review project and service account permissions\n\n1. In the Google Cloud console, go to the **IAM** page.\n\n \u003cbr /\u003e\n\n [Go to IAM](https://console.cloud.google.com/iam-admin/iam)\n\n \u003cbr /\u003e\n\n2. If necessary, select the project listed in `Project_identifier`.\n\n3. On the page that appears, in the **Filter** box, enter the account name\n listed in `Compromised_account` and check assigned permissions.\n\n4. In the Google Cloud console, go to the **Service Accounts** page.\n\n \u003cbr /\u003e\n\n [Go to Service Accounts](https://console.cloud.google.com/iam-admin/serviceaccounts)\n\n \u003cbr /\u003e\n\n5. On the page that appears, in the **Filter** box, enter the name of the\n compromised service account and check the service account's keys and key\n creation dates.\n\nStep 3: Check logs\n\n1. In the Google Cloud console, go to **Logs Explorer**.\n\n \u003cbr /\u003e\n\n [Go to Logs Explorer](https://console.cloud.google.com/logs/query)\n\n \u003cbr /\u003e\n\n2. On the Google Cloud console toolbar, select your project.\n\n3. On the page that loads, check logs for activity from new or updated\n IAM resources using the following filters:\n\n - `proto_payload.method_name=\"google.iam.admin.v1.CreateServiceAccount\"`\n - `protoPayload.methodName=\"SetIamPolicy\"`\n - `resource.type=\"gce_instance\" AND log_name=\"projects/`\u003cvar class=\"edit\" translate=\"no\"\u003eProject_identifier\u003c/var\u003e`/logs/cloudaudit.googleapis.com%2Factivity\"`\n - `protoPayload.methodName=\"InsertProjectOwnershipInvite\"`\n - `protoPayload.authenticationInfo.principalEmail=\"`\u003cvar class=\"edit\" translate=\"no\"\u003eCompromised_account\u003c/var\u003e`\"`\n\nStep 4: Research attack and response methods\n\n1. Review the MITRE ATT\\&CK framework entry for this finding type: [Valid Accounts: Cloud Accounts](https://attack.mitre.org/techniques/T1078/004/).\n2. Review related findings by clicking the link in `relatedFindingURI`. Related findings are the same finding type and the same instance and network.\n3. To develop a response plan, combine your investigation results with MITRE research.\n\nStep 5: Implement your response\n\n\nThe following response plan might be appropriate for this finding, but might also impact operations.\nCarefully evaluate the information you gather in your investigation to determine the best way to\nresolve findings.\n\n- Contact the owner of the project with leaked credentials.\n- Consider [deleting the compromised service account](/iam/docs/service-accounts-delete-undelete#deleting) and rotate and delete all service account access keys for the compromised project. After deletion, resources that use the service account for authentication lose access. Before proceeding, your security team should identify all impacted resources and work with resource owners to ensure business continuity.\n- Work with your security team to identify unfamiliar resources, including Compute Engine instances, snapshots, service accounts, and IAM users. Delete resources not created with authorized accounts.\n- Respond to notifications from Google Cloud Support.\n- To limit who can create service accounts, use the [Organization Policy Service](/resource-manager/docs/organization-policy/overview).\n- To identify and fix overly permissive roles, use [IAM\n Recommender](/iam/docs/recommender-overview).\n- Open the `URL` link and delete the leaked credentials. Gather more information about the compromised account and contact the owner.\n\nWhat's next\n\n- Learn [how to work with threat\n findings in Security Command Center](/security-command-center/docs/how-to-investigate-threats).\n- Refer to the [Threat findings index](/security-command-center/docs/threat-findings-index).\n- Learn how to [review a\n finding](/security-command-center/docs/how-to-investigate-threats#reviewing_findings) through the Google Cloud console.\n- Learn about the [services that\n generate threat findings](/security-command-center/docs/concepts-security-sources#threats)."]]