Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
lirshindalman committed Dec 24, 2024
1 parent b7edd8b commit fdcaf1a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions checkov/common/proxy/proxy_client.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
from typing import Any
from typing import Any, Mapping

import requests

Expand Down Expand Up @@ -33,10 +33,11 @@ def call_http_request_with_proxy(request: requests.Request) -> Any:
return proxy_client.send_request(request=request)


def get_proxy_envs():
proxy_env = os.environ.copy()
def get_proxy_envs() -> Mapping[str, str] | None:
if os.getenv('PROXY_URL'):
proxy_env["GIT_SSL_CAINFO"] = os.getenv('PROXY_CA_PATH', None) # Path to the CA cert
proxy_env = os.environ.copy()
proxy_env["GIT_SSL_CAINFO"] = os.getenv('PROXY_CA_PATH') # Path to the CA cert
proxy_env["http_proxy"] = os.getenv('PROXY_URL') # Proxy URL
proxy_env["https_proxy"] = os.getenv('PROXY_URL') # HTTPS Proxy URL (if needed)
return proxy_env
return proxy_env
return None

0 comments on commit fdcaf1a

Please sign in to comment.