使用 BatchImportFindings 建立和更新問題清單 - AWS Security Hub

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

使用 BatchImportFindings 建立和更新問題清單

尋找提供者會使用此BatchImportFindingsAPI作業來建立新發現項目,並更新所建立之發現項目的相關資訊。問題清單提供者無法更新其未建立的問題清單。

客戶,SIEMs, 票務工具, 和SOAR工具使用,BatchUpdateFindings使有關他們的調查,從尋找供應商的調查更新. 請參閱使用 BatchUpdateFindings 更新問題清單

每當 AWS Security Hub 收到創建或更新發現的BatchImportFindings請求時,它都會自動在 Amazon 中生成Security Hub Findings - Imported事件 EventBridge。請參閱自動化回應與補救

帳戶和批次大小的要求

BatchImportFindings必須由下列其中一項呼叫:

  • 與發現項目相關聯的帳戶。關聯帳戶的識別碼是發現項目AwsAccountId屬性的值。

  • 允許列出正式 Security Hub 合作夥伴整合的帳戶。

Security Hub 只能接受針對已啟用 Security Hub 的帳戶尋找更新。同時也必須啟用問題清單提供者。如果 Security Hub 停用,或未啟用尋找項目提供者整合,則會在FailedFindings清單中傳回發現項目,並顯示錯InvalidAccess誤。

BatchImportFindings每個批次最多可接受 100 個發現項目,每個搜尋結果最多可接受 240 KB,每個批次最多可接受 6 MB 的發現項目。每個區域的TPS每個帳號的節流率上限為 10,爆發為 30 TPS。

決定是要建立或更新問題清單

若要判斷是否要建立或更新發現項目,Security Hub 會檢查ID欄位。如果 ID 的值與現有問題清單不相符,則會建立新的問題清單。

如果ID不符合現有的發現項目,則 Security Hub 會檢查更新的UpdatedAt欄位。

  • 如果UpdatedAt在更新上與現有發現項目相符或之前UpdatedAt發生,則會忽略更新。

  • 如果更新上的 UpdatedAt 在現有問題清單上的 UpdatedAt 之後發生,則會更新現有問題清單。

的受限屬性 BatchImportFindings

針對現有的發現項目,尋找提供者無法使用BatchImportFindings來更新下列屬性和物件。這些屬性只能使用更新BatchUpdateFindings

  • Note

  • UserDefinedFields

  • VerificationState

  • Workflow

Security Hub 會忽略這些屬性和物件的BatchImportFindings要求中提供的任何內容。客戶或其他代表他們行事的供應商會用BatchUpdateFindings來更新他們。

使用 FindingProviderFields

尋找提供者也不應使用BatchImportFindings來更新下列屬性。

  • Confidence

  • Criticality

  • RelatedFindings

  • Severity

  • Types

相反地,尋找提供者會使用FindingProviderFields物件來提供這些屬性的值。

範例

"FindingProviderFields": { "Confidence": 42, "Criticality": 99, "RelatedFindings":[ { "ProductArn": "arn:aws:securityhub:us-west-2::product/aws/guardduty", "Id": "123e4567-e89b-12d3-a456-426655440000" } ], "Severity": { "Label": "MEDIUM", "Original": "MEDIUM" }, "Types": [ "Software and Configuration Checks/Vulnerabilities/CVE" ] }

對於BatchImportFindings請求,Security Hub 處理頂層屬性中的值,FindingProviderFields如下所示。

(偏好) 在中BatchImportFindings提供屬性的值 FindingProviderFields,但不提供對應頂層屬性的值。

例如,BatchImportFindings提供FindingProviderFields.Confidence,但不提供Confidence。這是BatchImportFindings請求的首選選項。

安全中心會更新中的屬性值FindingProviderFields

只有當屬性尚未更新時,它才會將值複製到頂層屬性。BatchUpdateFindings

BatchImportFindings提供頂層屬性的值,但不提供中對應屬性的值FindingProviderFields

例如,BatchImportFindings提供Confidence,但不提供FindingProviderFields.Confidence

Security Hub 使用值來更新中的屬性FindingProviderFields。它會覆寫任何現有的值。

只有當屬性尚未由更新時,Security Hub 才會更新頂層屬性BatchUpdateFindings

BatchImportFindings提供最上層屬性和中對應屬性的值FindingProviderFields

例如,同時BatchImportFindings提供ConfidenceFindingProviderFields.Confidence

對於新發現項目,Security Hub 會使用中的值FindingProviderFields來填入中的最上層屬性和對應屬性FindingProviderFields。它不使用提供的頂級屬性值。

對於現有的發現項目,Security Hub 會使用這兩個值。但是,只有當屬性尚未由更新時,它才會更新頂層屬性值BatchUpdateFindings

使用來自的batch-import-findings命令 AWS CLI

在中 AWS Command Line Interface,您可以使用命batch-import-findings令來建立或更新發現項目。

您可以將每個發現項目提供為JSON物件。

範例

aws securityhub batch-import-findings --findings [{ "AwsAccountId": "123456789012", "CreatedAt": "2019-08-07T17:05:54.832Z", "Description": "Vulnerability in a CloudTrail trail", "GeneratorId": "arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0/rule/2.2", "Id": "Id1", "ProductArn": "arn:aws:securityhub:us-west-1:123456789012:product/123456789012/default", "Resources": [ { "Id": "arn:aws:cloudtrail:us-west-1:123456789012:trail/TrailName", "Partition": "aws", "Region": "us-west-1", "Type": "AwsCloudTrailTrail" } ], "SchemaVersion": "2018-10-08", "Title": "CloudTrail trail vulnerability", "UpdatedAt": "2020-06-02T16:05:54.832Z", "Types": [ "Software and Configuration Checks/Vulnerabilities/CVE" ], "Severity": { "Label": "INFORMATIONAL", "Original": "0" } }]'