如果您使用的是 VPC Service Controls,则只有在您授予对 Security Command Center 服务账号访问权限时,才能发现和更新 Security Command Center 中的资源。
如需启用资源发现功能,请向 Security Command Center 服务账号授予访问权限。这样,该服务账号就可以在 Google Cloud 控制台中完成资产发现并显示资产。
服务账号名称的格式为 service-org-organization-id@security-center-api.iam.gserviceaccount.com。
查看、修改、创建和更新发现结果和资产
Security Command Center 的 IAM 角色可以在组织、文件夹或项目级层授予。您能否查看、修改、创建或更新发现结果、资产和安全来源,取决于您获授予的访问权限级别。如需详细了解 Security Command Center 角色,请参阅访问权限控制。
通知缺失或延迟
在某些情况下,通知功能可能会缺失、丢失或推迟:
可能存在与 NotificationConfig 中的过滤条件匹配的发现结果。如需测试通知,请使用 Security Command Center API 创建发现结果。
Security Command Center 服务账号必须具有 Pub/Sub 主题的 securitycenter.notificationServiceAgent 角色。服务账号名称的格式为 service-organization-id@gcp-sa-scc-notification.iam.gserviceaccount.com。
如果移除角色,则停用通知发布。
如果您移除了角色,然后重新授予该角色,通知将被延迟。
如果您删除并重新创建 Pub/Sub 主题,则通知将被丢弃。
Web Security Scanner
本部分介绍了在使用 Web Security Scanner 时遇到问题时可能会有帮助的问题排查步骤
扫描 Compute Engine 和 GKE 的错误
如果扫描的网址配置错误,Web Security Scanner 会拒绝访问。拒绝的原因可能包括:
网址使用的是临时 IP 地址
将此 IP 地址标记为静态。
对于单个虚拟机上的应用,请预留虚拟机上的 IP 地址
对于位于负载均衡器的应用,可预留负载均衡器上的 IP 地址。
网址映射到错误的 IP 地址
要解决发现的此问题,请参阅 DNS 注册商的服务说明。
网址映射到同一虚拟机的临时 IP 地址
将此 IP 地址标记为静态。
网址映射到预留的 IP 地址
当网址映射到同一组织的不同项目中预留的 IP 地址时,会发生此错误。为解决此问题,请为定义该映像的项目中的虚拟机或 HTTP 负载平衡器定义安全扫描。
网址映射到多个 IP 地址。
确保映射到此网址的所有 IP 地址都预留给同一项目。如果至少一个 IP 地址未预留给同一项目,则“扫描创建”,“修改”或“更新”操作将失败。
Model Armor
本部分介绍了在使用 Model Armor 遇到问题时可能会有帮助的问题排查步骤。
对 Model Armor 的所有 API 调用均返回 404(未找到网页)错误
建立与 Model Armor API 的 Private Service Connect。如果使用专用 Google 访问通道或在没有 Private Service Connect 的情况下访问 Model Armor 区域端点 (REP),通常会发生此错误。如需了解详情,请参阅关于通过 Private Service Connect 端点访问区域端点。
Sensitive Data Protection 过滤器出错或被跳过
请验证以下内容:
Sensitive Data Protection 模板与所调用的 Model Armor 端点位于同一区域。
发出 Model Armor 请求的服务代理在包含 Sensitive Data Protection 模板的项目中具有 dlp.User 和 dlp.Reader 角色。
此错误是由于 SanitizeUserPrompt 或 SanitizeModelResponse 请求中的客户端错误或 Sensitive Data Protection 模板存在问题而导致的。
Model Armor 全局端点错误
确保您向适当的区域端点(而非全球端点)发出 API 请求。
Model Armor 仅在其区域级端点上支持以下操作:
对模板执行创建、读取、更新、删除和列出操作。
SanitizeUserPrompt 和 SanitizeModelResponse API 请求。
如果您向全局端点发出针对这些操作的 API 请求,则会看到以下错误。
{
"error": {
"code": 403,
"message": "Write access to project '<PROJECT_ID>' was denied",
"status": "PERMISSION_DENIED"
}
}
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-21。"],[],[],null,["# Troubleshooting\n\n| Standard, Premium, and Enterprise [service tiers](/security-command-center/docs/service-tiers)\n\nLearn about troubleshooting steps that might be helpful if you experience the\nfollowing problems while using Security Command Center.\n| **Note:** For more troubleshooting information, see [Error messages](/security-command-center/docs/error-messages). In addition, Security Command Center provides error detectors, which report configuration errors that prevent Security Command Center and its services from working properly. Each error finding includes suggested remediation steps. For more information, see [Security Command Center errors](/security-command-center/docs/concepts-scc-errors).\n\nEnabling Security Command Center fails\n--------------------------------------\n\nEnabling Security Command Center most commonly fails if your organization policies\n[restrict identities by domain](/resource-manager/docs/organization-policy/restricting-domains). You and your\nservice account must be part of an allowed domain:\n\n- Make sure you sign in to an account that's in an allowed domain before you try to enable Security Command Center.\n- If you're using an `@*.gserviceaccount.com` service account, add the service account as an identity in a group within an allowed domain.\n\nAssets in Security Command Center aren't updating\n-------------------------------------------------\n\nIf you're using VPC Service Controls, assets in Security Command Center can only be\ndiscovered and updated when you grant access to the Security Command Center service\naccount.\n\nTo enable asset discovery, [grant access](/security-command-center/docs/how-to-use-security-health-analytics#service-perimeter) to the Security Command Center service account. This allows the service account\nto complete asset discovery and display assets in the Google Cloud console.\nThe service account name is in the form of\n`service-org-`\u003cvar translate=\"no\"\u003eorganization-id\u003c/var\u003e`@security-center-api.iam.gserviceaccount.com`.\n\nViewing, editing, creating, and updating findings and assets\n------------------------------------------------------------\n\n\nThe IAM roles for Security Command Center can be granted at the organization,\nfolder, or project level. Your ability to view, edit, create, or update findings, assets,\nand security sources depends on the level for which you are granted access. To learn more about\nSecurity Command Center roles, see [Access control](/security-command-center/docs/access-control).\n\nMissing or delayed notifications\n--------------------------------\n\nIn some situations, notifications might be missing, dropped, or delayed:\n\n- There might not be any findings that match the filters in your `NotificationConfig`. To test notifications, use the Security Command Center API to [create a finding](/security-command-center/docs/how-to-api-create-manage-findings#creating_a_finding).\n- The Security Command Center service account must have the `securitycenter.notificationServiceAgent` role on the Pub/Sub topic. The service account name is in the form of `service-`\u003cvar translate=\"no\"\u003eorganization-id\u003c/var\u003e`@gcp-sa-scc-notification.iam.gserviceaccount.com`.\n - If you remove the role, notification publishing is disabled.\n - If you remove the role and then grant the role again, notifications are delayed.\n- If you delete and recreate the Pub/Sub topic, notifications will be dropped.\n\nWeb Security Scanner\n--------------------\n\nThis section contains troubleshooting steps that you might find helpful if you\nhave problems using Web Security Scanner\n\n### Scan errors for Compute Engine and GKE\n\nIf the URL for a scan is misconfigured, Web Security Scanner rejects it. Possible\nreasons for rejection include:\n\n#### URL has an IP address that is ephemeral\n\nMark this IP address as static:\n\n- For an application on a single VM, reserve the IP address on the VM\n- For an application behind a load balancer, reserve the IP address on the load balancer.\n\n#### URL is mapped to a wrong IP address\n\nTo fix this finding, refer to the instructions from your DNS registrar service.\n\n#### URL is mapped to an ephemeral IP address of the same VM\n\nMark this IP address as static.\n\n#### URL is mapped to a reserved IP address\n\nThis error happens when the URL is mapped to an IP address that's reserved in a\ndifferent project of the same organization. To resolve this, define security\nscans for the VM or HTTP load balancer in the project for which it is defined.\n\n#### URL is mapped to more than one IP address.\n\nMake sure that all IP addresses that are mapped to this URL are reserved for the\nsame project. If there is at least one IP address that isn't reserved for the\nsame project, the Scan Create or Edit or Update operation fails.\n\nModel Armor\n-----------\n\nThis section contains troubleshooting steps that you might find helpful if you\nhave problems using Model Armor.\n\n### All API calls to Model Armor return a 404 Not Found error\n\nEstablish a Private Service Connect to the\nModel Armor APIs. This error typically occurs when Model Armor\nregional endpoints (REPs) are accessed using Private Google Access or without\na Private Service Connect. For more information, see\n[About accessing regional endpoints through Private Service Connect endpoints](/vpc/docs/about-accessing-regional-google-apis-endpoints).\n\n### Sensitive Data Protection filter gives an error or is skipped\n\nVerify the following:\n\n- The Sensitive Data Protection template is in the same region as the Model Armor endpoint being called.\n- The service agent making the Model Armor request has the `dlp.User` and `dlp.Reader` roles in the project containing the Sensitive Data Protection template.\n\nThis error occurs due to client errors in the `SanitizeUserPrompt` or `SanitizeModelResponse`\nrequests or issues with the Sensitive Data Protection template.\n\n### Model Armor global endpoint errors\n\nEnsure that you are making the API requests to the appropriate\nregional endpoint instead of the global endpoint.\n\nModel Armor supports the following operations only\non its regional endpoints:\n\n- Create, read, update, delete, and list operations on templates.\n- `SanitizeUserPrompt` and `SanitizeModelResponse` API requests.\n\nIf you make the API requests for those operations to the global endpoint, you\nwill see the following error. \n\n {\n \"error\": {\n \"code\": 403,\n \"message\": \"Write access to project '\u003cPROJECT_ID\u003e' was denied\",\n \"status\": \"PERMISSION_DENIED\"\n }\n }\n\nWhat's next\n-----------\n\nLearn about [Security Command Center errors](/security-command-center/docs/concepts-scc-errors)."]]