Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(iast): ensure context is created for current span [backport 2.6] #8785

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions ddtrace/appsec/_iast/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@ def on_span_start(self, span):
if not _is_iast_enabled():
return

from ._taint_tracking import create_context

create_context()

request_iast_enabled = False
if oce.acquire_request(span):
from ._taint_tracking import create_context

request_iast_enabled = True
create_context()

core.set_item(IAST.REQUEST_IAST_ENABLED, request_iast_enabled, span=span)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
fixes:
- |
Vulnerability Management for Code-level (IAST): This fix addresses an issue where tainting objects may fail due to context not being created in the current span.
Loading