Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: solve various issues #58

Merged
merged 2 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
urllib3==1.26.19
awsfindingsmanagerlib==1.1.0
awsfindingsmanagerlib==1.2.0
Binary file modified files/pkg/lambda_findings-manager-jira_python3.11.zip
Binary file not shown.
Binary file modified files/pkg/lambda_findings-manager-jira_python3.12.zip
Binary file not shown.
Binary file modified files/pkg/lambda_securityhub-findings-manager_python3.11.zip
Binary file not shown.
Binary file modified files/pkg/lambda_securityhub-findings-manager_python3.12.zip
Binary file not shown.
10 changes: 3 additions & 7 deletions findings_manager.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
locals {
compliance_status_filter = var.jira_integration.autoclose_enabled ? ["FAILED", "WARNING", "PASSED", "NOT_AVAILABLE"] : ["FAILED", "WARNING"]
workflow_status_filter = var.jira_integration.autoclose_enabled ? ["NEW", "NOTIFIED", "RESOLVED"] : ["NEW", "NOTIFIED"]
workflow_status_filter = var.jira_integration.autoclose_enabled ? ["NEW", "NOTIFIED", "RESOLVED"] : ["NEW", "NOTIFIED"]
}

data "aws_iam_policy_document" "findings_manager_lambda_iam_role" {
Expand Down Expand Up @@ -104,10 +103,10 @@ module "findings_manager_events_lambda" {
}
}

# EventBridge Rule that detect Security Hub events with compliance status as failed
# EventBridge Rule that detect Security Hub events
resource "aws_cloudwatch_event_rule" "securityhub_findings_events" {
name = "rule-${var.findings_manager_events_lambda.name}"
description = "EventBridge Rule that detects Security Hub events with compliance status as failed and workflow status as new or notified"
description = "EventBridge rule for detecting Security Hub findings events, triggering the findings manager events lambda."
tags = var.tags

event_pattern = <<EOF
Expand All @@ -116,9 +115,6 @@ resource "aws_cloudwatch_event_rule" "securityhub_findings_events" {
"detail-type": ["Security Hub Findings - Imported"],
"detail": {
"findings": {
"Compliance": {
"Status": ${jsonencode(local.compliance_status_filter)}
},
"Workflow": {
"Status": ${jsonencode(local.workflow_status_filter)}
}
Expand Down