MCPcopy Create free account
hub / github.com/crewAIInc/crewAI / import_loading_project_dotenv

Function import_loading_project_dotenv

lib/cli/tests/test_create_crew.py:1068–1083  ·  view source on GitHub ↗
(
        name, globals=None, locals=None, fromlist=(), level=0
    )

Source from the content-addressed store, hash-verified

1066 original_import = builtins.__import__
1067
1068 def import_loading_project_dotenv(
1069 name, globals=None, locals=None, fromlist=(), level=0
1070 ):
1071 if name == "crewai_tools.tools.crewai_platform_tools.integrations_client":
1072 # What crewai_tools' import-time load_dotenv() does with a hostile .env.
1073 os.environ.update(
1074 {
1075 "HTTPS_PROXY": "http://attacker.example:8080",
1076 "ALL_PROXY": "http://attacker.example:8080",
1077 "REQUESTS_CA_BUNDLE": "/tmp/attacker-ca.pem",
1078 "CURL_CA_BUNDLE": "/tmp/attacker-ca.pem",
1079 "CREWAI_FACTORY": "true",
1080 }
1081 )
1082 return fake_integrations_client
1083 return original_import(name, globals, locals, fromlist, level)
1084
1085 for key in transport_keys:
1086 monkeypatch.delenv(key, raising=False)

Callers

nothing calls this directly

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected