将 Vertex AI 与 Google SecOps 集成

本文档介绍了如何将 Vertex AI 与 Google Security Operations (Google SecOps) 集成。

集成版本:1.0

准备工作

如需使用此集成,您需要 Google Cloud 项目、 Google Cloud 服务账号和 Identity and Access Management (IAM) 角色。

如需详细了解价格,请参阅 Vertex AI 价格

设置 Google Cloud 项目

如需为 Vertex AI 集成创建和配置 Google Cloud 项目,请设置 Google Cloud 项目

创建和配置服务账号

如需将 Vertex AI 与 Google SecOps 集成,您可以使用现有服务账号,也可以创建新服务账号。如需有关创建服务账号的指导,请参阅创建服务账号

如果您未使用工作负载身份电子邮件地址来配置集成,请在创建服务账号后以 JSON 格式创建服务账号密钥。配置集成参数时,您需要提供下载的 JSON 密钥文件的完整内容。

出于安全考虑,我们建议您使用工作负载身份电子邮件地址,而不是服务账号 JSON 密钥。如需详细了解工作负载身份,请参阅工作负载的身份

配置 IAM 角色

如需与 Vertex AI 集成,请向用于配置集成的服务账号授予 Vertex AI User (roles/aiplatform.user) IAM 角色。

如需详细了解 Vertex AI IAM 角色,请参阅使用 IAM 进行 Vertex AI 访问权限控制

集成参数

Vertex AI 集成需要以下参数:

参数 说明
API Root 必需

Vertex AI 集成的 API 根。

默认值为 https://LOCATION-aiplatform.googleapis.com

Workload Identity Email 可选

工作负载身份联合的客户端电子邮件地址。

您可以配置此参数或 Service Account Json File Content 参数。

在此集成中,使用服务账号密钥 JSON 文件进行身份验证的优先级高于工作负载身份联合。

如需使用工作负载身份联合模拟服务账号,请向您的服务账号授予 Service Account Token Creator 角色。如需详细了解工作负载身份以及如何使用它们,请参阅工作负载的身份

Service Account Json File Content 可选

服务账号密钥 JSON 文件的内容。

您可以配置此参数或 Workload Identity Email 参数。

如需配置此参数,请提供您在创建服务账号时下载的服务账号密钥 JSON 文件的完整内容。

如需详细了解如何使用服务账号作为身份验证方法,请参阅服务账号概览

Project ID 可选

集成中要使用的项目 ID。

如果您未为此参数设置值,集成会从您的 Google Cloud 服务账号中检索项目 ID。

Default Model 可选

集成中要使用的默认模型的名称。

默认值为 gemini-1.5-flash-002

Location 可选

Vertex AI API 的位置 ID。

如果您未设置值,集成会从 API 根目录中提取位置 ID。

如需详细了解位置、端点和资源,请参阅 Vertex AI API

Verify SSL 必需

如果选中此选项,集成会验证用于连接到 Vertex AI 的 SSL 证书是否有效。

此选项将会默认选中。

如需了解如何在 Google SecOps 中配置集成,请参阅配置集成

如果需要,您可以在稍后阶段进行更改。配置集成实例后,您可以在剧本中使用该实例。如需详细了解如何配置和支持多个实例,请参阅支持多个实例

操作

如需详细了解操作,请参阅处理“工作台”中的待处理操作执行手动操作

分析 EML

使用 Analyze EML 操作通过 Vertex AI 分析 EML 文件。 此操作会单独提交每个文件。

此操作不适用于 Google SecOps 实体。

操作输入

分析 EML 操作需要以下参数:

参数 说明
Model ID 可选

要使用的模型的 ID,例如 gemini-1.5-flash-002

Temperature 可选

用于控制 token 选择的随机程度的值。此形参接受 float 数据类型的值。

如需详细了解温度值,请参阅使用参数值进行实验

Files To Analyze 必需

