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

Secure ciphers are not used in CloudFront distribution #875

Closed
frediana opened this issue Jun 17, 2021 · 1 comment · Fixed by #928
Closed

Secure ciphers are not used in CloudFront distribution #875

frediana opened this issue Jun 17, 2021 · 1 comment · Fixed by #928
Assignees
Labels
policy Issue concerning policy maintainers.

Comments

@frediana
Copy link
Contributor

  • terrascan version: version: v1.5.0
  • Operating System: Mac OS

Description

I have a terraform code, creating an AWS Cloudfront resource, configured as this:

resource "aws_cloudfront_distribution" "foo" {
...
  viewer_certificate {
    cloudfront_default_certificate = false
    acm_certificate_arn            = var.my_certificate
    minimum_protocol_version       = "TLSv1.2_2019"
    ssl_support_method             = "sni-only"
  }
...
}

What I Did

Terrascan is not happy:

Violation Details -

	Description    :	Secure ciphers are not used in CloudFront distribution
	File           :	../../front/cdn.tf
	Line           :	6
	Severity       :	HIGH

I think this should not be raised.

By reading the definition of this rule here: https://github.com/accurics/terrascan/blob/585edcc99942032e8f0ae8f280fcbea1a6aac0ab/pkg/runtime/testdata/testpolicies/aws_cloudfront_distribution/cloudfrontNoSecureCiphers.rego

I can see it's expected to have minimum_protocol_version strictly equal to TLSv1.2 or TLSv1.1.

To me this should be more something like minimum_protocol_version should start with TLSv1.2 or TLSv1.1.

See https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/secure-connections-supported-viewer-protocols-ciphers.html#secure-connections-supported-ciphers for the supported list.

If the issue is confirmed, I would be happy to contribute.

Adrien

@amirbenv amirbenv added the policy Issue concerning policy maintainers. label Jun 22, 2021
@harkirat22
Copy link
Contributor

@frediana yes you are absolutely right. Please, go ahead and submit your contribution. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
policy Issue concerning policy maintainers.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants