Skip to content

Commit

Permalink
Merge branch 'christophe-papazian/enable_stack_traces_for_iast' of gi…
Browse files Browse the repository at this point in the history
…thub.com:DataDog/dd-trace-py into christophe-papazian/enable_stack_traces_for_iast
  • Loading branch information
christophe-papazian committed Nov 29, 2024
2 parents 2beaed2 + 9763895 commit bb89e5b
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
21 changes: 21 additions & 0 deletions benchmarks/appsec_iast_aspects/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,27 @@ modulo_aspect: &modulo_aspect
warmups: 1
function_name: "iast_modulo_aspect"

modulo_aspect_for_bytes: &modulo_aspect
processes: 10
loops: 5
values: 100
warmups: 1
function_name: "iast_modulo_aspect_for_bytes"

modulo_aspect_for_bytes_bytearray: &modulo_aspect
processes: 10
loops: 5
values: 100
warmups: 1
function_name: "iast_modulo_aspect_for_bytes_bytearray"

modulo_aspect_for_bytearray_bytearray: &modulo_aspect
processes: 10
loops: 5
values: 100
warmups: 1
function_name: "iast_modulo_aspect_for_bytearray_bytearray"

modulo_noaspect:
<<: *modulo_aspect
function_name: "modulo_noaspect"
Expand Down
12 changes: 12 additions & 0 deletions benchmarks/appsec_iast_aspects/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,18 @@ def iast_modulo_aspect():
return modulo_aspect("hello %s", "foo") # noqa: F821


def iast_modulo_aspect_for_bytes():
return modulo_aspect(b"hello %s", b"foo") # noqa: F821


def iast_modulo_aspect_for_bytes_bytearray():
return modulo_aspect(b"hello %s", bytearray(b"foo")) # noqa: F821


def iast_modulo_aspect_for_bytearray_bytearray():
return modulo_aspect(bytearray(b"hello %s"), bytearray(b"foo")) # noqa: F821


def modulo_noaspect():
return "{} {}".format("hello", "world")

Expand Down
2 changes: 1 addition & 1 deletion hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ dependencies = [
"pytest-cov",
"requests",
"hypothesis",
"httpx",
"httpx<0.28.0",
"anyio{matrix:anyio:}",
"fastapi{matrix:fastapi}"
]
Expand Down

0 comments on commit bb89e5b

Please sign in to comment.