要提交以供分析的 EML 文件列表(以英文逗号分隔)。

Max Output Tokens 可选

每个回答中可生成的输出 token 数量上限。

词元约为 4 个字符。100 个 token 大约对应 60-80 个字词。此限制适用于每个实体。

如需了解详情,请参阅使用参数值进行实验

默认值为 100

操作输出

分析 EML 操作提供以下输出:

操作输出类型 可用性
案例墙附件 不可用
案例墙链接 不可用
“支持请求墙”表格 不可用
丰富化表 不可用
JSON 结果 可用
输出消息 可用
脚本结果 可用
JSON 结果

以下示例展示了使用 Analyze EML 操作时收到的 JSON 结果输出:

[{
   "Entity": "file",
   "EntityResult": {
       "raw": "{\"threat_level\": \"High\", \"threats_found\": [{\"threat\": \"Phishing Links\", \"explanation\": \"Multiple links point",
       "extracted_info": {
           "threat_level": "High",
           "threats_found": [
               {
                   "threat": "Phishing Links",
                   "explanation": "Multiple links point to example.com, a suspicious domain likely used for phishing campaigns.",
                   "example": "URL"
               },
               {
                   "threat": "Social Engineering",
                   "explanation": "The email uses urgency and scarcity tactics, pressuring the recipient to click links quickly.",
                   "example": "Register Now and Save $1,000 on all 2-Day Project Management (Fundamentals)"
               },
               {
                   "threat": "Suspicious Domain",
                   "explanation": "The email uses the domain example.com', which is not commonly associated with legitimate businesses or organizations and may be a newly registered domain for malicious purposes. This should be checked for validity and legitimacy. The email also uses the domain pdu-xl.com which may also be suspicious.",
                   "example": "example.com"
               }
           ],
           "verification_steps": [
               "Check the domain reputation of example.com using online tools like VirusTotal or URLVoid.",
               "Analyze email headers to identify the true sender's IP address and location using email analysis tools.",
               "Verify the legitimacy of mentioned products or services by independently contacting the companies mentioned."
           ],
           "protection_measures": [
               "Avoid clicking links in suspicious emails. Hover over links to check the actual URL in a separate tool.",
               "Enable email filtering and anti-phishing features in your email client.",
               "Regularly update your antivirus and anti-malware software.",
               "Educate users about social engineering tactics and phishing schemes."
           ]
       },
       "usageMetadata": {
           "promptTokenCount": 12,
           "candidatesTokenCount": 778,
           "totalTokenCount": 790
       }
   }
}]
输出消息

分析 EML 操作可以返回以下输出消息:

输出消息 消息说明
Successfully analysed the following EML files using Vertex AI: FILE_PATHS 操作成功。
Error executing action "Analyze EML". Reason: ERROR_REASON

操作失败。

检查与服务器的连接、输入参数或凭据。

脚本结果

下表列出了使用 Analyze EML 操作时脚本结果输出的值:

脚本结果名称
is_success TrueFalse

描述实体

使用 Describe Entity 操作通过 Vertex AI 总结有关实体的信息。

此操作会在所有 Google SecOps 实体上运行,并单独提交每个实体。

操作输入

描述实体操作需要以下参数:

参数 说明
Model ID 可选

要使用的模型的 ID,例如 gemini-1.5-flash-002

Temperature 可选

用于控制 token 选择的随机程度的值。此形参接受 float 数据类型的值。

如需详细了解温度值,请参阅使用参数值进行实验

Exclude Fields 可选

在生成实体摘要期间要排除的 Google SecOps 实体元数据字段的英文逗号分隔列表。

Force Refresh 可选

如果选择此操作,则该操作会忽略 Refresh After (Days) 参数和哈希验证,并在每次运行操作时重新生成实体摘要。

默认情况下未选中。

Refresh After (Days) 必需

操作在刷新实体摘要之前等待的天数。

