-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
Consider Removing Access Logs Module #107
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bridgecrew has found infrastructure configuration errors in this PR ⬇️
@@ -83,7 +67,7 @@ resource "aws_lb" "default" { | |||
drop_invalid_header_fields = var.drop_invalid_header_fields | |||
|
|||
access_logs { | |||
bucket = try(element(compact([var.access_logs_s3_bucket_id, module.access_logs.bucket_id]), 0), "") | |||
bucket = var.access_logs_s3_bucket_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure ALB redirects HTTP requests into HTTPS ones
Resource: aws_lb.default | ID: BC_AWS_NETWORKING_49
How to Fix
resource "aws_lb" "lb_good" {
}
resource "aws_lb_listener" "listener_good" {
load_balancer_arn = aws_lb.lb_good.arn
port = "80"
protocol = "HTTP"
default_action {
type = "redirect"
redirect {
port = "443"
protocol = "HTTPS"
status_code = "HTTP_301"
}
}
}
Description
TBADependent Resources
Path | Resource | Connecting Attribute |
---|---|---|
/main.tf | aws_lb_listener.http_forward | load_balancer_arn |
/main.tf | aws_lb_listener.http_redirect | load_balancer_arn |
/main.tf | aws_lb_listener.https | load_balancer_arn |
@@ -83,7 +67,7 @@ resource "aws_lb" "default" { | |||
drop_invalid_header_fields = var.drop_invalid_header_fields | |||
|
|||
access_logs { | |||
bucket = try(element(compact([var.access_logs_s3_bucket_id, module.access_logs.bucket_id]), 0), "") | |||
bucket = var.access_logs_s3_bucket_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure public facing ALB are protected by AWS Web Application Firewall v2 (AWS WAFv2)
Resource: aws_lb.default | ID: BC_AWS_NETWORKING_58
Description
TBD Dependent ResourcesPath | Resource | Connecting Attribute |
---|---|---|
/main.tf | aws_lb_listener.http_forward | load_balancer_arn |
/main.tf | aws_lb_listener.http_redirect | load_balancer_arn |
/main.tf | aws_lb_listener.https | load_balancer_arn |
This pull request is now in conflict. Could you fix it @ekristen? 🙏 |
@ekristen while I agree, this probably should have been built with composition in mind instead of inheritence... I think we're probably stuck with this for now and it's not worth making the breaking change. I think the thing to fix would be this:
Are you still interested in this update? Want to discuss what fixing that looks like and take a crack at that? If not, no worries, but I think we will close this PR since it has sat open and untouched for a while without much interest sadly. |
what
why
important
example