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

Terraform AWS rule "Security Group Rules Without Description" giving false positive? #4691

Closed
gygitlab opened this issue Jan 17, 2022 · 1 comment · Fixed by #4736
Closed
Labels
bug Something isn't working community Community contribution

Comments

@gygitlab
Copy link

Expected Behavior

While going through my code today with kics I noticed I appeared to be getting a false positive with the rule Terraform AWS rule "Security Group Rules Without Description" (68eb4bf3-f9bf-463d-b5cf-e029bb446d2e).

The SG rule resource in question does have a Description added. The query should be passing.

Actual Behavior

(Formatted logs and samples helps us to better understand the issue)

Output:

Security Group Rules Without Description, Severity: INFO, Results: 1
Description: It's considered a best practice for all rules in AWS Security Group to have a description
Platform: Terraform

	[1]: terraform/modules/gitlab_ref_arch_aws/security.tf:83

		082:
		083:   ingress {
		084:     description = "Enable HTTP access for select VMs"

Resource in question:

resource "aws_security_group" "gitlab_external_http_https" {
  count = min(var.haproxy_external_node_count + var.monitor_node_count, 1)

  name        = "${var.prefix}-external-http-https"
  description = "Allow main HTTP / HTTPS"
  vpc_id      = local.vpc_id

  ingress {
    description = "Enable HTTP access for select VMs"
    from_port   = 80
    to_port     = 80
    protocol    = "tcp"
    cidr_blocks = ["0.0.0.0/0"]
  }

  ingress {
    description = "Enable HTTPS access for select VMs"
    from_port   = 443
    to_port     = 443
    protocol    = "tcp"
    cidr_blocks = ["0.0.0.0/0"]
  }

  tags = {
    Name = "${var.prefix}-external-http-https"
  }
}
@gygitlab gygitlab added the bug Something isn't working label Jan 17, 2022
@rafaela-soares rafaela-soares added the community Community contribution label Jan 24, 2022
@rafaela-soares
Copy link
Contributor

Hi, @grantyoung 🙂

Thank you so much for reporting the bug. @lipeavelar solve it in PR #4736 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community Community contribution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants