From a04a006ce9e23fc7230042ede191e940e647a73f Mon Sep 17 00:00:00 2001 From: "Nicholas S. Castellano" <36703019+n2qz@users.noreply.github.com> Date: Sun, 16 Aug 2020 15:17:26 -0400 Subject: [PATCH] Add web proxy support using https_proxy environment variable (#499) Co-authored-by: Nicholas S. Castellano --- checkov/common/bridgecrew/platform_integration.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/checkov/common/bridgecrew/platform_integration.py b/checkov/common/bridgecrew/platform_integration.py index 2b8b2deb2da..6a6e50d9f34 100644 --- a/checkov/common/bridgecrew/platform_integration.py +++ b/checkov/common/bridgecrew/platform_integration.py @@ -17,7 +17,11 @@ UNAUTHORIZED_MESSAGE = 'User is not authorized to access this resource with an explicit deny' DEFAULT_REGION = "us-west-2" -http = urllib3.PoolManager() + +try: + http = urllib3.ProxyManager(os.environ['https_proxy']) +except KeyError: + http = urllib3.PoolManager() class BcPlatformIntegration(object):