AWS Security Hubにて統合されたコントロールの検出結果の設定切り替え時に、抑制済みにしていたWorkflowStatusがNEWになったのでなぜ再評価されたか調べました

2023.10.17

こんにちはカスタマーソリューション部のこーへいです!

今回はAWS Security Hub(以降Security Hub)の設定の一つである「統合されたコントロールの検出結果」の設定切り替え時に、WorkflowStatus(以降ワークフローステータス)が抑制済みにしていたものがNEWになっていたため、なぜ再評価されたか調べ分かったことを共有します。

Security Hubとは

AWS Security Hubのメイン機能としては、「セキュリティ基準機能」と呼ばれるものが挙げられます。これは、Cloud Security Posture Management(CSPM)に相当するサービスで、「AWSリソースのセキュリティ設定がベストプラクティスから逸脱していないか」を自動でチェックします。

【初心者向け】AWS Security Hubとは?概要からメリット、料金まで解説より引用

上記の説明が分かりやすく、Security HubはAWSアカウント内に存在する危険な設定があった場合にユーザーにお知らせしてくれます。

例えばS3バケットが意図せずパブリック公開されていると、Security Hubがその状態を検知しユーザーに教えてくれるので、それに対してパブリック公開の設定を是正することで脅威イベントを未然に防ぐことが可能です。

発生した事象

元々、統合されたコントロールの検出結果がオフの状態でSecurity Hubを利用していたのですが、先日オン状態に切り替える作業を行いました。

すると、失敗を抑制しているワークフローステータス(コントロール項目「S3.13」のとあるS3バケット)にて、抑制済みステータスが外れてしまい、失敗状態になっていることに気が付きました。

他の抑制していたワークフローステータスも失敗になっていたことを確認したので、内部の仕組みを調査し、理解してみようという流れです。

先に結論

  • 検出結果にはそれぞれ固有のIdが割り振られており、そのId毎にワークフローステータスの状態が紐づいている
  • 統合されたコントロールの検出結果の設定を切り替えると、新規で検出結果が作成され別Idとなってしまうため、抑制済みステータスが外れる(新規で評価される)
  • 設定をオフ→オン→オフやオン→オフ→オンでIdを確認すると1回目と2回目のオフ(オン)のIdは同じだった(新規で検出結果が作成されておらずワークフローステータスも元に戻る)
    • 今回の場合だとオフ→オン→オフにした際は、オン状態だと抑制済みが外れてしまいましたが、再びオフにすると抑制済みに戻りました
  • 【おまけ検証】コントロール項目自体を無効化していた場合は、設定を切り替えても新たに検出結果が作成されない
    • コントロール項目自体のステータスはセキュリティ基準に紐づいているため

見てみる

流れとしては統合されたコントロールの検出結果をオフ→オン→オフ→オンと2回ずつ繰り返し、その都度ワークフローの検出結果をダウンロードしました。

2回ずつ行うことで、1回目のオフ(オン)と2回目のオフ(オン)にてIdが同じなのかそれとも別Idとして新規で検出結果が作成されるのか、そしてワークフローステータスはIdに紐づいているのか確認することができます。

確認対象

少しわかりにくいですが、上記の画像のように統合されたコントロールの検出結果の設定をオフ・オン2回ずつの状態で、以下の検出結果を確認します。

  • 統合されたコントロールの検出結果の設定がオフ状態にアクティブになる検出結果(=統合されたコントロールの検出結果の設定がオン状態にアーカイブされる検出結果)
  • 統合されたコントロールの検出結果の設定がオン状態にアクティブになる検出結果(=統合されたコントロールの検出結果の設定がオフ状態にアーカイブされる検出結果)

今回の場合は、コントロール項目S3.13のとあるS3バケットの検出結果を対象としていますが、統合されたコントロールの検出結果のオフ・オンそれぞれに検出結果が作成される(そして設定毎にアーカイブされたりアクティブになったりする)ので両方確認します。

※私の不手際で1回目の統合されたコントロールの検出結果のオン時のアーカイブ側の検出結果を取得するのを忘れていましたが、結論には変わらないのでご了承ください。

やり方

