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

Add a "multi_region" field that is missing in the KMS Key class #6792

Open
wunzeco opened this issue Feb 3, 2025 · 0 comments · May be fixed by #6794
Open

Add a "multi_region" field that is missing in the KMS Key class #6792

wunzeco opened this issue Feb 3, 2025 · 0 comments · May be fixed by #6794
Labels
bug status/needs-triage Issue pending triage

Comments

@wunzeco
Copy link

wunzeco commented Feb 3, 2025

Steps to Reproduce

Description

  1. What command are you running?
prowler aws --region eu-west-2 --checks-folder custom_checks --check kms_key_not_multiregional

# Note: "kms_key_not_multiregional" is a custom check that needs to check multi-region status of keys in an account
  1. Cloud provider you are launching

AWS

  1. Environment you have, like single account, multi-account, organizations, multi or single subscription, etc.

Single account, as well as Organizations

  1. See error

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 MultiRegion field of a KMS key metadata. The resulting error is given below:

E       AttributeError: 'Key' object has no attribute 'multi_region'

Expected behavior

A field that contains the value of KeyMetadata.MultiRegion is available in the KMS Key class

Actual Result with Screenshots or Logs

E       AttributeError: 'Key' object has no attribute 'multi_region'

How did you install Prowler?

From pip package (pip install prowler)

Environment Resource

Workstation

OS used

MacOS

Prowler version

5.2.0

Pip version

25.0

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 MultiRegion field of a KMS key metadata. The resulting error is given below:

E       AttributeError: 'Key' object has no attribute 'multi_region'

Proposed solution

  • Add missing multi_region field to KMS Key class to store the value of KeyMetadata.MultiRegion that is available in the KMS DescribeKey api response

See example output here

@wunzeco wunzeco added bug status/needs-triage Issue pending triage labels Feb 3, 2025
@MrCloudSec MrCloudSec linked a pull request Feb 3, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug status/needs-triage Issue pending triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant