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

⭐️ adds new cloudformation template policy #403

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
39 changes: 39 additions & 0 deletions extra/aws-cloudformation.mql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
policies:
- uid: mondoo-aws-cloudformation-security
name: AWS Cloudformation Security
version: 1.0.0
license: BUSL-1.1
tags:
mondoo.com/category: security
mondoo.com/platform: aws,cloud
authors:
- name: Mondoo, Inc
email: [email protected]
groups:
- filters: asset.platform == "cloudformation"

Check failure

Code scanning / cnspec

The assigned query does not exist Error

policy mondoo-aws-cloudformation-security assigned missing check query mondoo-awscloudformation--cloudfront-viewer-certificate-tls
checks:
- uid: mondoo-awscloudformation-alb-http-to-https-redirection-check
- uid: mondoo-awscloudformation--cloudfront-viewer-certificate-tls

queries:
- uid: mondoo-awscloudformation-alb-http-to-https-redirection-check
title: Checks whether HTTP to HTTPS redirection is configured on all application load balancer http listeners
mql: |
cloudformation.template.resources.
where( type == "AWS::ElasticLoadBalancingV2::Listener").
where( properties.Protocol != "HTTPS" && properties.Protocol != "TLS" && properties.Protocol != "TCP" && properties.Protocol != "UDP" && properties.Protocol != "TCP_UDP" ).
all(properties["DefaultActions"].any( _["Type"] == "redirect" && _["RedirectConfig"].Protocol == "HTTPS"))
refs:
- title: AWS::ElasticLoadBalancingV2::Listener
url: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html
- uid: mondoo-awscloudformation-cloudfront-viewer-certificate-tls

Check warning

Code scanning / cnspec

The query is not assigned to any policy Warning

query uid mondoo-awscloudformation-cloudfront-viewer-certificate-tls is not assigned to a policy
title: Checks whether the CloudFront distribution viewer certificate is configured with TLSv1.2
mql: |
cloudformation.template.resources.
where( type == "AWS::CloudFront::Distribution").
none( properties["DistributionConfig"]["ViewerCertificate"]["MinimumProtocolVersion"].in(["SSLv3", "TLSv1", "TLSv1_2016", "TLSv1.1_2016"]))
refs:
- title: AWS::CloudFront::Distribution ViewerCertificate
url: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-viewercertificate.html


Loading