左のナビゲーションバーから「検出結果」を選択することで、アーカイブ済みの検出結果も確認することができます。

各検出結果のJSONデータを確認していきます。

1回目の統合されたコントロールの検出結果のオフ時

設定がオフ状態でアクティブになる方の検出結果

※折り畳みの中に実際の検出結果のデータが記載されています

アクティブ側の検出結果(JSON)
{
  "SchemaVersion": "2018-10-08",
  "Id": "arn:aws:securityhub:ap-northeast-1:xxxxxxxxxxxx:subscription/aws-foundational-security-best-practices/v/1.0.0/S3.13/finding/xxxxxxxx-xxxx-xxxx-xxxx-xxxxx876e581",
  "ProductArn": "arn:aws:securityhub:ap-northeast-1::product/aws/securityhub",
  "ProductName": "Security Hub",
  "CompanyName": "AWS",
  "Region": "ap-northeast-1",
  "GeneratorId": "aws-foundational-security-best-practices/v/1.0.0/S3.13",
  "AwsAccountId": "xxxxxxxxxxxx",
  "Types": [
    "Software and Configuration Checks/Industry and Regulatory Standards/AWS-Foundational-Security-Best-Practices"
  ],
  "FirstObservedAt": "2023-06-14T18:04:19.638Z",
  "LastObservedAt": "2023-10-13T00:04:19.757Z",
  "CreatedAt": "2023-06-14T18:04:19.638Z",
  "UpdatedAt": "2023-10-13T00:04:12.268Z",
  "Severity": {
    "Product": 1,
    "Label": "LOW",
    "Normalized": 1,
    "Original": "LOW"
  },
  "Title": "S3.13 S3 buckets should have lifecycle policies configured",
  "Description": "This control checks if a lifecycle policy is configured for an S3 bucket. This control fails if the lifecycle policy is not configured for an S3 bucket.",
  "Remediation": {
    "Recommendation": {
      "Text": "For information on how to correct this issue, consult the AWS Security Hub controls documentation.",
      "Url": "https://docs.aws.amazon.com/console/securityhub/S3.13/remediation"
    }
  },
  "ProductFields": {
    "StandardsArn": "arn:aws:securityhub:::standards/aws-foundational-security-best-practices/v/1.0.0",
    "StandardsSubscriptionArn": "arn:aws:securityhub:ap-northeast-1:xxxxxxxxxxxx:subscription/aws-foundational-security-best-practices/v/1.0.0",
    "ControlId": "S3.13",
    "RecommendationUrl": "https://docs.aws.amazon.com/console/securityhub/S3.13/remediation",
    "RelatedAWSResources:0/name": "securityhub-s3-lifecycle-policy-check-107cb694",
    "RelatedAWSResources:0/type": "AWS::Config::ConfigRule",
    "StandardsControlArn": "arn:aws:securityhub:ap-northeast-1:xxxxxxxxxxxx:control/aws-foundational-security-best-practices/v/1.0.0/S3.13",
    "aws/securityhub/ProductName": "Security Hub",
    "aws/securityhub/CompanyName": "AWS",
    "aws/securityhub/annotation": "Found no bucket lifecycle configuration rules.",
    "Resources:0/Id": "arn:aws:s3:::バケット名",
    "aws/securityhub/FindingId": "arn:aws:securityhub:ap-northeast-1::product/aws/securityhub/arn:aws:securityhub:ap-northeast-1:xxxxxxxxxxxx:subscription/aws-foundational-security-best-practices/v/1.0.0/S3.13/finding/xxxxxxxx-xxxx-xxxx-xxxx-xxxxx876e581"
  },
  "Resources": [
    {
      "Type": "AwsS3Bucket",
      "Id": "arn:aws:s3:::バケット名",
      "Partition": "aws",
      "Region": "ap-northeast-1",
      "Details": {
        "AwsS3Bucket": {
          "OwnerId": "xxxx",
          "CreatedAt": "2023-06-09T07:57:18.000Z"
        }
      }
    }
  ],
  "Compliance": {
    "Status": "FAILED",
    "SecurityControlId": "S3.13",
    "AssociatedStandards": [
      {
        "StandardsId": "standards/aws-foundational-security-best-practices/v/1.0.0"
      }
    ]
  },
  "WorkflowState": "NEW",
  "Workflow": {
    "Status": "SUPPRESSED"
  },
  "RecordState": "ACTIVE",
  "FindingProviderFields": {
    "Severity": {
      "Label": "LOW",
      "Original": "LOW"
    },
    "Types": [
      "Software and Configuration Checks/Industry and Regulatory Standards/AWS-Foundational-Security-Best-Practices"
    ]
  },
  "ProcessedAt": "2023-10-13T00:04:22.856Z"
}