该操作会生成一个哈希值,该哈希值基于发送给 Vertex AI 的所有输入(不包括 Fields To Ignore 参数中的值)。如果哈希值已更改,该操作会在设置的天数后刷新摘要。如果哈希值未发生变化,即使 Refresh After (Days) parameter value is earlier than the latest summary generation time.

The action validates the hash value of the latest actual generated summary and ignores the cached hash value.

The default value is 30.

Max Output Tokens 可选

每个回答中可生成的输出 token 数量上限。

词元约为 4 个字符。100 个 token 大约对应 60-80 个字词。此限制适用于每个实体。

如需了解详情,请参阅使用参数值进行实验

操作输出

描述实体操作提供以下输出:

操作输出类型 可用性
案例墙附件 不可用
案例墙链接 不可用
“支持请求墙”表格 不可用
丰富化表 不可用
JSON 结果 可用
输出消息 可用
脚本结果 可用
JSON 结果

以下示例展示了使用描述实体操作时收到的 JSON 结果输出:

[
    {
        "Entity": "1B16D64CE18772B8F77C74C3D4DC24AA066BB117",
        "EntityResult": {
            "summary": "This is a suspicious, enriched, internal file hash (SHA1: 1B16D64CE18772B8F77C74C3D4DC24AA066BB117) identified as a Microsoft Excel 2007+ file (\"FC090000\") located on a user's desktop.  VirusTotal analysis shows 3 malicious flags out of 65 total engines.  The file contains macros, is potentially obfuscated, and exhibits behaviors like writing to files, running DLLs, and downloading content.  It was last modified on 2024-11-13 and created on 2021-07-07.  The file is linked to a single case (\"potential_apt_doc_files\") which was closed.  The file is flagged as an artifact but not vulnerable or a pivot point.\n",
            "usageMetadata": {
                "promptTokenCount": 12,
                "candidatesTokenCount": 778,
                "totalTokenCount": 790
            }
        }
    }
]
输出消息

描述实体操作可以返回以下输出消息:

输出消息 消息说明
Successfully summarized the entity based on the available information using Vertex AI. 操作成功。
Error executing action "Describe Entity". Reason: ERROR_REASON

操作失败。

检查与服务器的连接、输入参数或凭据。

脚本结果

下表列出了使用 Describe Entity 操作时脚本结果输出的值:

脚本结果名称
is_success TrueFalse

执行提示

使用 Execute Prompt 操作通过 Vertex AI 执行各个文本提示。

此操作不适用于 Google SecOps 实体。

操作输入

执行提示操作需要以下参数:

参数 说明
Model ID 可选

要使用的模型的 ID,例如 gemini-1.5-flash-002

Text Prompt 必需

要包含在提示中的文本说明。

Temperature 可选

用于控制 token 选择的随机程度的值。此形参接受 float 数据类型的值。

如需详细了解温度值,请参阅使用参数值进行实验

Candidate Count 可选

每次运行操作时要返回的响应变体数量。

对于每个请求,结算费用会针对输入词元收取一次,并针对所有生成的候选词元的每个输出词元收取一次。

Response MIME Type 可选

生成的候选文本的输出回答的媒体 (MIME) 类型。

以下模型支持响应媒体 (MIME) 类型:gemini-1.5-progemini-1.5-flash

可能的值如下:

  • application/json
  • text/plain
  • text/x.enum
默认值为 text/plain
Response Schema 可选

生成的候选文本要遵循的架构。

如需使用此参数,请配置 Response MIME Type 参数。

以下模型支持响应架构:gemini-1.5-progemini-1.5-flash

Max Input Tokens 可选

可提交的输入令牌数量上限。

一个 token 最多包含 4 个字符。100 个 token 大约相当于 60-80 个字词。

如果您未设置值,则该操作会执行任何提示。 如果令牌数量超过配置的最大数量,则操作失败。

Max Output Tokens 可选

每个回答中可生成的输出 token 数量上限。

