Skip to content

Commit

Permalink
Merge pull request #455 from TeneBrae93/master
Browse files Browse the repository at this point in the history
Fixes "cloudformation__download_data" module
  • Loading branch information
DaveYesland authored Sep 18, 2024
2 parents 90ac189 + 0ea289e commit 993d9ca
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions pacu/modules/cloudformation__download_data/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,24 @@

parser = argparse.ArgumentParser(add_help=False, description=(module_info['description']))

parser.add_argument('--regions', required=False, default=None, help='One or more (comma separated) AWS regions in the format '
parser.add_argument('--regions', required=False, default=None, help='One or more comma-separated AWS regions in the format '
'us-east-1. Defaults to all regions.')

def main(args, pacu_main):
# Parse the arguments using argparse
args = parser.parse_args(args)

session = pacu_main.get_active_session()
print = pacu_main.print
get_regions = pacu_main.get_regions
regions = get_regions('cloudformation')

# Fixing the code so it accepts the regions flag without scanning all regions
if args.regions:
# Process the regions provided by the user
regions = [region.strip() for region in args.regions.split(',')]
else:
# Use all regions if none are specified
regions = get_regions('cloudformation')

def find_secrets(string):
detections = regex_checker(string)
Expand Down

0 comments on commit 993d9ca

Please sign in to comment.