本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
使用 BatchUpdateFindings 更新结果
BatchUpdateFindings用于更新与客户处理来自查找提供商的调查结果相关的信息。它可以由客户使用,也可以由代表客户工作的 SIEM、票证、事件管理或 SOAR 工具使用。BatchUpdateFindings不能用于创建新发现。它可以用来一次更新多达 100 个结果。
每当Security Hub 收到一个BatchUpdateFindings请求更新调查结果,它会自动生成一个Security Hub Findings - ImportedAmazon 事件 EventBridge. 请参阅 自动响应和补救。
BatchUpdateFindings 不会更改结果的 UpdatedAt 字段。UpdatedAt 仅反映来自结果提供商的最新更新。
的可用字段BatchUpdateFindings
管理员帐户可以使用BatchUpdateFindings更新其账户或其成员账户的调查结果。成员账户可以使用BatchUpdateFindings更新其账户的调查结果。
客户只能使用BatchUpdateFindings更新以下字段和对象。
-
Confidence -
Criticality -
Note -
RelatedFindings -
Severity -
Types -
UserDefinedFields -
VerificationState -
Workflow
默认情况下,管理员和成员帐户有权访问上述所有字段和字段值。Security Hub 还提供上下文密钥,允许您限制对字段和字段值的访问。
例如,您可能只允许成员账户设置Workflow.Status到RESOLVED. 或者你可能不想允许更改成员账户Severity.Label.
配置访问权限BatchUpdateFindings
您可以配置 IAM 策略以限制访问BatchUpdateFindings更新字段和字段值。
在限制访问的声明中BatchUpdateFindings,使用以下值。
-
Action是securityhub:BatchUpdateFindings -
Effect是Deny -
对于
Condition,你可以拒绝BatchUpdateFindings请求基于以下内容:-
该发现包括一个特定的字段。
-
该发现包括一个特定的字段值。
-
条件键
这些是限制访问权限的条件键BatchUpdateFindings.
- ASFF 字段
-
ASFF 字段的条件键如下所示。
securityhub:ASFFSyntaxPath/<fieldName>Replace(替换)
使用 ASFF 字段。<fieldName>例如,限制对
Workflow.Status字段,使用securityhub:ASFFSyntaxPath/Workflow.Status.
不允许对某个字段进行所有更新
要防止用户对特定字段进行任何更新,请使用如下条件:
"Condition": { "Null": { "securityhub:ASFFSyntaxPath/<fieldName>": "false" } }
例如,以下语句表明BatchUpdateFindings不能用于更新工作流状态。
{ "Sid": "VisualEditor0", "Effect": "Deny", "Action": "securityhub:BatchUpdateFindings", "Resource": "*", "Condition": { "Null": { "securityhub:ASFFSyntaxPath/Workflow.Status": "false" } } }
不允许特定字段值
要防止用户将字段设置为特定值,请使用如下条件:
"Condition": { "StringEquals": { "securityhub:ASFFSyntaxPath/<fieldName>": "<fieldValue>" } }
例如,以下语句表明BatchUpdateFindings不能用于设置Workflow.Status到SUPPRESSED.
{ "Sid": "VisualEditor0", "Effect": "Deny", "Action": "securityhub:BatchUpdateFindings", "Resource": "*", "Condition": { "StringEquals": { "securityhub:ASFFSyntaxPath/Workflow.Status": "SUPPRESSED" } }
您还可以提供不允许的值列表。
"Condition": { "ForAnyValue:StringEquals": { "securityhub:ASFFSyntaxPath/<fieldName>": [ "<fieldValue1>", "<fieldValue2>", "<fieldValuen>" ] } }
例如,以下语句表明BatchUpdateFindings不能用于设置Workflow.Status或者RESOLVED要么SUPPRESSED.
{ "Sid": "VisualEditor0", "Effect": "Deny", "Action": "securityhub:BatchUpdateFindings", "Resource": "*", "Condition": { "ForAnyValue:StringEquals": { "securityhub:ASFFSyntaxPath/Workflow.Status": [ "RESOLVED", "NOTIFIED" ] } }
使用 batch-update-findings命令来自Amazon CLI
在里面Amazon Command Line Interface,您将batch-update-findings命令来更新调查结果。
对于要更新的每个调查结果,您需要提供调查结果 ID 和生成调查结果的产品的 ARN。
--finding-identifiers ID="<findingID1>",ProductArn="<productARN>" ID="<findingID2>",ProductArn="<productARN2>"
当您提供要更新的属性时,可以使用 JSON 格式或快捷方式格式。
以下为更新示例Note使用 JSON 格式的对象:
--note '{"Text": "Known issue that is not a risk.", "UpdatedBy": "user1"}'
以下是使用快捷方式格式的相同更新:
--note Text="Known issue that is not a risk.",UpdatedBy="user1"
这些区域有:Amazon CLI命令参考为每个字段提供 JSON 和快捷方式语法。
以下batch-update-findings示例更新了两个发现结果以添加注释、更改严重性标签并解决这些问题。
aws securityhub batch-update-findings --finding-identifiers Id="arn:aws:securityhub:us-west-1:123456789012:subscription/pci-dss/v/3.2.1/PCI.Lambda.2/finding/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",ProductArn="arn:aws:securityhub:us-west-2::product/aws/securityhub" Id="arn:aws:securityhub:us-west-1:123456789012:subscription/pci-dss/v/3.2.1/PCI.Lambda.2/finding/a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",ProductArn="arn:aws:securityhub:us-west-1::product/aws/securityhub" --note '{"Text": "Known issue that is not a risk.", "UpdatedBy": "user1"}' --severity '{"Label": "LOW"}' --workflow '{"Status": "RESOLVED"}'
这是相同的示例,但使用快捷方式而不是 JSON。
aws securityhub batch-update-findings --finding-identifiers Id="arn:aws:securityhub:us-west-1:123456789012:subscription/pci-dss/v/3.2.1/PCI.Lambda.2/finding/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",ProductArn="arn:aws:securityhub:us-west-1::product/aws/securityhub" Id="arn:aws:securityhub:us-west-1:123456789012:subscription/pci-dss/v/3.2.1/PCI.Lambda.2/finding/a1b2c3d4-5678-90ab-cdef-EXAMPLE22222",ProductArn="arn:aws:securityhub:us-west-1::product/aws/securityhub" --note Text="Known issue that is not a risk.",UpdatedBy="user1" --severity Label="LOW" --workflow Status="RESOLVED"