本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
使用 BatchUpdateFindings 更新结果
该BatchUpdateFindings
操作用于更新与客户处理寻找提供商的调查结果相关的信息。它可以由客户使用,也可以由代表客户使用的 SIEM、票务、事件管理或 SOAR 工具使用。您可以使用BatchUpdateFindings
更新Amazon安全结果格式 (ASFF) 中的特定字段。
您不能使用BatchUpdateFindings
来创建新发现。您可以使用它一次更新多达 100 个调查结果。
每当 Security Hub 收到更新调查结果的BatchUpdateFindings
请求时,它都会自动在亚马逊中生成一个Security Hub Findings - Imported事件 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>
替换
为 ASFF 字段。配置访问权限时<fieldName>
BatchUpdateFindings
,请在 IAM 策略中包含一个或多个特定的 ASFF 字段,而不是父级字段。例如,要限制对该Workflow.Status
字段的访问权限,您必须在策略securityhub:ASFFSyntaxPath/Workflow.Status
中包含而不是Workflow
父级字段。
不允许对字段进行所有更新
要防止用户对特定字段进行任何更新,请使用如下条件:
"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": { "StringEquals": { "securityhub:ASFFSyntaxPath/<fieldName>": [ "
<fieldValue1>
", "<fieldValue2>
", "<fieldValuen>
" ] } }
例如,以下语句表示BatchUpdateFindings
不能用于设置Workflow.Status
为RESOLVED
或SUPPRESSED
。
{ "Sid": "VisualEditor0", "Effect": "Deny", "Action": "securityhub:BatchUpdateFindings", "Resource": "*", "Condition": { "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 格式或快捷方式格式。
以下是使用 JSON 格式更新Note
对象的示例:
--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"