設定がオフ状態でアーカイブになる方の検出結果

この時点では統合されたコントロールの検出結果をオンにしたことがないので、検出結果は作成されておらずスキップです。

1回目の統合されたコントロールの検出結果のオン時

設定がオン状態でアーカイブになる方の検出結果

結果の取得を忘れていました。申し訳ございません。

設定がオン状態でアクティブになる方の検出結果

アクティブ側の検出結果(JSON)
{
  "SchemaVersion": "2018-10-08",
  "Id": "arn:aws:securityhub:ap-northeast-1:xxxxxxxxxxxx:security-control/S3.13/finding/xxxxxxxx-xxxx-xxxx-xxxx-xxxxx55889a4",
  "ProductArn": "arn:aws:securityhub:ap-northeast-1::product/aws/securityhub",
  "ProductName": "Security Hub",
  "CompanyName": "AWS",
  "Region": "ap-northeast-1",
  "GeneratorId": "security-control/S3.13",
  "AwsAccountId": "xxxxxxxxxxxx",
  "Types": [
    "Software and Configuration Checks/Industry and Regulatory Standards"
  ],
  "FirstObservedAt": "2023-10-10T18:04:09.758Z",
  "LastObservedAt": "2023-10-11T12:04:23.347Z",
  "CreatedAt": "2023-10-10T18:04:09.758Z",
  "UpdatedAt": "2023-10-11T12:04:15.163Z",
  "Severity": {
    "Label": "LOW",
    "Normalized": 1,
    "Original": "LOW"
  },
  "Title": "S3 buckets should have lifecycle policies configured",
  "Description": "This control checks if a lifecycle policy is configured for an S3 bucket. This control fails if the lifecycle policy is not configured for an S3 bucket.",
  "Remediation": {
    "Recommendation": {
      "Text": "For information on how to correct this issue, consult the AWS Security Hub controls documentation.",
      "Url": "https://docs.aws.amazon.com/console/securityhub/S3.13/remediation"
    }
  },
  "ProductFields": {
    "RelatedAWSResources:0/name": "securityhub-s3-lifecycle-policy-check-107cb694",
    "RelatedAWSResources:0/type": "AWS::Config::ConfigRule",
    "aws/securityhub/ProductName": "Security Hub",
    "aws/securityhub/CompanyName": "AWS",
    "aws/securityhub/annotation": "Found no bucket lifecycle configuration rules.",
    "Resources:0/Id": "arn:aws:s3:::バケット名",
    "aws/securityhub/FindingId": "arn:aws:securityhub:ap-northeast-1::product/aws/securityhub/arn:aws:securityhub:ap-northeast-1:xxxxxxxxxxxx:security-control/S3.13/finding/xxxxxxxx-xxxx-xxxx-xxxx-xxxxx55889a4"
  },
  "Resources": [
    {
      "Type": "AwsS3Bucket",
      "Id": "arn:aws:s3:::バケット名",
      "Partition": "aws",
      "Region": "ap-northeast-1",
      "Details": {
        "AwsS3Bucket": {
          "OwnerId": "xxxx",
          "CreatedAt": "2023-06-09T07:57:18.000Z"
        }
      }
    }
  ],
  "Compliance": {
    "Status": "FAILED",
    "SecurityControlId": "S3.13",
    "AssociatedStandards": [
      {
        "StandardsId": "standards/aws-foundational-security-best-practices/v/1.0.0"
      }
    ]
  },
  "WorkflowState": "NEW",
  "Workflow": {
    "Status": "NEW"
  },
  "RecordState": "ACTIVE",
  "FindingProviderFields": {
    "Severity": {
      "Label": "LOW",
      "Original": "LOW"
    },
    "Types": [
      "Software and Configuration Checks/Industry and Regulatory Standards"
    ]
  },
  "ProcessedAt": "2023-10-11T12:04:25.092Z"
}

