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

Added policy to check use_secure_tls for cloudfront #1064

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
13 changes: 13 additions & 0 deletions avd_docs/aws/cloudfront/AVD-AWS-0186/docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

CloudFront distribution uses outdated SSL/TLS protocols.

### Impact
<!-- Add Impact here -->

<!-- DO NOT CHANGE -->
{{ remediationActions }}

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


3 changes: 3 additions & 0 deletions avd_docs/kubernetes/general/AVD-KSV-0107/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ apiVersion and kind has been deprecated
<!-- DO NOT CHANGE -->
{{ remediationActions }}

### Links
-

SanaaYousaf marked this conversation as resolved.
Show resolved Hide resolved

2 changes: 1 addition & 1 deletion avd_docs/kubernetes/general/AVD-KSV-0109/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Storing secrets in configMaps is unsafe

### Impact
Unsafe storage of secret content in configMaps could lead to the information being compromised.
<!-- Add Impact here -->
SanaaYousaf marked this conversation as resolved.
Show resolved Hide resolved

<!-- DO NOT CHANGE -->
{{ remediationActions }}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# METADATA
# title: "Cloudfront Use Secure TLS Policy"
# description: "CloudFront distribution uses outdated SSL/TLS protocols."
# scope: package
# schemas:
# - input: schema.input
# related_resources:
# - https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/secure-connections-supported-viewer-protocols-ciphers.html
# custom:
# avd_id: AVD-AWS-0186
# provider: aws
# service: cloudfront
# severity: HIGH
# short_code: use-secure-tls-policy
# recommended_action: "You should not use outdated/insecure TLS versions for encryption. You should be using TLS v1.2+."
# input:
# selector:
# - type: cloud
package builtin.aws.cloudfront.aws0186

deny[res] {
dist := input.aws.cloudfront.distributions[_]
dist.viewercertificate.minimumprotocolversion.value != "TLSv1.2_2021"
res := result.new("Distribution allows unencrypted communications.", dist.viewercertificate.minimumprotocolversion)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package builtin.aws.cloudfront.aws0186

test_unsecure_tls_policy {
r := deny with input as {"aws": {"cloudfront": {"distributions": [{"viewercertificate": {"minimumprotocolversion": {"value": "TLSv1.0"}}}]}}}
count(r) == 1
}

test_secure_tls_policy {
r := deny with input as {"aws": {"cloudfront": {"distributions": [{"viewercertificate": {"minimumprotocolversion": {"value": "TLSv1.2_2021"}}}]}}}
count(r) == 0
}