Skip to content

Commit f573140

Browse files
committed
chore(iast): test code injection in ci
1 parent 3346ccf commit f573140

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

hatch.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,8 @@ _DD_IAST_PATCH_MODULES = "scripts.iast"
466466
test = [
467467
"uname -a",
468468
"pip freeze",
469-
"python -m pytest tests/appsec/iast_aggregated_memcheck/test_aggregated_memleaks.py",
469+
# We use --no-cov due to a pytest-cov problem with eval https://github.com/pytest-dev/pytest-cov/issues/676
470+
"python -m pytest --no-cov tests/appsec/iast_aggregated_memcheck/test_aggregated_memleaks.py",
470471
]
471472

472473
[[envs.iast_aggregated_leak_testing.matrix]]

scripts/iast/mod_leak_functions.py

+1
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ def sink_points(string_tainted):
258258
except Exception:
259259
pass
260260

261+
_ = eval(f"'a' + '{string_tainted}'")
261262
# Weak Randomness vulnerability
262263
_ = random.randint(1, 10)
263264

0 commit comments

Comments
 (0)