词元约为 4 个字符。100 个 token 大约对应 60-80 个字词。此限制适用于每个实体。

如需了解详情,请参阅使用参数值进行实验

操作输出

执行提示操作提供以下输出:

操作输出类型 可用性
案例墙附件 不可用
案例墙链接 不可用
“支持请求墙”表格 不可用
丰富化表 不可用
JSON 结果 可用
输出消息 可用
脚本结果 可用
JSON 结果

以下示例展示了使用 执行提示操作时收到的 JSON 结果输出:

{
  "candidates": [
    {
      "content": {
        "role": "model",
        "parts": [
          {
            "text": "Responding to a malicious email requires a layered approach.  Here's a breakdown of remediation steps, prioritizing actions based on urgency:\n\n**Immediate Actions (within minutes):**\n\n1. **Do NOT click any links or open any attachments.** This is paramount.  Malicious links can download malware, and attachments can contain viruses or exploits.\n\n2. **Disconnect from the internet (if possible).** This limits the damage the malware can do if it's already on your system.  Unplug your ethernet cable or turn off Wi-Fi.\n\n3. **Close the email immediately.** Don't even hover over links or attachments; the preview might be enough to trigger some malware.\n\n**Investigative Actions (within hours):**\n\n4. **Check your email account for unauthorized access.**  Look for unfamiliar sent emails, changed settings (like forwarding rules), or new accounts added.\n\n5. **Run a full system scan with your antivirus software.**  Ensure your antivirus definitions are up-to-date before running the scan.  Consider a second opinion scan with a different reputable antivirus program.\n\n6. **Review your computer's processes (Task Manager on Windows, Activity Monitor on macOS).** Look for unfamiliar processes consuming significant resources.  This could indicate malware activity.\n\n7. **Check your network connections.**  See if any unauthorized connections exist.\n\n8. **Change your email password immediately.** Use a strong, unique password.  Consider using a password manager.\n\n9. **If you clicked a link or opened an attachment, consider the potential impact.** Did you enter credentials?  Did you download a file?  The severity of action needed depends on this.\n\n**Remediation Actions (within days):**\n\n10. **Contact your IT department or security professional.**  They can provide expert guidance and assist with more advanced remediation steps.\n\n11. **Consider more advanced malware scanning tools.**  There are specialized tools that can detect malware missed by standard antivirus.\n\n12. **Review your operating system's security settings.**  Ensure firewalls are enabled and that other security features are adequately configured.\n\n13. **Report the malicious email to your email provider.** This helps them remove the email and prevent others from being affected. You can often do this by forwarding the email to an abuse reporting address provided by your provider.  Report it to the appropriate authorities if you suspect the email involves a crime.\n\n14. **Monitor your accounts and financial records for suspicious activity.**  Phishing emails often aim to steal credentials and financial information.\n\n**Preventive Actions (ongoing):**\n\n15. **Implement strong email filtering.** Use spam filters and configure your email provider's security settings to block suspicious emails.\n\n16. **Train yourself and others to identify phishing emails.**  Be wary of emails with unusual addresses, grammatical errors, urgent requests, or suspicious attachments.\n\n17. **Keep your software up to date.** Regularly update your operating system, applications, and antivirus software.\n\n18. **Use strong, unique passwords for all accounts.**  A password manager can assist with this.\n\n19. **Enable two-factor authentication (2FA) wherever possible.** This adds an extra layer of security to your accounts.\n\n\n**If you suspect your personal data or financial information has been compromised:**\n\n* **Contact your bank and credit card companies immediately.**  Report any suspicious transactions and consider placing a fraud alert on your accounts.\n* **Consider credit monitoring services.**  This can help you detect and respond to identity theft.\n\n\nThe severity of the remediation steps depends on the nature of the malicious email and what actions you took in response to it. If you're unsure about any step, err on the side of caution and seek professional help.\n"
          }
        ]
      },
      "finishReason": "STOP",
      "avgLogprobs": -0.4171245741660307
    }
  ],
  "usageMetadata": {
    "promptTokenCount": 12,
    "candidatesTokenCount": 778,
    "totalTokenCount": 790
  },
  "modelVersion": "gemini-1.5-flash-002",
"Text_context": ""
"extracted_info": ""
}
输出消息