2回目の統合されたコントロールの検出結果のオフ時

設定がオフ状態でアクティブになる方の検出結果

アクティブ側の検出結果(JSON)
{
  "SchemaVersion": "2018-10-08",
  "Id": "arn:aws:securityhub:ap-northeast-1:xxxxxxxxxxxx:subscription/aws-foundational-security-best-practices/v/1.0.0/S3.13/finding/xxxxxxxx-xxxx-xxxx-xxxx-xxxxx876e581",
  "ProductArn": "arn:aws:securityhub:ap-northeast-1::product/aws/securityhub",
  "ProductName": "Security Hub",
  "CompanyName": "AWS",
  "Region": "ap-northeast-1",
  "GeneratorId": "aws-foundational-security-best-practices/v/1.0.0/S3.13",
  "AwsAccountId": "xxxxxxxxxxxx",
  "Types": [
    "Software and Configuration Checks/Industry and Regulatory Standards/AWS-Foundational-Security-Best-Practices"
  ],
  "FirstObservedAt": "2023-06-14T18:04:19.638Z",
  "LastObservedAt": "2023-10-15T02:21:40.473Z",
  "CreatedAt": "2023-06-14T18:04:19.638Z",
  "UpdatedAt": "2023-10-15T02:21:26.293Z",
  "Severity": {
    "Product": 1,
    "Label": "LOW",
    "Normalized": 1,
    "Original": "LOW"
  },
  "Title": "S3.13 S3 buckets should have lifecycle policies configured",
  "Description": "This control checks if a lifecycle policy is configured for an S3 bucket. This control fails if the lifecycle policy is not configured for an S3 bucket.",
  "Remediation": {
    "Recommendation": {
      "Text": "For information on how to correct this issue, consult the AWS Security Hub controls documentation.",
      "Url": "https://docs.aws.amazon.com/console/securityhub/S3.13/remediation"
    }
  },
  "ProductFields": {
    "StandardsArn": "arn:aws:securityhub:::standards/aws-foundational-security-best-practices/v/1.0.0",
    "StandardsSubscriptionArn": "arn:aws:securityhub:ap-northeast-1:xxxxxxxxxxxx:subscription/aws-foundational-security-best-practices/v/1.0.0",
    "ControlId": "S3.13",
    "RecommendationUrl": "https://docs.aws.amazon.com/console/securityhub/S3.13/remediation",
    "RelatedAWSResources:0/name": "securityhub-s3-lifecycle-policy-check-7887ec54",
    "RelatedAWSResources:0/type": "AWS::Config::ConfigRule",
    "StandardsControlArn": "arn:aws:securityhub:ap-northeast-1:xxxxxxxxxxxx:control/aws-foundational-security-best-practices/v/1.0.0/S3.13",
    "aws/securityhub/ProductName": "Security Hub",
    "aws/securityhub/CompanyName": "AWS",
    "aws/securityhub/annotation": "Found no bucket lifecycle configuration rules.",
    "Resources:0/Id": "arn:aws:s3:::バケット名",
    "aws/securityhub/FindingId": "arn:aws:securityhub:ap-northeast-1::product/aws/securityhub/arn:aws:securityhub:ap-northeast-1:xxxxxxxxxxxx:subscription/aws-foundational-security-best-practices/v/1.0.0/S3.13/finding/xxxxxxxx-xxxx-xxxx-xxxx-xxxxx876e581"
  },
  "Resources": [
    {
      "Type": "AwsS3Bucket",
      "Id": "arn:aws:s3:::バケット名",
      "Partition": "aws",
      "Region": "ap-northeast-1",
      "Details": {
        "AwsS3Bucket": {
          "OwnerId": "xxxx",
          "CreatedAt": "2023-06-09T07:57:18.000Z"
        }
      }
    }
  ],
  "Compliance": {
    "Status": "FAILED",
    "SecurityControlId": "S3.13",
    "AssociatedStandards": [
      {
        "StandardsId": "standards/aws-foundational-security-best-practices/v/1.0.0"
      }
    ]
  },
  "WorkflowState": "NEW",
  "Workflow": {
    "Status": "SUPPRESSED"
  },
  "RecordState": "ACTIVE",
  "FindingProviderFields": {
    "Severity": {
      "Label": "LOW",
      "Original": "LOW"
    },
    "Types": [
      "Software and Configuration Checks/Industry and Regulatory Standards/AWS-Foundational-Security-Best-Practices"
    ]
  },
  "ProcessedAt": "2023-10-15T02:21:44.970Z"
}

