Skip to content

Commit 56a6ca2

Browse files
avara1986wconti27randomandersonbrettlangdon
authored
chore(iast): test code injection performance in ci (#12195)
## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) --------- Co-authored-by: William Conti <[email protected]> Co-authored-by: Laplie Anderson <[email protected]> Co-authored-by: Brett Langdon <[email protected]>
1 parent 63d13ab commit 56a6ca2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

hatch.toml

Lines changed: 2 additions & 1 deletion
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

Lines changed: 1 addition & 0 deletions
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)