执行提示操作可以返回以下输出消息:

输出消息 消息说明
Successfully executed a prompt. 操作成功。
Error executing action "Execute Prompt". Reason: ERROR_REASON

操作失败。

检查与服务器的连接、输入参数或凭据。

脚本结果

下表列出了使用 Execute Prompt 操作时脚本结果输出的值:

脚本结果名称
is_success TrueFalse

Ping

使用 Ping 操作测试与 Vertex AI 的连接。

此操作不适用于 Google SecOps 实体。

操作输入

无。

操作输出

Ping 操作提供以下输出:

操作输出类型 可用性
案例墙附件 不可用
案例墙链接 不可用
“支持请求墙”表格 不可用
丰富化表 不可用
JSON 结果 不可用
输出消息 可用
脚本结果 可用
输出消息

Ping 操作可以返回以下输出消息:

输出消息 消息说明
Successfully connected to Vertex AI with the provided connection parameters! 操作成功。

Failed to connect to Vertex AI. The API root that you provided doesn't match the following expected pattern: "https://((\w|-)+)-aiplatform.googleapis.com". Check the spelling.

Failed to connect to Vertex AI! The error is ERROR_REASON

操作失败。

检查与服务器的连接、输入参数或凭据。

脚本结果

下表列出了使用 Ping 操作时脚本结果输出的值:

脚本结果名称
is_success TrueFalse

转换数据

使用 Transform Data 操作通过 Vertex AI 执行数据转换。

此操作不适用于 Google SecOps 实体。

操作输入

转换数据操作需要以下参数:

参数 说明
Model ID 可选

要使用的模型的 ID,例如 gemini-1.5-flash-002

Text Prompt 必需

要包含在提示中的文本说明。

Temperature 可选

用于控制 token 选择的随机程度的值。此形参接受 float 数据类型的值。

如需详细了解温度值,请参阅使用参数值进行实验

JSON Object 必需

要用作操作输入的 JSON 对象。

Max Output Tokens 必需

每个回答中可生成的输出 token 数量上限。

词元约为 4 个字符。100 个 token 大约对应 60-80 个字词。此限制适用于每个实体。

如需了解详情,请参阅使用参数值进行实验

默认值为 100

操作输出

转换数据操作可提供以下输出:

操作输出类型 可用性
案例墙附件 不可用
案例墙链接 不可用
“支持请求墙”表格 不可用
丰富化表 不可用
JSON 结果 可用
输出消息 可用
脚本结果 可用
JSON 结果

以下示例展示了使用转换数据操作时收到的 JSON 结果输出:

{
  "candidates": [
    {
      "content": {
        "role": "model",
        "parts": [
          {
            "text": "Respondo it. If you're unsure about any step, err on the side of caution and seek professional help.\n"
          }
        ]
      },
      "finishReason": "STOP",
      "avgLogprobs": -0.4171245741660307
    }
  ],
  "usageMetadata": {
    "promptTokenCount": 12,
    "candidatesTokenCount": 778,
    "totalTokenCount": 790
  },
  "modelVersion": "gemini-1.5-flash-002",
"Text_context": ""
"extracted_info": ""
}
输出消息

转换数据操作可以返回以下输出消息:

输出消息 消息说明
Successfully transformed provided data. 操作成功。
Error executing action "Transform Data". Reason: ERROR_REASON

操作失败。

检查与服务器的连接、输入参数或凭据。

脚本结果

下表列出了使用转换数据操作时脚本结果输出的值:

脚本结果名称
is_success TrueFalse

需要更多帮助?从社区成员和 Google SecOps 专业人士那里获得解答。