設定がオフ状態でアーカイブになる方の検出結果

アーカイブ側の検出結果(JSON)
{
  "SchemaVersion": "2018-10-08",
  "Id": "arn:aws:securityhub:ap-northeast-1:xxxxxxxxxxxx:security-control/S3.13/finding/xxxxxxxx-xxxx-xxxx-xxxx-xxxxx55889a4",
  "ProductArn": "arn:aws:securityhub:ap-northeast-1::product/aws/securityhub",
  "ProductName": "Security Hub",
  "CompanyName": "AWS",
  "Region": "ap-northeast-1",
  "GeneratorId": "security-control/S3.13",
  "AwsAccountId": "xxxxxxxxxxxx",
  "Types": [
    "Software and Configuration Checks/Industry and Regulatory Standards"
  ],
  "FirstObservedAt": "2023-10-10T18:04:09.758Z",
  "LastObservedAt": "2023-10-15T02:21:34.257Z",
  "CreatedAt": "2023-10-10T18:04:09.758Z",
  "UpdatedAt": "2023-10-15T02:21:26.314Z",
  "Severity": {
    "Label": "LOW",
    "Normalized": 1,
    "Original": "LOW"
  },
  "Title": "S3 buckets should have lifecycle policies configured",
  "Description": "This control checks if a lifecycle policy is configured for an S3 bucket. This control fails if the lifecycle policy is not configured for an S3 bucket.",
  "Remediation": {
    "Recommendation": {
      "Text": "For information on how to correct this issue, consult the AWS Security Hub controls documentation.",
      "Url": "https://docs.aws.amazon.com/console/securityhub/S3.13/remediation"
    }
  },
  "ProductFields": {
    "RelatedAWSResources:0/name": "securityhub-s3-lifecycle-policy-check-107cb694",
    "RelatedAWSResources:0/type": "AWS::Config::ConfigRule",
    "aws/securityhub/ProductName": "Security Hub",
    "aws/securityhub/CompanyName": "AWS",
    "aws/securityhub/annotation": "Found no bucket lifecycle configuration rules.",
    "Resources:0/Id": "arn:aws:s3:::バケット名",
    "ArchivalReasons:0/Description": "The finding is in an ARCHIVED state because consolidated control findings has been turned on or off. This causes findings in the previous state to be archived when new findings are being generated.",
    "ArchivalReasons:0/ReasonCode": "CONSOLIDATED_CONTROL_FINDINGS_UPDATE",
    "aws/securityhub/FindingId": "arn:aws:securityhub:ap-northeast-1::product/aws/securityhub/arn:aws:securityhub:ap-northeast-1:xxxxxxxxxxxx:security-control/S3.13/finding/xxxxxxxx-xxxx-xxxx-xxxx-xxxxx55889a4"
  },
  "Resources": [
    {
      "Type": "AwsS3Bucket",
      "Id": "arn:aws:s3:::バケット名",
      "Partition": "aws",
      "Region": "ap-northeast-1",
      "Details": {
        "AwsS3Bucket": {
          "OwnerId": "xxxx",
          "CreatedAt": "2023-06-09T07:57:18.000Z"
        }
      }
    }
  ],
  "Compliance": {
    "Status": "FAILED",
    "SecurityControlId": "S3.13",
    "AssociatedStandards": [
      {
        "StandardsId": "standards/aws-foundational-security-best-practices/v/1.0.0"
      }
    ]
  },
  "WorkflowState": "NEW",
  "Workflow": {
    "Status": "NEW"
  },
  "RecordState": "ARCHIVED",
  "FindingProviderFields": {
    "Severity": {
      "Label": "LOW",
      "Original": "LOW"
    },
    "Types": [
      "Software and Configuration Checks/Industry and Regulatory Standards"
    ]
  },
  "ProcessedAt": "2023-10-15T02:21:36.724Z"
}

2回目の統合されたコントロールの検出結果のオン時

設定がオン状態でアーカイブになる方の検出結果

アーカイブ側の検出結果(JSON)
{
  "SchemaVersion": "2018-10-08",
  "Id": "arn:aws:securityhub:ap-northeast-1:xxxxxxxxxxxx:subscription/aws-foundational-security-best-practices/v/1.0.0/S3.13/finding/xxxxxxxx-xxxx-xxxx-xxxx-xxxxx876e581",
  "ProductArn": "arn:aws:securityhub:ap-northeast-1::product/aws/securityhub",
  "ProductName": "Security Hub",
  "CompanyName": "AWS",
  "Region": "ap-northeast-1",
  "GeneratorId": "aws-foundational-security-best-practices/v/1.0.0/S3.13",
  "AwsAccountId": "xxxxxxxxxxxx",
  "Types": [
    "Software and Configuration Checks/Industry and Regulatory Standards/AWS-Foundational-Security-Best-Practices"
  ],
  "FirstObservedAt": "2023-06-14T18:04:19.638Z",
  "LastObservedAt": "2023-10-16T09:01:46.021Z",
  "CreatedAt": "2023-06-14T18:04:19.638Z",
  "UpdatedAt": "2023-10-16T09:01:38.121Z",
  "Severity": {
    "Product": 1,
    "Label": "LOW",
    "Normalized": 1,
    "Original": "LOW"
  },
  "Title": "S3.13 S3 buckets should have lifecycle policies configured",
  "Description": "This control checks if a lifecycle policy is configured for an S3 bucket. This control fails if the lifecycle policy is not configured for an S3 bucket.",
  "Remediation": {
    "Recommendation": {
      "Text": "For information on how to correct this issue, consult the AWS Security Hub controls documentation.",
      "Url": "https://docs.aws.amazon.com/console/securityhub/S3.13/remediation"
    }
  },
  "ProductFields": {
    "StandardsArn": "arn:aws:securityhub:::standards/aws-foundational-security-best-practices/v/1.0.0",
    "StandardsSubscriptionArn": "arn:aws:securityhub:ap-northeast-1:xxxxxxxxxxxx:subscription/aws-foundational-security-best-practices/v/1.0.0",
    "ControlId": "S3.13",
    "RecommendationUrl": "https://docs.aws.amazon.com/console/securityhub/S3.13/remediation",
    "RelatedAWSResources:0/name": "securityhub-s3-lifecycle-policy-check-7887ec54",
    "RelatedAWSResources:0/type": "AWS::Config::ConfigRule",
    "StandardsControlArn": "arn:aws:securityhub:ap-northeast-1:xxxxxxxxxxxx:control/aws-foundational-security-best-practices/v/1.0.0/S3.13",
    "aws/securityhub/ProductName": "Security Hub",
    "aws/securityhub/CompanyName": "AWS",
    "aws/securityhub/annotation": "Found no bucket lifecycle configuration rules.",
    "Resources:0/Id": "arn:aws:s3:::バケット名",
    "ArchivalReasons:0/Description": "The finding is in an ARCHIVED state because consolidated control findings has been turned on or off. This causes findings in the previous state to be archived when new findings are being generated.",
    "ArchivalReasons:0/ReasonCode": "CONSOLIDATED_CONTROL_FINDINGS_UPDATE",
    "aws/securityhub/FindingId": "arn:aws:securityhub:ap-northeast-1::product/aws/securityhub/arn:aws:securityhub:ap-northeast-1:xxxxxxxxxxxx:subscription/aws-foundational-security-best-practices/v/1.0.0/S3.13/finding/xxxxxxxx-xxxx-xxxx-xxxx-xxxxx876e581"
  },
  "Resources": [
    {
      "Type": "AwsS3Bucket",
      "Id": "arn:aws:s3:::バケット名",
      "Partition": "aws",
      "Region": "ap-northeast-1",
      "Details": {
        "AwsS3Bucket": {
          "OwnerId": "xxxx",
          "CreatedAt": "2023-06-09T07:57:18.000Z"
        }
      }
    }
  ],
  "Compliance": {
    "Status": "FAILED",
    "SecurityControlId": "S3.13",
    "AssociatedStandards": [
      {
        "StandardsId": "standards/aws-foundational-security-best-practices/v/1.0.0"
      }
    ]
  },
  "WorkflowState": "NEW",
  "Workflow": {
    "Status": "SUPPRESSED"
  },
  "RecordState": "ARCHIVED",
  "FindingProviderFields": {
    "Severity": {
      "Label": "LOW",
      "Original": "LOW"
    },
    "Types": [
      "Software and Configuration Checks/Industry and Regulatory Standards/AWS-Foundational-Security-Best-Practices"
    ]
  },
  "ProcessedAt": "2023-10-16T09:01:50.559Z"
}

