Skip to content

Commit 4f0edf7

Browse files
committed
update iast stack trace tests
1 parent f3c6ce1 commit 4f0edf7

File tree

3 files changed

+39
-14
lines changed

3 files changed

+39
-14
lines changed

manifests/nodejs.yml

+37-12
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ refs:
4242
- &ref_5_27_0 '>=5.27.0 || ^4.51.0'
4343
- &ref_5_29_0 '>=5.29.0 || ^4.53.0' # express 5 support
4444
- &ref_5_30_0 '>=5.30.0 || ^4.54.0'
45+
- &ref_5_31_0 '>=5.31.0 || ^4.55.0'
4546

4647
tests/:
4748
apm_tracing_e2e/:
@@ -94,12 +95,16 @@ tests/:
9495
TestCodeInjection:
9596
'*': *ref_5_20_0
9697
nextjs: missing_feature
97-
TestCodeInjection_StackTrace: missing_feature
98+
TestCodeInjection_StackTrace:
99+
'*': *ref_5_31_0
100+
nextjs: missing_feature
98101
test_command_injection.py:
99102
TestCommandInjection:
100103
'*': *ref_3_11_0
101104
nextjs: missing_feature
102-
TestCommandInjection_StackTrace: missing_feature
105+
TestCommandInjection_StackTrace:
106+
'*': *ref_5_31_0
107+
nextjs: missing_feature
103108
test_hardcoded_passwords.py:
104109
Test_HardcodedPasswords:
105110
'*': *ref_5_13_0
@@ -133,7 +138,9 @@ tests/:
133138
'*': *ref_5_26_0
134139
express5: *ref_5_29_0 # test uses querystring
135140
nextjs: missing_feature
136-
TestHeaderInjection_StackTrace: missing_feature
141+
TestHeaderInjection_StackTrace:
142+
'*': *ref_5_31_0
143+
nextjs: missing_feature
137144
test_hsts_missing_header.py:
138145
Test_HstsMissingHeader:
139146
'*': *ref_4_8_0
@@ -154,7 +161,9 @@ tests/:
154161
TestLDAPInjection:
155162
'*': *ref_4_1_0
156163
nextjs: missing_feature
157-
TestLDAPInjection_StackTrace: missing_feature
164+
TestLDAPInjection_StackTrace:
165+
'*': *ref_5_31_0
166+
nextjs: missing_feature
158167
test_no_httponly_cookie.py:
159168
TestNoHttponlyCookie:
160169
'*': *ref_4_3_0
@@ -180,20 +189,26 @@ tests/:
180189
TestPathTraversal:
181190
'*': *ref_3_19_0
182191
nextjs: missing_feature
183-
TestPathTraversal_StackTrace: missing_feature
192+
TestPathTraversal_StackTrace:
193+
'*': *ref_5_31_0
194+
nextjs: missing_feature
184195
test_reflection_injection.py:
185196
TestReflectionInjection: missing_feature
186197
TestReflectionInjection_StackTrace: missing_feature
187198
test_sql_injection.py:
188199
TestSqlInjection:
189200
'*': *ref_3_11_0
190201
nextjs: missing_feature
191-
TestSqlInjection_StackTrace: missing_feature
202+
TestSqlInjection_StackTrace:
203+
'*': *ref_5_31_0
204+
nextjs: missing_feature
192205
test_ssrf.py:
193206
TestSSRF:
194207
'*': *ref_4_1_0
195208
nextjs: missing_feature
196-
TestSSRF_StackTrace: missing_feature
209+
TestSSRF_StackTrace:
210+
'*': *ref_5_31_0
211+
nextjs: missing_feature
197212
test_template_injection.py:
198213
TestTemplateInjection:
199214
'*': *ref_5_26_0
@@ -208,32 +223,42 @@ tests/:
208223
TestUnvalidatedHeader:
209224
'*': *ref_4_3_0
210225
nextjs: missing_feature
211-
TestUnvalidatedHeader_StackTrace: missing_feature
226+
TestUnvalidatedHeader_StackTrace:
227+
'*': *ref_5_31_0
228+
nextjs: missing_feature
212229
TestUnvalidatedRedirect:
213230
'*': *ref_4_3_0
214231
nextjs: missing_feature
215-
TestUnvalidatedRedirect_StackTrace: missing_feature
232+
TestUnvalidatedRedirect_StackTrace:
233+
'*': *ref_5_31_0
234+
nextjs: missing_feature
216235
test_unvalidated_redirect_forward.py:
217236
TestUnvalidatedForward: missing_feature
218237
TestUnvalidatedForward_StackTrace: missing_feature
219238
test_weak_cipher.py:
220239
TestWeakCipher:
221240
'*': *ref_3_6_0
222241
nextjs: missing_feature
223-
TestWeakCipher_StackTrace: missing_feature
242+
TestWeakCipher_StackTrace:
243+
'*': *ref_5_31_0
244+
nextjs: missing_feature
224245
test_weak_hash.py:
225246
TestDeduplication:
226247
'*': *ref_3_11_0
227248
nextjs: missing_feature
228249
TestWeakHash:
229250
'*': *ref_3_11_0
230251
nextjs: missing_feature
231-
TestWeakHash_StackTrace: missing_feature
252+
TestWeakHash_StackTrace:
253+
'*': *ref_5_31_0
254+
nextjs: missing_feature
232255
test_weak_randomness.py:
233256
TestWeakRandomness:
234257
'*': *ref_5_1_0
235258
nextjs: missing_feature
236-
TestWeakRandomness_StackTrace: missing_feature
259+
TestWeakRandomness_StackTrace:
260+
'*': *ref_5_31_0
261+
nextjs: missing_feature
237262
test_xcontent_sniffing.py:
238263
Test_XContentSniffing:
239264
'*': *ref_4_8_0

tests/appsec/iast/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def validate_stack_traces(request):
233233
and location["line"] == frame["line"]
234234
)
235235
) or (
236-
stack_trace["language"] == "python"
236+
stack_trace["language"] in ("python", "nodejs")
237237
and (frame.get("file", "").endswith(location["path"]) and location["line"] == frame["line"])
238238
):
239239
locationFrame = frame

utils/scripts/load-binary.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ elif [ "$TARGET" = "agent" ]; then
215215
elif [ "$TARGET" = "nodejs" ]; then
216216
assert_version_is_dev
217217
# NPM builds the package, so we put a trigger file that tells install script to get package from github#master
218-
echo "DataDog/dd-trace-js#master" > nodejs-load-from-npm
218+
echo "DataDog/dd-trace-js#iast-stack-trace" > nodejs-load-from-npm
219219

220220
elif [ "$TARGET" = "waf_rule_set_v1" ]; then
221221
exit 1

0 commit comments

Comments
 (0)