From 414a45bfb00a81a62b65b03193f0fc8055bb1c5d Mon Sep 17 00:00:00 2001 From: Sergio Garcia <38561120+sergargar@users.noreply.github.com> Date: Wed, 7 Jun 2023 15:16:52 +0200 Subject: [PATCH] chore(quick inventory): add warning message (#2460) --- docs/tutorials/quick-inventory.md | 3 ++- prowler/providers/aws/lib/quick_inventory/quick_inventory.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/tutorials/quick-inventory.md b/docs/tutorials/quick-inventory.md index 02a9d15d..67736018 100644 --- a/docs/tutorials/quick-inventory.md +++ b/docs/tutorials/quick-inventory.md @@ -16,4 +16,5 @@ prowler -i ![Quick Inventory Example](../img/quick-inventory.jpg) -> The inventorying process is done with `resourcegroupstaggingapi` calls (except for the IAM resources which are done with Boto3 API calls.) +## Objections +The inventorying process is done with `resourcegroupstaggingapi` calls which means that only resources they have or have had tags will appear (except for the IAM and S3 resources which are done with Boto3 API calls). diff --git a/prowler/providers/aws/lib/quick_inventory/quick_inventory.py b/prowler/providers/aws/lib/quick_inventory/quick_inventory.py index fa14c1ef..210ec131 100644 --- a/prowler/providers/aws/lib/quick_inventory/quick_inventory.py +++ b/prowler/providers/aws/lib/quick_inventory/quick_inventory.py @@ -271,7 +271,9 @@ def create_output(resources: list, audit_info: AWS_Audit_Info, args): csv_writer.writerow(data.values()) csv_file.close() - + print( + f"\n{Fore.YELLOW}WARNING: Only resources that have or have had tags will appear (except for IAM and S3).\nSee more in https://docs.prowler.cloud/en/latest/tutorials/quick-inventory/#objections{Style.RESET_ALL}" + ) print("\nMore details in files:") print(f" - CSV: {args.output_directory}/{output_file+csv_file_suffix}") print(f" - JSON: {args.output_directory}/{output_file+json_file_suffix}")