設定がオン状態でアクティブになる方の検出結果

アクティブ側の検出結果(JSON)
{
  "SchemaVersion": "2018-10-08",
  "Id": "arn:aws:securityhub:ap-northeast-1:xxxxxxxxxxxx:security-control/S3.13/finding/xxxxxxxx-xxxx-xxxx-xxxx-xxxxx55889a4",
  "ProductArn": "arn:aws:securityhub:ap-northeast-1::product/aws/securityhub",
  "ProductName": "Security Hub",
  "CompanyName": "AWS",
  "Region": "ap-northeast-1",
  "GeneratorId": "security-control/S3.13",
  "AwsAccountId": "xxxxxxxxxxxx",
  "Types": [
    "Software and Configuration Checks/Industry and Regulatory Standards"
  ],
  "FirstObservedAt": "2023-10-10T18:04:09.758Z",
  "LastObservedAt": "2023-10-16T09:01:42.260Z",
  "CreatedAt": "2023-10-10T18:04:09.758Z",
  "UpdatedAt": "2023-10-16T09:01:38.086Z",
  "Severity": {
    "Label": "LOW",
    "Normalized": 1,
    "Original": "LOW"
  },
  "Title": "S3 buckets should have lifecycle policies configured",
  "Description": "This control checks if a lifecycle policy is configured for an S3 bucket. This control fails if the lifecycle policy is not configured for an S3 bucket.",
  "Remediation": {
    "Recommendation": {
      "Text": "For information on how to correct this issue, consult the AWS Security Hub controls documentation.",
      "Url": "https://docs.aws.amazon.com/console/securityhub/S3.13/remediation"
    }
  },
  "ProductFields": {
    "RelatedAWSResources:0/name": "securityhub-s3-lifecycle-policy-check-284a898f",
    "RelatedAWSResources:0/type": "AWS::Config::ConfigRule",
    "aws/securityhub/ProductName": "Security Hub",
    "aws/securityhub/CompanyName": "AWS",
    "aws/securityhub/annotation": "Found no bucket lifecycle configuration rules.",
    "Resources:0/Id": "arn:aws:s3:::バケット名",
    "aws/securityhub/FindingId": "arn:aws:securityhub:ap-northeast-1::product/aws/securityhub/arn:aws:securityhub:ap-northeast-1:xxxxxxxxxxxx:security-control/S3.13/finding/xxxxxxxx-xxxx-xxxx-xxxx-xxxxx55889a4"
  },
  "Resources": [
    {
      "Type": "AwsS3Bucket",
      "Id": "arn:aws:s3:::バケット名",
      "Partition": "aws",
      "Region": "ap-northeast-1",
      "Details": {
        "AwsS3Bucket": {
          "OwnerId": "xxxx",
          "CreatedAt": "2023-06-09T07:57:18.000Z"
        }
      }
    }
  ],
  "Compliance": {
    "Status": "FAILED",
    "SecurityControlId": "S3.13",
    "AssociatedStandards": [
      {
        "StandardsId": "standards/aws-foundational-security-best-practices/v/1.0.0"
      }
    ]
  },
  "WorkflowState": "NEW",
  "Workflow": {
    "Status": "NEW"
  },
  "RecordState": "ACTIVE",
  "FindingProviderFields": {
    "Severity": {
      "Label": "LOW",
      "Original": "LOW"
    },
    "Types": [
      "Software and Configuration Checks/Industry and Regulatory Standards"
    ]
  },
  "ProcessedAt": "2023-10-16T09:01:44.267Z"
}

