feat(global_aws_session): Global data structure for the current AWS audit (#1212)

* fix(audit info): Common data structure for current audit

* fix(iam): iam session audit fixed

* feat(aws_session): Include else block

Co-authored-by: Pepe Fagoaga <pepe@verica.io>
This commit is contained in:
Nacho Rivera
2022-06-21 07:53:49 +02:00
committed by GitHub
parent b89b883741
commit e52ab12696
5 changed files with 172 additions and 176 deletions

View File

@@ -11,7 +11,7 @@ from lib.check.check import (
run_check,
)
from lib.logger import logger, logging_levels
from providers.aws.aws_provider import Input_Data, provider_set_session
from providers.aws.aws_provider import provider_set_session
if __name__ == "__main__":
# CLI Arguments
@@ -103,17 +103,15 @@ if __name__ == "__main__":
if args.no_banner:
print_banner()
# Setting session
session_input = Input_Data(
profile=args.profile,
role_arn=args.role,
session_duration=args.session_duration,
external_id=args.external_id,
regions=args.filter_region,
# Set global session
provider_set_session(
args.profile,
args.role,
args.session_duration,
args.external_id,
args.filter_region,
)
provider_set_session(session_input)
# Load checks to execute
logger.debug("Loading checks")
checks_to_execute = load_checks_to_execute(