Skip to content

Commit 7585239

Browse files
authored
chore(ci): move IAST leak testing to riot (#13544)
## 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 - [ ] 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) --------- Signed-off-by: Juanjo Alvarez <[email protected]>
1 parent b5ea41e commit 7585239

File tree

8 files changed

+128
-33
lines changed

8 files changed

+128
-33
lines changed

.riot/requirements/6780b6b.txt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.12
3+
# by the following command:
4+
#
5+
# pip-compile --no-annotate .riot/requirements/6780b6b.in
6+
#
7+
annotated-types==0.7.0
8+
anyio==4.9.0
9+
attrs==25.3.0
10+
certifi==2025.4.26
11+
charset-normalizer==3.4.2
12+
coverage[toml]==7.8.2
13+
hypothesis==6.45.0
14+
idna==3.10
15+
iniconfig==2.1.0
16+
mock==5.2.0
17+
opentracing==2.4.0
18+
packaging==25.0
19+
pluggy==1.6.0
20+
pydantic==2.11.5
21+
pydantic-core==2.33.2
22+
pydantic-settings==2.9.1
23+
pygments==2.19.1
24+
pytest==8.4.0
25+
pytest-asyncio==1.0.0
26+
pytest-cov==6.1.1
27+
pytest-mock==3.14.1
28+
python-dotenv==1.1.0
29+
requests==2.32.3
30+
sniffio==1.3.1
31+
sortedcontainers==2.4.0
32+
typing-extensions==4.14.0
33+
typing-inspection==0.4.1
34+
urllib3==2.4.0

.riot/requirements/73136d3.txt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.10
3+
# by the following command:
4+
#
5+
# pip-compile --no-annotate .riot/requirements/73136d3.in
6+
#
7+
annotated-types==0.7.0
8+
anyio==4.9.0
9+
attrs==25.3.0
10+
certifi==2025.4.26
11+
charset-normalizer==3.4.2
12+
coverage[toml]==7.8.2
13+
exceptiongroup==1.3.0
14+
hypothesis==6.45.0
15+
idna==3.10
16+
iniconfig==2.1.0
17+
mock==5.2.0
18+
opentracing==2.4.0
19+
packaging==25.0
20+
pluggy==1.6.0
21+
pydantic==2.11.5
22+
pydantic-core==2.33.2
23+
pydantic-settings==2.9.1
24+
pygments==2.19.1
25+
pytest==8.4.0
26+
pytest-asyncio==1.0.0
27+
pytest-cov==6.1.1
28+
pytest-mock==3.14.1
29+
python-dotenv==1.1.0
30+
requests==2.32.3
31+
sniffio==1.3.1
32+
sortedcontainers==2.4.0
33+
tomli==2.2.1
34+
typing-extensions==4.14.0
35+
typing-inspection==0.4.1
36+
urllib3==2.4.0

.riot/requirements/ba34840.txt

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.11
3+
# by the following command:
4+
#
5+
# pip-compile --no-annotate .riot/requirements/ba34840.in
6+
#
7+
annotated-types==0.7.0
8+
anyio==4.9.0
9+
attrs==25.3.0
10+
certifi==2025.4.26
11+
charset-normalizer==3.4.2
12+
coverage[toml]==7.8.2
13+
hypothesis==6.45.0
14+
idna==3.10
15+
iniconfig==2.1.0
16+
mock==5.2.0
17+
opentracing==2.4.0
18+
packaging==25.0
19+
pluggy==1.6.0
20+
pydantic==2.11.5
21+
pydantic-core==2.33.2
22+
pydantic-settings==2.9.1
23+
pygments==2.19.1
24+
pytest==8.4.0
25+
pytest-asyncio==1.0.0
26+
pytest-cov==6.1.1
27+
pytest-mock==3.14.1
28+
python-dotenv==1.1.0
29+
requests==2.32.3
30+
sniffio==1.3.1
31+
sortedcontainers==2.4.0
32+
typing-extensions==4.14.0
33+
typing-inspection==0.4.1
34+
urllib3==2.4.0

hatch.toml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -626,37 +626,6 @@ fastapi = ["==0.94.1"]
626626
python = ["3.8", "3.10", "3.13"]
627627
fastapi = ["~=0.114.2"]
628628

629-
## ASM Appsec Aggregated Leak Testing
630-
631-
[envs.iast_aggregated_leak_testing]
632-
template = "iast_aggregated_leak_testing"
633-
dependencies = [
634-
"pytest",
635-
"pytest-cov",
636-
"hypothesis",
637-
"requests",
638-
"pytest-asyncio",
639-
"anyio",
640-
"pydantic",
641-
"pydantic-settings",
642-
]
643-
644-
[envs.iast_aggregated_leak_testing.env-vars]
645-
DD_IAST_ENABLED = "true"
646-
_DD_IAST_PATCH_MODULES = "benchmarks.,tests.appsec.,scripts.iast."
647-
DD_FAST_BUILD = "0"
648-
649-
[envs.iast_aggregated_leak_testing.scripts]
650-
test = [
651-
"uname -a",
652-
"pip freeze",
653-
# We use --no-cov due to a pytest-cov problem with eval https://github.com/pytest-dev/pytest-cov/issues/676
654-
"python -m pytest --no-cov tests/appsec/iast_aggregated_memcheck/test_aggregated_memleaks.py",
655-
]
656-
657-
[[envs.iast_aggregated_leak_testing.matrix]]
658-
python = ["3.10", "3.11", "3.12"]
659-
660629
## pytorch profiling test
661630

662631
[envs.profiling_pytorch]

lib-injection/sources/min_compatible_versions.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ psycopg,0
132132
psycopg2-binary,~=2.8.0
133133
py-cpuinfo,~=8.0.0
134134
pycryptodome,0
135+
pydantic,0
136+
pydantic-settings,0
135137
pyfakefs,0
136138
pylibmc,~=1.6.2
137139
pymemcache,~=3.4.2

min_compatible_versions.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ psycopg,0
132132
psycopg2-binary,~=2.8.0
133133
py-cpuinfo,~=8.0.0
134134
pycryptodome,0
135+
pydantic,0
136+
pydantic-settings,0
135137
pyfakefs,0
136138
pylibmc,~=1.6.2
137139
pymemcache,~=3.4.2

riotfile.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,24 @@ def select_pys(min_version: str = MIN_PYTHON_VERSION, max_version: str = MAX_PYT
144144
"DD_IAST_REQUEST_SAMPLING": "100",
145145
},
146146
),
147+
Venv(
148+
name="iast_aggregated_leak_testing",
149+
pys=["3.10", "3.11", "3.12"],
150+
# We use --no-cov due to a pytest-cov problem with eval https://github.com/pytest-dev/pytest-cov/issues/676
151+
command="pytest --no-cov {cmdargs} tests/appsec/iast_aggregated_memcheck/test_aggregated_memleaks.py",
152+
pkgs={
153+
"requests": latest,
154+
"pytest-asyncio": latest,
155+
"anyio": latest,
156+
"pydantic": latest,
157+
"pydantic-settings": latest,
158+
},
159+
env={
160+
"DD_IAST_ENABLED": "true",
161+
"_DD_IAST_PATCH_MODULES": "benchmarks.,tests.appsec.,scripts.iast.",
162+
"DD_FAST_BUILD": "0",
163+
},
164+
),
147165
Venv(
148166
name="profile-diff",
149167
command="python scripts/diff.py {cmdargs}",

tests/appsec/suitespec.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ suites:
7070
paths:
7171
- '@appsec_iast'
7272
- tests/appsec/iast_aggregated_memcheck/*
73-
runner: hatch
74-
timeout: 50m
73+
runner: riot
74+
timeout: 60m
7575
appsec_iast_packages:
7676
paths:
7777
- '@appsec_iast'

0 commit comments

Comments
 (0)