結果

1.検出結果にはそれぞれ固有のIdが割り振られており、そのId毎にワークフローステータスの状態が紐づいている

  "WorkflowState": "NEW",
  "Workflow": {
    "Status": "SUPPRESSED"
  },

統合されたコントロールの検出結果を複数回切り替えても、Idが同じであれば検出結果のステータスが変更されることはありませんでした。

今回の場合だと、統合されたコントロールの検出結果の設定がオフの状態にアクティブになる検出結果のワークフローステータスはいずれの検証段階でも「SUPPRESSED」を保持し続けていました(JSONファイルをご確認いただけるとわかります)。

2.統合されたコントロールの検出結果の設定を切り替えると、新規で検出結果が作成され別Idとなってしまう

統合されたコントロールの検出結果の設定がオフ状態にアクティブになる検出結果(=統合されたコントロールの検出結果の設定がオン状態にアーカイブされる検出結果)のId

"Id": "arn:aws:securityhub:ap-northeast-1:xxxxxxxxxxxx:subscription/aws-foundational-security-best-practices/v/1.0.0/S3.13/finding/xxxxxxxx-xxxx-xxxx-xxxx-xxxxx876e581",

統合されたコントロールの検出結果の設定がオン状態にアクティブになる検出結果(=統合されたコントロールの検出結果の設定がオフの状態にアーカイブされる検出結果)のId

  "Id": "arn:aws:securityhub:ap-northeast-1:xxxxxxxxxxxx:security-control/S3.13/finding/xxxxxxxx-xxxx-xxxx-xxxx-xxxxx55889a4",

確認すると一目瞭然ですが、設定により別のIdで検出結果が作成されていることがわかります。

3.設定をオフ→オン→オフやオン→オフ→オンでIdを確認すると1回目と2回目のオフ(オン)のIdは同じだった

統合されたコントロールの検出結果の設定がオフ状態にアクティブになる検出結果(=統合されたコントロールの検出結果の設定がオン状態にアーカイブされる検出結果)のId

"Id": "arn:aws:securityhub:ap-northeast-1:xxxxxxxxxxxx:subscription/aws-foundational-security-best-practices/v/1.0.0/S3.13/finding/xxxxxxxx-xxxx-xxxx-xxxx-xxxxx876e581",

統合されたコントロールの検出結果の設定がオン状態にアクティブになる検出結果(=統合されたコントロールの検出結果の設定がオフ状態にアーカイブされる検出結果)のId

  "Id": "arn:aws:securityhub:ap-northeast-1:xxxxxxxxxxxx:security-control/S3.13/finding/xxxxxxxx-xxxx-xxxx-xxxx-xxxxx55889a4",

両者とも新規で検出結果を作成された後は、統合されたコントロールの検出結果の設定を切り替えてもIdが変更されることはなかったです。

【おまけ検証】コントロール項目を無効化した状態で統合されたコントロールの検出結果をオフ→オンに切り替えてみた

特定のコントロール項目を無効化した状態で、統合されたコントロールの検出結果をオフ→オンに切り替えると、無効化したコントロール項目の検出結果が作成されるかどうかを確認してみました。

上記画像のように、左のナビゲーションバーから「検出結果」を選択し、コントロール項目「CloudTrail.5」で検索すると検出結果が作成されていませんでした(=コントロールの無効化が機能している)。

つまりコントロール項目の有効・無効ステータスはセキュリティ基準毎に紐づいており、検出結果のIdと独立していることがわかりました。

まとめ

Security Hubの検出結果には固有のIdが割り振られており、それに対してワークフローステータスが紐づいていることがわかりました。