-
Notifications
You must be signed in to change notification settings - Fork 9
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
[nodejs] create new weblog for express 5 #3572
Draft
IlyasShabi
wants to merge
10
commits into
main
Choose a base branch
from
express5-weblog
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
4c55e3a
[nodejs] create new weblog for express 5
IlyasShabi 064ed66
fix lint issues
IlyasShabi 4484f99
target express 5 version for dev tests
IlyasShabi f7d90d3
fix express weblog order
IlyasShabi 76a5f69
remove express 5 folder and use same as express 4
IlyasShabi 8f5659d
rename express folder
IlyasShabi 013e560
fix linter
IlyasShabi 0f840fb
fix unnamed wildcard for express 4
IlyasShabi 3e026f8
fix packages versions
IlyasShabi 43f01eb
fix nodejs.yml express5 versions
IlyasShabi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,7 +55,9 @@ class TestHeaderInjection(BaseSinkTest): | |
insecure_endpoint = "/iast/header_injection/test_insecure" | ||
secure_endpoint = "/iast/header_injection/test_secure" | ||
data = {"test": "dummyvalue"} | ||
location_map = {"nodejs": {"express4": "iast/index.js", "express4-typescript": "iast.ts"}} | ||
location_map = { | ||
"nodejs": {"express4": "iast/index.js", "express4-typescript": "iast.ts", "express5": "iast/index.js"} | ||
} | ||
|
||
@missing_feature(context.library < "[email protected]", reason="Metrics not implemented") | ||
@missing_feature(library="dotnet", reason="Not implemented yet") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,9 @@ class TestInsecureCookie(BaseSinkTest): | |
insecure_endpoint = "/iast/insecure-cookie/test_insecure" | ||
secure_endpoint = "/iast/insecure-cookie/test_secure" | ||
data = {} | ||
location_map = {"nodejs": {"express4": "iast/index.js", "express4-typescript": "iast.ts"}} | ||
location_map = { | ||
"nodejs": {"express4": "iast/index.js", "express4-typescript": "iast.ts", "express5": "iast/index.js"} | ||
} | ||
|
||
@bug(context.library < "[email protected]", reason="APMRP-360") | ||
def test_secure(self): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ class TestLDAPInjection(BaseSinkTest): | |
data = {"username": "ssam", "password": "sammy"} | ||
location_map = { | ||
"java": "com.datadoghq.system_tests.iast.utils.LDAPExamples", | ||
"nodejs": {"express4": "iast/index.js", "express4-typescript": "iast.ts"}, | ||
"nodejs": {"express4": "iast/index.js", "express4-typescript": "iast.ts", "express5": "iast/index.js"}, | ||
} | ||
|
||
@missing_feature(context.library < "[email protected]", reason="Metrics not implemented") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,9 @@ class TestNoHttponlyCookie(BaseSinkTest): | |
insecure_endpoint = "/iast/no-httponly-cookie/test_insecure" | ||
secure_endpoint = "/iast/no-httponly-cookie/test_secure" | ||
data = {} | ||
location_map = {"nodejs": {"express4": "iast/index.js", "express4-typescript": "iast.ts"}} | ||
location_map = { | ||
"nodejs": {"express4": "iast/index.js", "express4-typescript": "iast.ts", "express5": "iast/index.js"} | ||
} | ||
|
||
@bug(context.library < "[email protected]", reason="APMRP-360") | ||
def test_secure(self): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,9 @@ class TestNoSamesiteCookie(BaseSinkTest): | |
insecure_endpoint = "/iast/no-samesite-cookie/test_insecure" | ||
secure_endpoint = "/iast/no-samesite-cookie/test_secure" | ||
data = {} | ||
location_map = {"nodejs": {"express4": "iast/index.js", "express4-typescript": "iast.ts"}} | ||
location_map = { | ||
"nodejs": {"express4": "iast/index.js", "express4-typescript": "iast.ts", "express5": "iast/index.js"} | ||
} | ||
|
||
@bug(context.library < "[email protected]", reason="APMRP-360") | ||
def test_secure(self): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,9 @@ class TestNoSqlMongodbInjection(BaseSinkTest): | |
insecure_endpoint = "/iast/mongodb-nosql-injection/test_insecure" | ||
secure_endpoint = "/iast/mongodb-nosql-injection/test_secure" | ||
data = {"key": "somevalue"} | ||
location_map = {"nodejs": {"express4": "iast/index.js", "express4-typescript": "iast.ts"}} | ||
location_map = { | ||
"nodejs": {"express4": "iast/index.js", "express4-typescript": "iast.ts", "express5": "iast/index.js"} | ||
} | ||
|
||
@missing_feature(context.library < "[email protected]", reason="Not implemented yet") | ||
@missing_feature(library="python", reason="Not implemented yet") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,10 @@ class TestParameterName(BaseSourceTest): | |
|
||
setup_source_post_reported = BaseSourceTest.setup_source_reported | ||
|
||
@missing_feature(weblog_variant="express4", reason="Tainted as request body") | ||
@missing_feature( | ||
context.library == "nodejs" and context.weblog_variant in ["express4", "express5"], | ||
reason="Tainted as request body", | ||
) | ||
@bug(weblog_variant="resteasy-netty3", reason="APPSEC-55687") | ||
@bug(library="python", reason="APPSEC-55689") | ||
@missing_feature(library="dotnet", reason="Tainted as request body") | ||
|
@@ -37,7 +40,10 @@ def test_source_get_reported(self): | |
""" for use case where only one is reported, we want to keep a test on the one reported """ | ||
self.validate_request_reported(self.requests["GET"]) | ||
|
||
@missing_feature(weblog_variant="express4", reason="Tainted as request body") | ||
@missing_feature( | ||
context.library == "nodejs" and context.weblog_variant in ["express4", "express5"], | ||
reason="Tainted as request body", | ||
) | ||
@bug(context.library < "[email protected]" and context.weblog_variant == "jersey-grizzly2", reason="APPSEC-55387") | ||
@bug(weblog_variant="resteasy-netty3", reason="APPSEC-55687") | ||
@bug(library="python", reason="APPSEC-55689") | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is surprising, it goes from
weblog_variant == "express4"
toweblog_variant not in ["express4" ...)
. Is it intended ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks I will fix this, the feature is currently marked as missing in
nodejs.yml
The failing test in nodejs prod is expected as my PR hasn't been merged yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, passing the PR as draft to unstress my noti stack. You can set it back to normal once it's ready to be merged.