Fix hardcoded region in cfn__resource_injection (Fixes #484)#497
Open
HoseinGhandi wants to merge 2 commits intoRhinoSecurityLabs:masterfrom
Open
Fix hardcoded region in cfn__resource_injection (Fixes #484)#497HoseinGhandi wants to merge 2 commits intoRhinoSecurityLabs:masterfrom
HoseinGhandi wants to merge 2 commits intoRhinoSecurityLabs:masterfrom
Conversation
Removed hardcoded us-east-1 region and updated get_session_from_key_name and get_aws_key_by_name functions. Session handling is now dynamic, allowing boto3 to default to the user's configured environment or explicitly passed regions.
Contributor
|
@HoseinGhandi thank you for this pull request. |
Author
|
Hey @nobodynate, my bad! My Windows Antivirus falsely flagged those specific module files as malware and automatically deleted them from my local directory while I was working on the fix. I didn't notice the deletion got included in the commit! 😄 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR resolves Issue #484 by removing the hardcoded
us-east-1region within thecfn__resource_injectionmodule, ensuring the tool functions correctly across all AWS regions.Changes Made
'us-east-1'string from themainfunction.get_session_from_key_nameandget_aws_key_by_nameto handle regions dynamically.**session_argsto allowboto3.Sessionto intelligently default to the user's environment region or accept explicitly passed arguments.Related Issue
Fixes #484
Thank you for reviewing! Let me know if any further modifications are needed.