-
Notifications
You must be signed in to change notification settings - Fork 10
custom cofig rules DYNAMODB_TABLE_ENCRYPTED_KMS and SQS_ENCRYPTED_KMS #2
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
base: master
Are you sure you want to change the base?
Conversation
python/DYNAMODB_TABLE_ENCRYPTED_KMS/DYNAMODB_TABLE_ENCRYPTED_KMS.py
Outdated
Show resolved
Hide resolved
python/DYNAMODB_TABLE_ENCRYPTED_KMS/DYNAMODB_TABLE_ENCRYPTED_KMS.py
Outdated
Show resolved
Hide resolved
python/DYNAMODB_TABLE_ENCRYPTED_KMS/DYNAMODB_TABLE_ENCRYPTED_KMS.py
Outdated
Show resolved
Hide resolved
python/DYNAMODB_TABLE_ENCRYPTED_KMS/DYNAMODB_TABLE_ENCRYPTED_KMS.py
Outdated
Show resolved
Hide resolved
python/DYNAMODB_TABLE_ENCRYPTED_KMS/DYNAMODB_TABLE_ENCRYPTED_KMS.py
Outdated
Show resolved
Hide resolved
python/DYNAMODB_TABLE_ENCRYPTED_KMS/DYNAMODB_TABLE_ENCRYPTED_KMS.py
Outdated
Show resolved
Hide resolved
python/DYNAMODB_TABLE_ENCRYPTED_KMS/DYNAMODB_TABLE_ENCRYPTED_KMS_test.py
Outdated
Show resolved
Hide resolved
python/DYNAMODB_TABLE_ENCRYPTED_KMS/DYNAMODB_TABLE_ENCRYPTED_KMS_test.py
Outdated
Show resolved
Hide resolved
python/DYNAMODB_TABLE_ENCRYPTED_KMS/DYNAMODB_TABLE_ENCRYPTED_KMS_test.py
Outdated
Show resolved
Hide resolved
python/DYNAMODB_TABLE_ENCRYPTED_KMS/DYNAMODB_TABLE_ENCRYPTED_KMS_test.py
Outdated
Show resolved
Hide resolved
python/DYNAMODB_TABLE_ENCRYPTED_KMS/DYNAMODB_TABLE_ENCRYPTED_KMS.py
Outdated
Show resolved
Hide resolved
python/DYNAMODB_TABLE_ENCRYPTED_KMS/DYNAMODB_TABLE_ENCRYPTED_KMS.py
Outdated
Show resolved
Hide resolved
python/DYNAMODB_TABLE_ENCRYPTED_KMS/DYNAMODB_TABLE_ENCRYPTED_KMS.py
Outdated
Show resolved
Hide resolved
python/DYNAMODB_TABLE_ENCRYPTED_KMS/DYNAMODB_TABLE_ENCRYPTED_KMS.py
Outdated
Show resolved
Hide resolved
python/DYNAMODB_TABLE_ENCRYPTED_KMS/DYNAMODB_TABLE_ENCRYPTED_KMS_test.py
Outdated
Show resolved
Hide resolved
python/DYNAMODB_TABLE_ENCRYPTED_KMS/DYNAMODB_TABLE_ENCRYPTED_KMS_test.py
Outdated
Show resolved
Hide resolved
Scenario: 7 | ||
Given: Amazon DynamoDB table is active | ||
And: KmsKeyArns Rule Parameter provided | ||
And: Amazon DynamoDB table is not encrypted with with provided KmsKeyArns Rule Parameter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove one "with"
Then: Return NON_COMPLIANT | ||
Scenario: 6 | ||
Given: Amazon DynamoDB table is active | ||
And: KmsKeyArns Rule Parameter provided |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make "Rule Parameter" to lower case
Scenario: 6 | ||
Given: Amazon DynamoDB table is active | ||
And: KmsKeyArns Rule Parameter provided | ||
And: Amazon DynamoDB table is encrypted with provided KmsKeyArns Rule Parameter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
Then: Return COMPLIANT | ||
Scenario: 7 | ||
Given: Amazon DynamoDB table is active | ||
And: KmsKeyArns Rule Parameter provided |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
if kms_key: | ||
if not kms_arn_list or kms_key in kms_arn_list: | ||
return [Evaluation(ComplianceType.COMPLIANT)] | ||
return [Evaluation(ComplianceType.NON_COMPLIANT, annotation="AWS KMS key '{}' used to encrypt the Amazon SQS Queue is not in rule_paramter 'KmsKeyArns'".format(kms_key))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Annotation length has limit make sure it should not exceed 255 characters as kms_key is dynamic value
And: Any key in "KmsKeyArns" is invalid | ||
Then: Return ERROR | ||
Scenario: 2 | ||
Given: Rules parameter is provided |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is returning Success valid scenario ?
I confirm these files are made available under CC0 1.0 Universal (https://creativecommons.org/publicdomain/zero/1.0/legalcode)
Issue #, if available:
Description of changes:
custom cofig rule to check the dynamodb table is encrypted with KMS