本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
使用 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 policy 来限制使用 BatchUpdateFindings
来更新字段和字段值。
在限制访问 BatchUpdateFindings
的语句中,使用以下值:
-
Action
是securityhub:BatchUpdateFindings
-
Effect
是Deny
-
对于
Condition
,您可以根据以下条件拒绝BatchUpdateFindings
请求:-
调查发现包括一个特定的字段。
-
调查发现包括一个特定的字段值。
-
条件键
这些是限制访问 BatchUpdateFindings
的条件键。
- ASFF 字段
-
ASFF 字段的条件键如下所示:
securityhub:ASFFSyntaxPath/
<fieldName>
替换为 ASFF 字段。配置访问<fieldName>
BatchUpdateFindings
权限时,请在 IAM policy 中包含一个或多个特定的 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"