Skip to content

Conversation

@fchsrp
Copy link

@fchsrp fchsrp commented Mar 22, 2022

This pull request adds management of SecurityHub Findings Workflow on change of compliance of AWS Config Rules. The WorklowStatus of a SecurityHub Finding related to an AWS Config Rule is defined according to the compliance of the AWS Config Rule as follows:

  1. A new COMPLIANT resource is created: WorkflowStatus=RESOLVED, ComplianceStatus=PASSED
  2. A new NOT_COMPLIANT resource is created: WorkflowStatus=NEW, ComplianceStatus=FAILED
  3. A compliant resource transitions to non-compliant: WorkflowStatus=NEW, ComplianceStatus=FAILED
  4. A non-compliant resource transitions to compliant: WorkflowStatus=RESOLVED, ComplianceStatus=PASSED
  5. A non-compliant resource is deleted: WorkflowStatus=RESOLVED, ComplianceStatus=PASSED
  6. A compliant resource is deleted: WorkflowStatus=RESOLVED, ComplianceStatus=PASSED

The ComplianceStatus NOT_AVAILABLE of SecurityHub findings is not used (to match AWS Config NOT_APPLICABLE status) as it forces a transition of the WorkflowStatus to NEW automatically. Instead, the ComplianceStatus is set to PASSED when AWS Config reports NOT_APPLICABLE (which is set when the resource evaluated has been deleted).

…on change of compliance of AWS Config Rules
@fchsrp fchsrp marked this pull request as draft March 23, 2022 17:02
Raphael Fuchs added 3 commits March 24, 2022 15:00
…of BatchUpdateFindings upon failures (asynchronuous handling of BatchImportFindings may lead to concurrency issues)
@fchsrp fchsrp marked this pull request as ready for review March 25, 2022 11:53
@Jacco
Copy link

Jacco commented Jul 14, 2022

I would like to use the code in this PR. But since this is in "draft" status I am afraid it has not been properly tested yet? @fchsrp

@fchsrp
Copy link
Author

fchsrp commented Jul 14, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants