Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update iast stack trace tests #3746

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 37 additions & 12 deletions manifests/nodejs.yml
IlyasShabi marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ refs:
- &ref_5_27_0 '>=5.27.0 || ^4.51.0'
- &ref_5_29_0 '>=5.29.0 || ^4.53.0' # express 5 support
- &ref_5_30_0 '>=5.30.0 || ^4.54.0'
- &ref_5_31_0 '>=5.31.0 || ^4.55.0'

tests/:
apm_tracing_e2e/:
Expand Down Expand Up @@ -94,12 +95,16 @@ tests/:
TestCodeInjection:
'*': *ref_5_20_0
nextjs: missing_feature
TestCodeInjection_StackTrace: missing_feature
TestCodeInjection_StackTrace:
'*': *ref_5_31_0
nextjs: missing_feature
test_command_injection.py:
TestCommandInjection:
'*': *ref_3_11_0
nextjs: missing_feature
TestCommandInjection_StackTrace: missing_feature
TestCommandInjection_StackTrace:
'*': *ref_5_31_0
nextjs: missing_feature
test_hardcoded_passwords.py:
Test_HardcodedPasswords:
'*': *ref_5_13_0
Expand Down Expand Up @@ -133,7 +138,9 @@ tests/:
'*': *ref_5_26_0
express5: *ref_5_29_0 # test uses querystring
nextjs: missing_feature
TestHeaderInjection_StackTrace: missing_feature
TestHeaderInjection_StackTrace:
'*': *ref_5_31_0
nextjs: missing_feature
test_hsts_missing_header.py:
Test_HstsMissingHeader:
'*': *ref_4_8_0
Expand All @@ -154,7 +161,9 @@ tests/:
TestLDAPInjection:
'*': *ref_4_1_0
nextjs: missing_feature
TestLDAPInjection_StackTrace: missing_feature
TestLDAPInjection_StackTrace:
'*': *ref_5_31_0
nextjs: missing_feature
test_no_httponly_cookie.py:
TestNoHttponlyCookie:
'*': *ref_4_3_0
Expand All @@ -180,20 +189,26 @@ tests/:
TestPathTraversal:
'*': *ref_3_19_0
nextjs: missing_feature
TestPathTraversal_StackTrace: missing_feature
TestPathTraversal_StackTrace:
'*': *ref_5_31_0
nextjs: missing_feature
test_reflection_injection.py:
TestReflectionInjection: missing_feature
TestReflectionInjection_StackTrace: missing_feature
test_sql_injection.py:
TestSqlInjection:
'*': *ref_3_11_0
nextjs: missing_feature
TestSqlInjection_StackTrace: missing_feature
TestSqlInjection_StackTrace:
'*': *ref_5_31_0
nextjs: missing_feature
test_ssrf.py:
TestSSRF:
'*': *ref_4_1_0
nextjs: missing_feature
TestSSRF_StackTrace: missing_feature
TestSSRF_StackTrace:
'*': *ref_5_31_0
nextjs: missing_feature
test_template_injection.py:
TestTemplateInjection:
'*': *ref_5_26_0
Expand All @@ -208,32 +223,42 @@ tests/:
TestUnvalidatedHeader:
'*': *ref_4_3_0
nextjs: missing_feature
TestUnvalidatedHeader_StackTrace: missing_feature
TestUnvalidatedHeader_StackTrace:
'*': *ref_5_31_0
nextjs: missing_feature
TestUnvalidatedRedirect:
'*': *ref_4_3_0
nextjs: missing_feature
TestUnvalidatedRedirect_StackTrace: missing_feature
TestUnvalidatedRedirect_StackTrace:
'*': *ref_5_31_0
nextjs: missing_feature
test_unvalidated_redirect_forward.py:
TestUnvalidatedForward: missing_feature
TestUnvalidatedForward_StackTrace: missing_feature
test_weak_cipher.py:
TestWeakCipher:
'*': *ref_3_6_0
nextjs: missing_feature
TestWeakCipher_StackTrace: missing_feature
TestWeakCipher_StackTrace:
'*': *ref_5_31_0
nextjs: missing_feature
test_weak_hash.py:
TestDeduplication:
'*': *ref_3_11_0
nextjs: missing_feature
TestWeakHash:
'*': *ref_3_11_0
nextjs: missing_feature
TestWeakHash_StackTrace: missing_feature
TestWeakHash_StackTrace:
'*': *ref_5_31_0
nextjs: missing_feature
test_weak_randomness.py:
TestWeakRandomness:
'*': *ref_5_1_0
nextjs: missing_feature
TestWeakRandomness_StackTrace: missing_feature
TestWeakRandomness_StackTrace:
'*': *ref_5_31_0
nextjs: missing_feature
test_xcontent_sniffing.py:
Test_XContentSniffing:
'*': *ref_4_8_0
Expand Down
2 changes: 1 addition & 1 deletion tests/appsec/iast/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def validate_stack_traces(request):
and location["line"] == frame["line"]
)
) or (
stack_trace["language"] == "python"
stack_trace["language"] in ("python", "nodejs")
and (frame.get("file", "").endswith(location["path"]) and location["line"] == frame["line"])
):
locationFrame = frame
Expand Down
2 changes: 1 addition & 1 deletion utils/scripts/load-binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ elif [ "$TARGET" = "agent" ]; then
elif [ "$TARGET" = "nodejs" ]; then
assert_version_is_dev
# NPM builds the package, so we put a trigger file that tells install script to get package from github#master
echo "DataDog/dd-trace-js#master" > nodejs-load-from-npm
echo "DataDog/dd-trace-js#iast-stack-trace" > nodejs-load-from-npm

elif [ "$TARGET" = "waf_rule_set_v1" ]; then
exit 1
Expand Down
Loading