예제 #1
0
def find_admins(accounts, findings):
    admins = []
    for account in accounts:
        account = Account(None, account)
        region = get_us_east_1(account)
        admins.extend(find_admins_in_account(region, findings))

    return admins
예제 #2
0
def find_admins(accounts, args, findings):
    privs_to_look_for = None
    if "privs" in args and args.privs:
        privs_to_look_for = args.privs.split(",")
    include_restricted = False
    if "include_restricted" in args:
        include_restricted = args.include_restricted

    admins = []
    for account in accounts:
        account = Account(None, account)
        region = get_us_east_1(account)
        admins.extend(
            find_admins_in_account(region, findings, privs_to_look_for,
                                   include_restricted))

    return admins