diff --git a/benchmarks/appsec_iast_aspects/config.yaml b/benchmarks/appsec_iast_aspects/config.yaml index 04c56704e52..0f339ab73a0 100644 --- a/benchmarks/appsec_iast_aspects/config.yaml +++ b/benchmarks/appsec_iast_aspects/config.yaml @@ -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" diff --git a/benchmarks/appsec_iast_aspects/functions.py b/benchmarks/appsec_iast_aspects/functions.py index 1ec76f7b8da..4e708d3ab4a 100644 --- a/benchmarks/appsec_iast_aspects/functions.py +++ b/benchmarks/appsec_iast_aspects/functions.py @@ -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") diff --git a/hatch.toml b/hatch.toml index 959551a7dbe..056ad593722 100644 --- a/hatch.toml +++ b/hatch.toml @@ -300,7 +300,7 @@ dependencies = [ "pytest-cov", "requests", "hypothesis", - "httpx", + "httpx<0.28.0", "anyio{matrix:anyio:}", "fastapi{matrix:fastapi}" ]