Skip to content

Commit

Permalink
change approach
Browse files Browse the repository at this point in the history
  • Loading branch information
gnufede committed Jan 9, 2025
1 parent 9e4efe3 commit d5e368f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
7 changes: 7 additions & 0 deletions ddtrace/appsec/_asm_request_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,13 @@ def _on_set_request_tags(request, span, flask_config):
override_pyobject_tainted=True,
)

request.args = taint_structure(
request.args,
OriginType.QUERY_PARAMETER_NAME,
OriginType.QUERY_PARAMETER,
override_pyobject_tainted=True,
)


def _on_pre_tracedrequest(ctx):
current_span = ctx.span
Expand Down
12 changes: 6 additions & 6 deletions ddtrace/appsec/_iast/_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ def _on_flask_patch(flask_version):
)
_set_metric_iast_instrumented_source(OriginType.PARAMETER)

try_wrap_function_wrapper(
"werkzeug.datastructures",
"ImmutableMultiDict.keys",
functools.partial(if_iast_taint_yield_iterator_for, OriginType.PARAMETER_NAME),
)
_set_metric_iast_instrumented_source(OriginType.PARAMETER_NAME)
# try_wrap_function_wrapper(
# "werkzeug.datastructures",
# "ImmutableMultiDict.keys",
# functools.partial(if_iast_taint_yield_iterator_for, OriginType.PARAMETER_NAME),
# )
# _set_metric_iast_instrumented_source(OriginType.PARAMETER_NAME)

try_wrap_function_wrapper(
"werkzeug.datastructures",
Expand Down

0 comments on commit d5e368f

Please sign in to comment.