Commit fbc3e74
chore(iast): fix iast in the ci (#15175)
# Summary
This PR extends **PR #15141**'s fork safety implementation to properly
handle IAST in the CI/pytest environment. It fixes two critical issues:
1. **Threading race conditions** in FastAPI tests (Python 3.12) with
anyio's multi-threaded execution
2. **Fork safety in pytest** by ensuring IAST is always disabled in
child processes during test execution
The solution adds a pytest-specific mode flag that enhances the existing
fork handler without affecting production behavior.
## Context
This PR builds on top of **PR #15141** which implemented fork safety for
IAST by disabling it in multiprocess child processes. That PR
successfully prevented segfaults in production multiprocessing scenarios
but revealed additional issues in the CI/pytest environment.1 parent 5f68267 commit fbc3e74
File tree
4 files changed
+31
-19
lines changed- ddtrace
- appsec/_iast
- settings
- tests/appsec/iast
- aspects
- taint_tracking
4 files changed
+31
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
90 | 100 | | |
91 | 101 | | |
92 | 102 | | |
| |||
168 | 178 | | |
169 | 179 | | |
170 | 180 | | |
| 181 | + | |
171 | 182 | | |
172 | 183 | | |
173 | 184 | | |
| |||
183 | 194 | | |
184 | 195 | | |
185 | 196 | | |
186 | | - | |
187 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
188 | 208 | | |
189 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
190 | 214 | | |
191 | 215 | | |
192 | 216 | | |
193 | | - | |
194 | 217 | | |
195 | 218 | | |
196 | 219 | | |
197 | 220 | | |
198 | | - | |
199 | 221 | | |
200 | 222 | | |
201 | 223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
| 144 | + | |
143 | 145 | | |
144 | 146 | | |
145 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 11 | + | |
18 | 12 | | |
19 | 13 | | |
20 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 12 | + | |
19 | 13 | | |
20 | 14 | | |
21 | 15 | | |
| |||
0 commit comments