ddtrace 4.17.1
- Source
- https://github.com/DataDog/dd-trace-py
- Artifact scanned
ddtrace-4.17.1.tar.gz- Compared with
ddtrace-4.17.0.tar.gz(0 signals introduced since)- Files
- 1545 scanned, 60 skipped (binary, oversized, or unrecognised)
- Signals
- 0 critical · 0 warn · 41 info
- Scan time
- 35.3 s
- LLM review
- Reviewed by claude-haiku-5-5 (Anthropic): 38 of 38 warn and critical signals; 38 demoted to info.
- Disclude version
- 4.3.0
- Scanned (UTC)
- 2026-11-17 18:13
Signals
Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.
-
info
warn→ info by reviewdecoder-decompress-payloadddtrace/appsec/_contrib/aiohttp/_multipart.py:233:28-= 1 = += =likely benign Bounded zlib decompression of multipart request body parts for AppSec inspection.Reasoning
Standard multipart decompression with a size limit (limit - len(decompressed)) and unused_data handling for gzip/deflate Content-Encoding in an AppSec body parser. This is legitimate request-body decoding, not a hidden payload.
-
= .. =likely benign Retrieves the calling module's name via frame introspection to patch its source for IAST instrumentation.Reasoning
Using inspect.currentframe().f_back.f_globals to find the calling module name is a common instrumentation technique for IAST module patching. The sys.exit/exec/eval co-occurrence is a generic heuristic hit from the file's own IAST loader code, not an anti-analysis evasion.
-
= # creating a new module environment to execute the patched code from scratch =likely benign Compiles the AST of an instrumented module after patching it for IAST taint tracking.Reasoning
compile() of AST that was patched from the module's own source file to insert IAST taint-tracking hooks. This is the expected behavior of an in-process source-rewriting instrumentation library; the source comes from the local module file, not from a remote or encoded payload.
-
# executing the compiled code in the new module environment # nosec B102likely benign Executes the instrumented module code into its existing namespace during IAST module reloading.Reasoning
exec of compiled, self-patched module code into the module's own __dict__ is the mechanism of the import hook. The nosec B102 comment shows it is a known, reviewed pattern; the code originates from the local source file.
-
# Patched source is compiled in order to execute it =likely benign Compiles the patched AST of a module within the IAST loader.Reasoning
Same IAST source-rewriting loader pattern: compiles the patched AST of a local module file with debug logging on failure. Consistent with legitimate instrumentation.
-
# Patched source is executed instead of original module # nosec B102likely benign Executes the instrumented module code in place of the original module.Reasoning
Executes the instrumented module code in its own namespace, with nosec annotation and error logging. This is the standard exec step of a source-transform import hook, not malicious execution.
-
info
warn→ info by reviewmacro-keyword-overrideddtrace/appsec/_iast/_taint_tracking/constants.h:3:1likely benign C header macro aliasing the type name long to RANGE_START for the taint-tracking native module.Reasoning
Defining RANGE_START as long is a benign type-alias macro in a C header for a native extension. The keyword-override heuristic fires on a common C macro idiom with no obfuscation purpose.
-
info
warn→ info by reviewmacro-keyword-overrideddtrace/appsec/_iast/_taint_tracking/constants.h:4:1likely benign C header macro aliasing long to RANGE_LENGTH for the taint-tracking native module.Reasoning
Same benign type-alias macro pattern as RANGE_START, used for range length in a native taint-tracking header.
-
info
warn→ info by reviewframe-introspectionddtrace/appsec/_iast/taint_sinks/code_injection.py:101:26= =likely benign Retrieves the current frame to resolve the caller frame for a code injection taint sink.Reasoning
Frame introspection is used to locate the caller of a code-injection sink so taint reports point to the right location. It is a legitimate debugging/reporting technique in a security instrumentation library.
-
info
warn→ info by reviewframe-introspectionddtrace/appsec/_iast/taint_sinks/code_injection.py:114:30= =likely benign Retrieves the current frame again to resolve the caller frame in the code injection sink's fallback path.Reasoning
Repeats the same caller-frame resolution for the sink reporting path, which is legitimate instrumentation logic.
-
= # cache so we warn at most once per symbol returnlikely benign Module __getattr__ that lazily resolves and caches deprecated attribute names.Reasoning
Module-level __getattr__ that caches a lazily resolved attribute into globals() and warns once. This is a standard lazy-import / deprecation-shim pattern with no concealment.
-
= = # cache so we warn at most once per symbol returnlikely benign Module __getattr__ that forwards and caches attributes from litellm on first access.Reasoning
Same lazy module __getattr__ caching pattern, forwarding attributes from the litellm module. Standard and benign.
-
= = # cache so we warn at most once per symbol returnlikely benign Lazy module attribute lookup that caches the resolved attribute in globals.Reasoning
This is a standard module-level __getattr__ lazy-loading pattern. It caches the attribute in globals() and raises AttributeError otherwise, with no external input or execution path.
-
# But can vary depending on Python versions; that's why we use an heuristic = . = Nonelikely benign Uses frame introspection to infer the boto operation name for tracing spans.Reasoning
Walking the call stack with inspect.currentframe().f_back is a heuristic to find the operation name for tracing. It is read-only introspection with no harmful effect.
-
returnlikely benign Module-level lazy attribute resolution via globals().Reasoning
This is the same lazy module __getattr__ pattern, reading names from globals() and raising AttributeError for unknown names. Nothing is fetched or executed externally.
-
, =, =, =,likely benign Captures the instrumented caller's frame for debugger probe hooks.Reasoning
The dynamic debugger captures the frame at a fixed hook depth to evaluate probe conditions and collect locals. This is the expected behavior of a debugger library.
-
# Try with a built-in type first return # type: ignore[index] # Otherwise we expect a fully qualified namelikely benign Resolves built-in type names from __builtins__ for debugger expression type checks.Reasoning
The lookup resolves built-in type names for isinstance checks inside debugger probe expressions, with a KeyError fallback to qualified names. The name comes from the probe definition and the operation is a type check only.
-
, = = # type: ignore[index] , = ,likely benign Maps an expression operator type name to a built-in function in the debugger expression compiler.Reasoning
This indexes __builtins__ with a type name taken from the expression grammar to map to a built-in callable. It is a bounded lookup in the expression compiler, not arbitrary execution.
-
= =likely benign Grabs the caller's frame globals to support evaluating assembly-expression text.Reasoning
This is a bytecode assembler DSL used for dynamic instrumentation. It reads the caller's globals and locals to evaluate developer-written expressions. The critical severity comes from the generic anti-analysis flag, not from malicious behavior, but eval of text in caller scope warrants a reasonable check that the input is trusted.
-
return # noseclikely benign eval of assembler expression text in the caller's frame namespace.Reasoning
eval runs on text passed to the bytecode assembler DSL, in the caller's namespace. The call is marked nosec and fits the library's purpose. The risk depends on whether that text can come from untrusted input, which the snippet does not show.
-
= == :likely benign Lazy compatibility constant that caches the Python version in globals.Reasoning
This is a lazy module attribute pattern that caches python_version() into globals for a PYTHON_VERSION-style name. It is a benign compatibility shim.
-
=likely benign Lazy compatibility constant that caches the Python implementation name in globals.Reasoning
Same lazy compatibility pattern, caching python_implementation() into globals. No external input or execution.
-
returnlikely benign Module-level __getattr__ fallback for lazily computed compatibility names.Reasoning
This is the module __getattr__ fallback that reads from globals and raises AttributeError on a miss, a standard compatibility idiom.
-
info
warn→ info by reviewdynamic-executionddtrace/internal/datadog/profiling/build_standalone.sh:41:5likely benign Build helper that runs a caller-supplied tool with --version to parse its version.Reasoning
The function runs a tool path passed as $1 to read its version. This is a build-script helper whose callers are the project's own build steps. It is not a sign of a hidden payload, but it does run whatever command it is given.
-
info
critical→ info by reviewdynamic-executionddtrace/internal/datadog/profiling/build_standalone.sh:66:5if ; then filikely benign Build-script helper that uses eval to assign a version value to a named variable.Reasoning
eval assigns a variable named by the caller to a parsed version string. It is a classic eval-injection shape, but it runs at build time on values derived from local tool output, so exposure is limited. Critical severity is overstated for a build script.
-
-
if ! -
info
warn→ info by reviewdynamic-executionddtrace/internal/datadog/profiling/stack/fuzz/build.sh:39:7for; do | && breaklikely benign Installs the Rust toolchain by piping the official rustup script to sh.Reasoning
This is the official rustup installer fetched over TLS 1.2 with https-only enforcement and retried in a loop. Piping a remote script to sh is risky in general, but it is the standard documented Rust toolchain install for a fuzz build. Only the sh.rustup.rs origin is trusted here.
-
info
warn→ info by reviewdynamic-importddtrace/internal/datadog/profiling/stack/fuzz/build.sh:44:5donelikely benign Sources the cargo environment file after a rustup install.Reasoning
Sourcing $HOME/.cargo/env is the standard step after a rustup install to put cargo on PATH. The path is fixed relative to HOME and has no external input.
-
= .likely benign Reads the caller's module globals to set up lazy module attribute loading.Reasoning
sys._getframe(1).f_globals is the common idiom for installing a module-level __getattr__ for lazy attribute loading. It reads the caller's globals and does not execute anything.
-
info
warn→ info by reviewdecoder-decompress-payloadddtrace/internal/openfeature/_agentless.py:109:16return returnlikely benign Decompresses gzip-encoded HTTP response bodies based on the Content-Encoding header.Reasoning
gzip.decompress is applied to an HTTP response body when Content-Encoding is gzip. This is ordinary protocol handling, not an embedded payload.
-
likely benign Defines inline as __inline on MSVC for compiler compatibility.
Reasoning
The macro is guarded by _MSC_VER and maps the C keyword inline to MSVC's __inline, a standard portability shim for older MSVC compilers.
-
= = 0likely benign Collects the current call stack to build stack-trace reports.Reasoning
inspect.stack(0) collects the current call stack for a stack-trace reporting feature in a security module. It does not send or hide anything.
-
# Make the frame object available to the contexts = # Freeze the list of contexts so that we know exactly which ones tolikely benign Stores the current frame in wrapping context storage for context hooks.Reasoning
sys._getframe at a fixed depth stores the frame in context storage so wrapped contexts can access it. This is internal tracing-framework plumbing.
-
= = returnlikely benign Lazily imports an integration by name and caches it in module globals.Reasoning
This is a standard lazy-import pattern: import a named integration module, cache it in globals, and return it. The target is a fixed package-internal module name.
-
# Start from the current frame and walk up the stack = return ,likely benign Walks the call stack to infer variable and module names for instrumentation.Reasoning
inspect.currentframe walks up the stack to recover variable and module names for tracing labels. It is read-only introspection used for instrumentation.
-
:////-//3e54cda11620a773d53c7f64d2ebb10d3a01794c/#multiple-headers ::dismissed A docstring link to the B3 propagation spec with a commit hash in the URL.Reasoning
The flagged text is a docstring URL containing a git commit hash. It is not a base64 blob or encoded payload.
-
:////-//3e54cda11620a773d53c7f64d2ebb10d3a01794c/#single-header ::dismissed A docstring link to the B3 single-header spec, with a commit hash in the URL.Reasoning
The flagged text is a docstring URL containing a git commit hash, not an encoded blob. This is a raw-pass false positive.
-
likely benign Execs a module-level ASYNC_SOURCE string to add async support on Python 3.5 and later.
Reasoning
This vendored dogstatsd module execs source compiled from ASYNC_SOURCE at import time, a common way to add async syntax without breaking older Pythons. The source is presumably a literal string in the same file, though its contents are not shown and should be checked.
-
likely benign Compiles the in-file ASYNC_SOURCE string for the exec call that adds async support.
Reasoning
compile is used only to feed the same exec call and compiles the in-file ASYNC_SOURCE. The pattern is legitimate if that constant is a fixed in-file literal, which the snippet does not confirm.
-
/// but whose Python attributes should read as `RemoteConfigProduct.LiveDebugging`).
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.
|
&&