@@ -28,14 +28,13 @@ def wrapped_function(wrapped, instance, args, kwargs):
2828 return wrapped(*args, **kwargs)
2929"""
3030
31- import os
3231import sys
3332import types
3433
3534from ddtrace .internal import forksafe
3635from ddtrace .internal .logger import get_logger
3736from ddtrace .internal .module import ModuleWatchdog
38- from ddtrace .settings ._config import _get_env
37+ from ddtrace .settings ._env import environ as _env
3938from ddtrace .settings .asm import config as asm_config
4039
4140from ._listener import iast_listen
@@ -187,11 +186,11 @@ def _iast_pytest_activation():
187186 global _iast_propagation_enabled
188187 if _iast_propagation_enabled :
189188 return
190- os . environ ["DD_IAST_ENABLED" ] = _get_env ("DD_IAST_ENABLED" , "1" )
191- os . environ ["DD_IAST_REQUEST_SAMPLING" ] = _get_env ("DD_IAST_REQUEST_SAMPLING" , "100.0" )
192- os . environ ["_DD_APPSEC_DEDUPLICATION_ENABLED" ] = _get_env ("_DD_APPSEC_DEDUPLICATION_ENABLED" , "false" )
193- os . environ ["DD_IAST_VULNERABILITIES_PER_REQUEST" ] = _get_env ("DD_IAST_VULNERABILITIES_PER_REQUEST" , "1000" )
194- os . environ ["DD_IAST_MAX_CONCURRENT_REQUESTS" ] = _get_env ("DD_IAST_MAX_CONCURRENT_REQUESTS" , "1000" )
189+ _env ["DD_IAST_ENABLED" ] = _env . get ("DD_IAST_ENABLED" , "1" )
190+ _env ["DD_IAST_REQUEST_SAMPLING" ] = _env . get ("DD_IAST_REQUEST_SAMPLING" , "100.0" )
191+ _env ["_DD_APPSEC_DEDUPLICATION_ENABLED" ] = _env . get ("_DD_APPSEC_DEDUPLICATION_ENABLED" , "false" )
192+ _env ["DD_IAST_VULNERABILITIES_PER_REQUEST" ] = _env . get ("DD_IAST_VULNERABILITIES_PER_REQUEST" , "1000" )
193+ _env ["DD_IAST_MAX_CONCURRENT_REQUESTS" ] = _env . get ("DD_IAST_MAX_CONCURRENT_REQUESTS" , "1000" )
195194
196195 asm_config ._iast_request_sampling = 100.0
197196 asm_config ._deduplication_enabled = False
0 commit comments