PyPI / ddtrace / 4.15.8

ddtrace 4.15.8

Source
https://github.com/DataDog/dd-trace-py
Artifact scanned
ddtrace-4.15.8.tar.gz (sdist · 2.5 MB · SHA-256 a4d29e1c7b67…)
Compared with
ddtrace-4.15.7.tar.gz (0 signals introduced since)
Files
1494 scanned, 60 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 43 info
Scan time
39.2 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 40 of 40 warn and critical signals; 40 demoted to info.
Disclude version
4.3.0
Scanned (UTC)
2026-11-17 16:58

Signals

Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.

  1. info critical → info by review dynamic-import ddtrace/aiguard/integrations/_langchain.py:73:30

    `__import__` called on a non-literal expression (ast pass, confidence 0.90)

                        module_path, class_name = class_.rsplit(".", 1)
                        module = __import__("langchain.agents." + module_path, fromlist=[class_name])
                    else:
                        module, class_name = langchain.agents, class_
    likely benign LLM, confidence 0.80 Lazy import of a langchain.agents class via __import__ with a computed module path.
    Reasoning

    __import__ is used with a prefix literal plus a class-path string to lazily import langchain agent classes; the module path is constrained to the langchain.agents namespace. Dynamic import is a common lazy-loading pattern in integration shims. Severity critical is overstated, but the non-literal argument is worth a note.

  2. info warn → info by review frame-introspection ddtrace/appsec/_exploit_prevention/stack_traces.py:58:13

    `inspect.stack` — call-stack frame introspection (ast pass, confidence 0.70)

    
        stack = inspect.stack()
        crop_index = 0
        if crop_stack is not None:
    likely benign LLM, confidence 0.90 Collects call-stack frames to build a trimmed stack trace for exploit reporting.
    Reasoning

    inspect.stack() is used to crop and record stack traces for exploit-prevention reporting, a legitimate diagnostic use in an APM/security library.

  3. info critical → info by review frame-introspection ddtrace/appsec/_iast/__init__.py:170:19

    `inspect.currentframe` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)

    
        module_name = inspect.currentframe().f_back.f_globals["__name__"]
        module = sys.modules[module_name]
        try:
    likely benign LLM, confidence 0.80 Reads the caller's module name via frame introspection to instrument that module.
    Reasoning

    currentframe().f_back.f_globals is used to find the calling module name for AST-patching of an import hook. The sys.exit/exec/eval co-occurrence is a heuristic flag; the code is part of IAST instrumentation, not anti-analysis.

  4. info warn → info by review dynamic-execution ddtrace/appsec/_iast/__init__.py:182:21

    `compile` called on a non-literal expression (ast pass, confidence 0.70)

    
        compiled_code = compile(patched_ast, module_path, "exec")
        # creating a new module environment to execute the patched code from scratch
        new_module = types.ModuleType(module_name)
    likely benign LLM, confidence 0.90 Compiles an instrumented AST of a module for IAST taint tracking.
    Reasoning

    compile() of a patched AST produced by the IAST source-instrumentation loader is a deliberate, documented mechanism for taint-tracking instrumentation of user modules.

  5. info warn → info by review dynamic-execution ddtrace/appsec/_iast/__init__.py:188:5

    `exec` called on a non-literal expression (ast pass, confidence 0.70)

        # executing the compiled code in the new module environment
        exec(compiled_code, module.__dict__)  # nosec B102
    likely benign LLM, confidence 0.90 Executes the instrumented module code in its module namespace.
    Reasoning

    exec of compiled instrumented code into the module's own dict is the standard re-execution step of the IAST module patcher; the nosec comment shows it is an acknowledged, intentional pattern.

  6. info warn → info by review dynamic-execution ddtrace/appsec/_iast/_loader.py:51:29

    `compile` called on a non-literal expression (ast pass, confidence 0.70)

                # Patched source is compiled in order to execute it
                compiled_code = compile(patched_ast, module_path, "exec")
            except Exception:
                iast_compiling_debug_log("Unexpected exception while compiling patched code", exc_info=True)
    likely benign LLM, confidence 0.90 Compiles patched module source for IAST instrumentation.
    Reasoning

    Same IAST loader pattern: compile of patched source for taint-tracking instrumentation, with error handling and debug logging.

  7. info warn → info by review dynamic-execution ddtrace/appsec/_iast/_loader.py:60:13

    `exec` called on a non-literal expression (ast pass, confidence 0.70)

                # Patched source is executed instead of original module
                exec(compiled_code, module.__dict__)  # nosec B102
            except TypeError:
                iast_compiling_debug_log("INSTRUMENTED CODE. Unexpected exception", exc_info=True)
    likely benign LLM, confidence 0.90 Executes instrumented module code in the loader.
    Reasoning

    Executes the patched compiled module in place of the original, as part of the IAST loader; intentional and documented with nosec.

  8. info warn → info by review macro-keyword-override ddtrace/appsec/_iast/_taint_tracking/constants.h:3:1

    `#define RANGE_START long` aliases a C reserved keyword behind a non-keyword macro name (ast pass, confidence 0.85)

    #define PY_MODULE_NAME "ddtrace.appsec._iast._taint_tracking._native"
    #define RANGE_START long
    #define RANGE_LENGTH long
    #define MSG_ERROR_N_PARAMS "iast::propagation::native::error::Invalid number of params"
    likely benign LLM, confidence 0.95 Macro alias for the long type in a native header.
    Reasoning

    Defining RANGE_START as long is a benign C macro used to abstract type names in the native taint-tracking module; macro names are not C keywords and no malicious payload is present.

  9. info warn → info by review macro-keyword-override ddtrace/appsec/_iast/_taint_tracking/constants.h:4:1

    `#define RANGE_LENGTH long` aliases a C reserved keyword behind a non-keyword macro name (ast pass, confidence 0.85)

    #define RANGE_START long
    #define RANGE_LENGTH long
    #define MSG_ERROR_N_PARAMS "iast::propagation::native::error::Invalid number of params"
    #define MSG_ERROR_SET_RANGES                                                                                           \
    likely benign LLM, confidence 0.95 Macro alias for the long type in a native header.
    Reasoning

    Same benign type-alias macro as the adjacent line; a common C idiom for typedef-like names, not obfuscation.

  10. info warn → info by review frame-introspection ddtrace/appsec/_iast/taint_sinks/code_injection.py:103:26

    `inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)

                else:
                    frames = inspect.currentframe()
                    if frames is not None:
                        caller_frame = _resolve_caller_frame(frames.f_back)
    likely benign LLM, confidence 0.90 Retrieves the current frame to resolve the caller for a taint sink.
    Reasoning

    currentframe() is used to find the caller frame for code-injection taint sink reporting, a legitimate instrumentation need.

  11. info warn → info by review frame-introspection ddtrace/appsec/_iast/taint_sinks/code_injection.py:116:30

    `inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)

                    if caller_frame is None:
                        frames = inspect.currentframe()
                        if frames is not None:
                            caller_frame = _resolve_caller_frame(frames.f_back)
    likely benign LLM, confidence 0.90 Retrieves the current frame to resolve the caller for a taint sink.
    Reasoning

    Same caller-frame resolution in the code-injection sink for diagnostic and reporting purposes.

  12. info warn → info by review dynamic-attribute ddtrace/appsec/ai_guard/__init__.py:59:9

    reach-by-name through `globals` (ast pass, confidence 0.60)

    
            globals()[name] = attr  # cache so we warn at most once per symbol
            return attr
        raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
    likely benign LLM, confidence 0.90 Lazy module attribute loader that caches resolved attributes in globals.
    Reasoning

    Module-level __getattr__ caches lazily resolved attributes into globals(); this is a standard lazy-import pattern for optional integrations, not hidden access.

  13. info warn → info by review dynamic-attribute ddtrace/appsec/ai_guard/integrations/litellm.py:35:9

    reach-by-name through `globals` (ast pass, confidence 0.60)

            attr = getattr(litellm, name)
            globals()[name] = attr  # cache so we warn at most once per symbol
            return attr
        raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
    likely benign LLM, confidence 0.90 Lazy forwarder to litellm attributes that caches results in globals.
    Reasoning

    Same module-level __getattr__ lazy-forwarding pattern to the litellm module, caching attributes and warning once per symbol.

  14. info warn → info by review dynamic-attribute ddtrace/appsec/ai_guard/integrations/strands.py:35:9

    reach-by-name through `globals` (ast pass, confidence 0.60)

            attr = getattr(strands, name)
            globals()[name] = attr  # cache so we warn at most once per symbol
            return attr
        raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
    likely benign LLM, confidence 0.90 Lazy module attribute loader that caches imported attributes in globals.
    Reasoning

    Module-level __getattr__ lazily imports a symbol from strands and caches it in globals(); standard lazy-loading pattern with no malicious payload.

  15. info warn → info by review frame-introspection ddtrace/contrib/internal/boto/patch.py:155:13

    `inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)

        # But can vary depending on Python versions; that's why we use an heuristic
        frame = inspect.currentframe().f_back
        operation_name = None
        while frame:
    likely benign LLM, confidence 0.90 Walks the call stack to infer a boto operation name for tracing.
    Reasoning

    The code walks up the call stack with inspect.currentframe().f_back to guess an operation name for tracing. This is a known heuristic in an APM instrumentation library and shows no sign of hidden or malicious behavior.

  16. info warn → info by review dynamic-attribute ddtrace/contrib/trace_utils.py:40:16

    reach-by-name through `globals` (ast pass, confidence 0.60)

        if name in globals():
            return globals()[name]
    
        raise AttributeError("%s has no attribute %s", __name__, name)
    likely benign LLM, confidence 0.90 Module __getattr__ that looks up names in module globals for lazy attribute access.
    Reasoning

    This is a module-level __getattr__ that resolves lazily defined names through globals(), a standard lazy-attribute pattern. It only reads module globals and raises AttributeError otherwise.

  17. info warn → info by review frame-introspection ddtrace/debugging/_debugger.py:349:27

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

                        probe,
                        frame=sys._getframe(1),
                        thread=threading.current_thread(),
                        trace_context=self._tracer.current_trace_context(),
    likely benign LLM, confidence 0.90 Captures the caller frame for a debugger probe snapshot.
    Reasoning

    The debugger captures the caller's frame via sys._getframe(1) to evaluate probe conditions and log context. This is the expected behavior of a dynamic debugger.

  18. info warn → info by review dynamic-attribute ddtrace/debugging/_expressions.py:140:34

    reach-by-name through `__builtins__` (ast pass, confidence 0.60)

            # Try with a built-in type first
            return isinstance(value, __builtins__[type_qname])  # type: ignore[index]
        except KeyError:
            # Otherwise we expect a fully qualified name
    likely benign LLM, confidence 0.85 Resolves a type name against builtins for debugger expression isinstance checks.
    Reasoning

    The expression compiler looks up built-in type names in __builtins__ for isinstance checks in debugger predicates, falling back to fully qualified names on KeyError. The lookup is bounded to type resolution and is not an injection path.

  19. info warn → info by review dynamic-attribute ddtrace/debugging/_expressions.py:283:17

    reach-by-name through `__builtins__` (ast pass, confidence 0.60)

                a, b = args
                f = __builtins__[_type]  # type: ignore[index]
                ca, fb = self._compile_predicate(a), self._make_lambda(b)
    likely benign LLM, confidence 0.85 Selects a builtin function by name while compiling debugger expressions.
    Reasoning

    Same pattern as the neighboring finding: a builtin is selected by name from a fixed set of expression operators to build a debugger predicate. This is a normal expression-compilation design.

  20. info critical → info by review frame-introspection ddtrace/internal/assembly.py:172:17

    `sys._getframe` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)

        def parse_expr(self, text: str) -> t.Any:
            frame = sys._getframe(1)
    
            _globals = frame.f_globals.copy()
    likely benign LLM, confidence 0.70 Reads caller frame globals and locals to evaluate assembly-expression text.
    Reasoning

    The assembly helper reads the caller's frame globals and locals to evaluate developer-written bytecode assembly expressions. The sys.exit and exec mention reflects the file's content, not a dropper. The critical severity comes from the anti-analysis shape match, which does not fit this use. Eval of developer-supplied text is still a sensitive sink, so some doubt remains.

  21. info warn → info by review dynamic-execution ddtrace/internal/assembly.py:177:16

    `eval` called on a non-literal expression (ast pass, confidence 0.70)

    
            return eval(text, _globals, frame.f_locals)  # nosec
    
        def parse_opcode_arg(self, text: str) -> t.Union[bc.Label, str, int, t.Any]:
    likely benign LLM, confidence 0.70 eval of assembler expression text inside the caller's frame namespace.
    Reasoning

    eval runs on text from the bytecode assembler's own expression syntax, with the caller's frame namespace, and is marked nosec. The input is developer-authored assembly source rather than untrusted network or file data, so this looks like a deliberate evaluator design.

  22. info warn → info by review dynamic-attribute ddtrace/internal/compat.py:114:9

    reach-by-name through `globals` (ast pass, confidence 0.60)

    
            globals()[name] = python_version()
    
        elif name == "PYTHON_INTERPRETER":
    likely benign LLM, confidence 0.90 Caches a lazily computed python_version into module globals.
    Reasoning

    Lazy module attribute caching assigns the computed python_version into globals under a fixed name. This is a standard compatibility shim.

  23. info warn → info by review dynamic-attribute ddtrace/internal/compat.py:119:9

    reach-by-name through `globals` (ast pass, confidence 0.60)

    
            globals()[name] = python_implementation()
    
        try:
    likely benign LLM, confidence 0.90 Caches a lazily computed python_implementation into module globals.
    Reasoning

    Lazy module attribute caching assigns python_implementation into globals under a fixed name, matching the other compat shim branches.

  24. info warn → info by review dynamic-attribute ddtrace/internal/compat.py:122:16

    reach-by-name through `globals` (ast pass, confidence 0.60)

        try:
            return globals()[name]
        except KeyError:
            raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
    likely benign LLM, confidence 0.90 Module __getattr__ fallback reading names from globals.
    Reasoning

    Module __getattr__ fallback that reads globals and raises AttributeError on a miss. This is ordinary lazy-attribute code.

  25. info warn → info by review dynamic-execution ddtrace/internal/datadog/profiling/build_standalone.sh:41:5

    command name is a variable (`$1`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)

      get_version() {
        $1 --version 2>&1 | grep -oE '[0-9]+(\.[0-9]+)?' | head -n 1
      }
    likely benign LLM, confidence 0.80 Build helper that runs a caller-supplied tool to read its version.
    Reasoning

    The helper runs a tool passed as $1 to read its version during the build. The command is chosen by the build script's own caller, and the function is a build utility, not a remote payload.

  26. info critical → info by review dynamic-execution ddtrace/internal/datadog/profiling/build_standalone.sh:66:5

    `eval` called on a dynamic (variable/substitution) expression (ast pass, confidence 0.90)

      if [[ -n $found_version ]]; then
        eval "$highest_var_name=$found_version"
      fi
    }
    likely benign LLM, confidence 0.75 Build helper that uses eval to assign a found version to a named variable.
    Reasoning

    eval assigns a result to a variable whose name is passed in by the build script, and the value comes from parsing local tool version output. It is poor practice but a common local build idiom, with no sign of remote or attacker-controlled input in the snippet.

  27. command name is a variable (`$RUN_CLANG_TIDY`) that this file sets only to plain text (ast pass, confidence 0.40)

        echo "Using ${RUN_CLANG_TIDY} with ${JOBS} parallel jobs"
        ${RUN_CLANG_TIDY} \
            -p "${BUILD_DIR}" \
            -j "${JOBS}" \
  28. command name is a variable (`$CLANG_TIDY`) that this file sets only to plain text (ast pass, confidence 0.40)

            echo "Analyzing: ${file}"
            if ! ${CLANG_TIDY} \
                -p "${BUILD_DIR}" \
                -checks="${CHECKS}" \
  29. info warn → info by review dynamic-execution ddtrace/internal/datadog/profiling/stack/fuzz/build.sh:39:7

    pipeline feeds into `sh` — piped data is executed as shell code (ast pass, confidence 0.80)

        for i in 1 2 3; do
          curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && break
          echo "rustup install attempt $i failed, retrying..."
          sleep 5
    likely benign LLM, confidence 0.85 Installs rustup via the official curl-to-sh bootstrap with retries.
    Reasoning

    This fetches the official rustup installer from sh.rustup.rs over TLS 1.2 and retries on failure. Piping to sh is the documented rustup install method, though it is a supply-chain-sensitive pattern.

  30. info warn → info by review dynamic-import ddtrace/internal/datadog/profiling/stack/fuzz/build.sh:44:5

    `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)

        done
        . "$HOME/.cargo/env"
    fi
    likely benign LLM, confidence 0.90 Sources the standard cargo environment file after rustup install.
    Reasoning

    Sourcing the standard rustup environment file from HOME/.cargo/env immediately after installing rustup is the normal way to put cargo on PATH.

  31. info warn → info by review frame-introspection ddtrace/internal/lazy.py:36:5

    `sys.settrace` — call-stack frame introspection (ast pass, confidence 0.70)

    
        sys.settrace(_trace)
        try:
            fn()
    likely benign LLM, confidence 0.75 Temporarily installs a trace function to capture locals while a lazily loaded module initializes.
    Reasoning

    sys.settrace is set around a call to fn() and restored in finally, then frame locals are copied into module globals. This is a lazy-module evaluation mechanism that captures names defined during initialization. No network, decoding, or process spawning is involved.

  32. info warn → info by review frame-introspection ddtrace/internal/lazy.py:40:9

    `sys.settrace` — call-stack frame introspection (ast pass, confidence 0.70)

        finally:
            sys.settrace(old_trace)
    
        module_globals.update(frame_locals)
    likely benign LLM, confidence 0.75 Restores the previous trace function after lazy initialization and merges captured locals into module globals.
    Reasoning

    This is the restore half of the same settrace block in a finally clause, which is the correct cleanup pattern. The frame locals are then merged into module globals as part of lazy loading.

  33. info warn → info by review frame-introspection ddtrace/internal/lazy.py:46:16

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

    def lazy(f: t.Callable[[], None]) -> None:
        _globals = sys._getframe(1).f_globals
        _initialized = False
    likely benign LLM, confidence 0.85 Reads the caller's module globals via the stack frame so a decorator can register lazy state.
    Reasoning

    sys._getframe(1).f_globals is a common way for a decorator to reach its caller's module namespace. Here it binds the lazy-loading state to the calling module. Nothing suspicious appears in the snippet.

  34. info warn → info by review decoder-decompress-payload ddtrace/internal/openfeature/_agentless.py:79:16

    file imports decoder module(s) gzip and calls `.decompress()` — embedded payload decompressed at runtime (ast pass, confidence 0.75)

        if content_encoding and content_encoding.strip().lower() == "gzip":
            return gzip.decompress(body)
        return body
    likely benign LLM, confidence 0.90 Decompresses a gzip-encoded response body when the content-encoding header says so.
    Reasoning

    The function decompresses an HTTP body only when Content-Encoding is gzip. This is normal handling of a compressed response, not an embedded payload being run.

  35. info warn → info by review macro-keyword-override ddtrace/internal/pack.h:26:1

    `#define inline` rebinds the reserved C keyword `inline` (token pass, confidence 0.85)

    #ifdef _MSC_VER
    #define inline __inline
    #endif
    likely benign LLM, confidence 0.90 Under MSVC, maps the inline keyword to the compiler-specific __inline spelling.
    Reasoning

    The define is guarded by _MSC_VER and maps the C keyword inline to MSVC's __inline. This is a standard MSVC compatibility shim, not a malicious redefinition.

  36. info warn → info by review frame-introspection ddtrace/internal/wrapping/context.py:787:32

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

            # Make the frame object available to the contexts
            storage["__frame__"] = sys._getframe(_ENTER_FRAME_DEPTH)
    
            # Freeze the list of contexts so that we know exactly which ones to
    likely benign LLM, confidence 0.85 Stores the caller's frame object in context storage for wrapped context managers.
    Reasoning

    The frame is stored at a fixed depth so wrapped contexts can access it. This is internal tracing machinery and does not exfiltrate or execute anything.

  37. info warn → info by review dynamic-attribute ddtrace/llmobs/_integrations/__init__.py:36:5

    reach-by-name through `globals` (ast pass, confidence 0.60)

        integration = getattr(import_module(module_name, __name__), name)
        globals()[name] = integration
        return integration
    likely benign LLM, confidence 0.85 Lazily imports an integration submodule and caches the attribute in module globals.
    Reasoning

    This is a module-level __getattr__-style lazy loader. It imports the integration module by name and caches it in globals. The import target is internal to the package.

  38. info warn → info by review frame-introspection ddtrace/llmobs/_integrations/utils.py:1994:25

    `inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)

            # Start from the current frame and walk up the stack
            current_frame = inspect.currentframe()
            if current_frame is None:
                return variable_name, module_name
    likely benign LLM, confidence 0.85 Walks up the call stack via inspect.currentframe to infer a variable name and module for tracing.
    Reasoning

    Walking inspect.currentframe() up the stack to name a variable or module is a common introspection technique for tracing labels. The snippet shows no hidden execution or network activity.

  39. info warn → info by review encoding-base64 ddtrace/propagation/http.py:423:38

    base64-like blob (64 bytes, compression ratio 1.17) (raw pass, confidence 0.60)

    
        https://github.com/openzipkin/b3-propagation/blob/3e54cda11620a773d53c7f64d2ebb10d3a01794c/README.md#multiple-headers
    
        Example::
    dismissed LLM, confidence 0.95 A docstring URL containing a long commit hash, matched as a base64 blob.
    Reasoning

    The flagged text is a docstring containing a GitHub URL with a commit hash. The base64-like match is a false positive from a hex-like identifier in the link, and no decoding occurs.

  40. info warn → info by review encoding-base64 ddtrace/propagation/http.py:540:38

    base64-like blob (64 bytes, compression ratio 1.17) (raw pass, confidence 0.60)

    
        https://github.com/openzipkin/b3-propagation/blob/3e54cda11620a773d53c7f64d2ebb10d3a01794c/README.md#single-header
    
        Format::
    dismissed LLM, confidence 0.95 A docstring URL with a commit hash, matched as a base64 blob.
    Reasoning

    This is another docstring URL to the b3-propagation README with a commit hash. It is documentation text and has no code effect.

  41. info critical → info by review dynamic-execution ddtrace/vendor/dogstatsd/context_async.py:52:5

    `exec` at module scope (runs on import) on a non-literal expression (ast pass, confidence 0.80)

    if sys.version_info >= (3, 5):
        exec(compile(ASYNC_SOURCE, __file__, "exec"))
    likely benign LLM, confidence 0.70 Conditionally execs a module-level async source string on Python 3.5 and later to define async context helpers.
    Reasoning

    The exec and compile calls run at import time on ASYNC_SOURCE, a module-level source string. This is a known vendored pattern for defining async-def syntax only on Python 3.5+ without breaking older parsers. The source is a constant, so there is no runtime input. Exec-on-import is still a pattern worth checking against the actual string contents.

  42. info critical → info by review dynamic-execution ddtrace/vendor/dogstatsd/context_async.py:52:10

    `compile` at module scope (runs on import) on a non-literal expression (ast pass, confidence 0.80)

    if sys.version_info >= (3, 5):
        exec(compile(ASYNC_SOURCE, __file__, "exec"))
    likely benign LLM, confidence 0.70 Compiles the constant ASYNC_SOURCE string for the version-gated exec that defines async helpers.
    Reasoning

    This compile call is the input to the exec on the previous line. It compiles a constant module string with the file path as filename, so it is part of the same version-gated pattern. Its only input is the constant ASYNC_SOURCE.

  43. proc-macro attribute `#[proc_macro_derive]` present (ast pass, confidence 0.95)

    /// but whose Python attributes should read as `RemoteConfigProduct.LiveDebugging`).
    #[proc_macro_derive(ConvertToPyO3Enum, attributes(pyo3_enum))]
    pub fn convert_to_pyo3_enum(input: TokenStream) -> TokenStream {
        let input = parse_macro_input!(input as DeriveInput);

Reproduce This Scan

Run disclude locally to verify. These commands scan the published file; the "new in this release" marks come from comparing it with the previous release's file, which they don't repeat. Add --format sarif for SARIF output. Add --llm (with an API key in the environment) to include the LLM review.

cargo install disclude --version 4.3.0
curl -fsSL -o ddtrace-4.15.8.tar.gz https://files.pythonhosted.org/packages/1b/1b/06ac3a763fb86ff23ba0bc16363f312d2405cf6b8bd9b40f71fabbcd6244/ddtrace-4.15.8.tar.gz
printf '%s  %s\n' a4d29e1c7b67f4e1a0aa33f12853cb5921f081bcf120671ed43f8373ecdbd6ea ddtrace-4.15.8.tar.gz | shasum -a 256 -c -
mkdir pkg && tar -xzf ddtrace-4.15.8.tar.gz -C pkg --strip-components 1
disclude scan --untrusted --severity info pkg