-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat(kms): add kms_cmk_not_multi_region
AWS check
#6794
feat(kms): add kms_cmk_not_multi_region
AWS check
#6794
Conversation
Good catch @wunzeco! Just out of curiosity, how is the check you are developing? |
@MrCloudSec
For organisations with strict data residency requirements (like mine), a multi-region key is not useful. I'd be happy to contribute this custom check as I believe it might help others. Currently, I got the custom check working by extending |
Investigating the failed PR build jobs |
multi_region
attribute to AWS KMS key class
It would be great if you can add that check here too so we can add value to the Prowler community 😄 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6794 +/- ##
==========================================
- Coverage 93.52% 88.70% -4.83%
==========================================
Files 67 1198 +1131
Lines 6330 34578 +28248
==========================================
+ Hits 5920 30671 +24751
- Misses 410 3907 +3497
Flags with carried forward coverage won't be shown. Click here to find out more.
|
I've added the new check as advised, unit tests included. I followed the pattern in existing kms checks as closely as possible |
multi_region
attribute to AWS KMS key classkms_cmk_not_multiregional
AWS check
kms_cmk_not_multiregional
AWS checkkms_cmk_not_multi_region
AWS check
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.
Thanks for this new check @wunzeco ! I have added some changes to the metadata and naming.
Co-authored-by: MrCloudSec <hello@mistercloudsec.com>
Context
When developing a custom check to check the multi-region status of keys created in an AWS account, I discovered
that the Key class
was missing a field for the KMS Key
KeyMetadata.MultiRegion
data. The resulting error I encountered is given below:Please include relevant motivation and context for this PR.
If fixes an issue please add it with
Fix #6792
Description
Please include a summary of the change and which issue is fixed. List any dependencies that are required for this change.
multi_region
field to KMS Key class to store the value ofKeyMetadata.MultiRegion
that is available in the KMS DescribeKey api responseSee example output here
Checklist
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.