检索查找详情(Security Hub API,Amazon CLI) - Amazon Security Hub
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

检索查找详情(Security Hub API,Amazon CLI)

要以编程方式检索选定发现的详细信息,您可以使用 API 调用或Amazon Command Line Interface。

请注意,当您按CompanyName或筛选时ProductName,Security Hub 使用中的值ProductFields。它不使用顶级CompanyNameProductName字段。

检索结果的列表(Security Hub API,Amazon CLI)
  • Security Hub API-使用 GetFindingsAPI 操作。

  • Amazon CLI— 在命令行运行get-findings命令。

    get-findings --filters <filter criteria JSON> --sort-criteria <sort criteria> --page-size <findings per page> --max-items <maximum number of results>

    示例

    aws securityhub get-findings --filters '{"GeneratorId":[{"Value": "aws-foundational","Comparison":"PREFIX"}],"WorkflowStatus": [{"Value": "NEW","Comparison":"EQUALS"}],"Confidence": [{"Gte": 85}]}' --sort-criteria '{"Field": "LastObservedAt","SortOrder": "desc"}' --page-size 5 --max-items 100