Skip to content

Commit ac66b59

Browse files
committed
chore(iast): split wrapped_view hook
1 parent 23db957 commit ac66b59

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/appsec/iast/conftest.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,13 @@ def iast_span_defaults(tracer):
138138
yield span
139139

140140

141-
# The log contains "[IAST]" but "[IAST] create_context" or "[IAST] reset_context" are valid
142-
IAST_VALID_LOG = re.compile(r"(?=.*\[IAST\] )(?!.*\[IAST\] (create_context|reset_context))")
141+
# Check if the log contains "[IAST]" to raise an error if that’s the case BUT, if the logs contains
142+
# "[IAST] create_context", "[IAST] reset_context", "[IAST] allowing", "[IAST] denying" or "[IAST] astpatch_source"
143+
# are valid logs
144+
IAST_VALID_LOG = re.compile(
145+
r"(?=.*\[IAST\] )(?!.*\[IAST\] "
146+
r"(Patching|Enabled|astpatch_source|compile_code|allowing|denying|create_context|reset_context))"
147+
)
143148

144149

145150
@pytest.fixture(autouse=True)

0 commit comments

Comments
 (0)