Skip to content

Instantly share code, notes, and snippets.

@schosterbarak
Created March 1, 2022 18:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schosterbarak/f6d5f539a615fd24d491553a99fbfe7c to your computer and use it in GitHub Desktop.
Save schosterbarak/f6d5f539a615fd24d491553a99fbfe7c to your computer and use it in GitHub Desktop.
metadata:
id: "CKV2_AWS_36"
name: "Ensure terraform is not sending SSM secrets to untrusted domains over HTTP"
category: "SUPPLY_CHAIN"
# inspired by: https://sprocketfox.io/xssfox/2022/02/09/terraformsupply/
definition:
or:
- and:
- cond_type: connection
operator: exists
resource_types:
- data.http
connected_resource_types:
- aws_ssm_parameter
- cond_type: attribute
value: "SecureString"
attribute: type
resource_types:
- aws_ssm_parameter
operator: not_equals
- cond_type: filter
attribute: resource_type
value:
- data.http
operator: within
- and:
- cond_type: connection
operator: not_exists
resource_types:
- data.http
connected_resource_types:
- aws_ssm_parameter
- cond_type: filter
attribute: resource_type
value:
- data.http
operator: within
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment