-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
252 additions
and
830 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,3 +43,6 @@ reportJunit.xml | |
# Visual Studio | ||
.vs/ | ||
.config/dotnet-tools.json | ||
|
||
# Node.js | ||
node_modules/ |
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 |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
dotnet="2.27.0", | ||
php_appsec="0.7.0", | ||
python={"django-poc": "1.10", "flask-poc": "1.10", "*": "?"}, | ||
nodejs="?", | ||
nodejs="3.19.0", | ||
golang="1.51.0", | ||
ruby="1.0.0", | ||
) | ||
|
@@ -55,6 +55,7 @@ def setup_path_params(self): | |
self.pp_req = weblog.get("/params/AiKfOeRcvG45") | ||
|
||
@missing_feature(library="java", reason="When supported, path parameter detection happens on subsequent WAF run") | ||
@missing_feature(library="nodejs", reason="Not supported yet") | ||
@irrelevant(context.library == "ruby" and context.weblog_variant == "rack") | ||
@irrelevant(context.library == "golang" and context.weblog_variant == "net-http") | ||
def test_path_params(self): | ||
|
@@ -75,6 +76,7 @@ def test_request_query(self): | |
def setup_cookies(self): | ||
self.c_req = weblog.get("/", headers={"Cookie": "mycookie=jdfoSDGFkivRG_234"}) | ||
|
||
@missing_feature(library="nodejs", reason="Not supported yet") | ||
def test_cookies(self): | ||
"""can block on server.request.cookies""" | ||
|
||
|
@@ -98,6 +100,7 @@ def setup_request_body_multipart(self): | |
@missing_feature(context.library == "dotnet", reason="Don't support multipart yet") | ||
@missing_feature(context.library == "php", reason="Don't support multipart yet") | ||
@missing_feature(context.library == "java", reason="Happens on a subsequent WAF run") | ||
@missing_feature(library="nodejs", reason="Not supported yet") | ||
@bug(context.library == "python" and context.weblog_variant == "django-poc", reason="Django bug in multipart body") | ||
@irrelevant(context.library == "golang", reason="Body blocking happens through SDK") | ||
def test_request_body_multipart(self): | ||
|
@@ -113,6 +116,7 @@ def setup_response_status(self): | |
@missing_feature(context.library == "java", reason="Happens on a subsequent WAF run") | ||
@missing_feature(context.library == "golang", reason="No blocking on server.response.*") | ||
@missing_feature(context.library < "[email protected]") | ||
@missing_feature(library="nodejs", reason="Not supported yet") | ||
def test_response_status(self): | ||
"""can block on server.response.status""" | ||
|
||
|
@@ -124,6 +128,7 @@ def setup_not_found(self): | |
|
||
@missing_feature(context.library == "java", reason="Happens on a subsequent WAF run") | ||
@missing_feature(context.library == "ruby", reason="Not working") | ||
@missing_feature(library="nodejs", reason="Not supported yet") | ||
@missing_feature(context.library == "golang", reason="No blocking on server.response.*") | ||
def test_not_found(self): | ||
"""can block on server.response.status""" | ||
|
@@ -138,6 +143,7 @@ def setup_response_header(self): | |
@missing_feature(context.library == "ruby") | ||
@missing_feature(context.library == "php", reason="Headers already sent at this stage") | ||
@missing_feature(context.library == "dotnet", reason="Address not supported yet") | ||
@missing_feature(library="nodejs", reason="Not supported yet") | ||
@missing_feature(context.library == "golang", reason="No blocking on server.response.*") | ||
def test_response_header(self): | ||
"""can block on server.response.headers.no_cookies""" | ||
|
@@ -178,7 +184,7 @@ def wrapper(span): | |
dotnet="2.29.0", | ||
golang="1.51.0", | ||
java="?", | ||
nodejs="?", | ||
nodejs="3.19.0", | ||
php_appsec="0.7.0", | ||
python={"django-poc": "1.10", "flask-poc": "1.10", "*": "?"}, | ||
ruby="?", | ||
|
@@ -226,7 +232,7 @@ def test_blocking_before(self): | |
dotnet="?", | ||
golang="1.51.0", | ||
java="?", | ||
nodejs="?", | ||
nodejs="3.19.0", | ||
php_appsec="0.7.0", | ||
python={"django-poc": "1.10", "flask-poc": "1.10", "*": "?"}, | ||
ruby="?", | ||
|
@@ -328,7 +334,7 @@ def test_blocking_before(self): | |
dotnet="2.29.0", | ||
golang="1.51.0", | ||
java="?", | ||
nodejs="?", | ||
nodejs="3.19.0", | ||
php_appsec="0.7.0", | ||
python={"django-poc": "1.10", "flask-poc": "1.10", "*": "?"}, | ||
ruby="?", | ||
|
@@ -382,7 +388,7 @@ def test_blocking_before(self): | |
dotnet="2.29.0", | ||
golang="1.51.0", | ||
java="?", | ||
nodejs="?", | ||
nodejs="3.19.0", | ||
php_appsec="0.7.0", | ||
python={"django-poc": "1.10", "flask-poc": "1.10", "*": "?"}, | ||
ruby="?", | ||
|
@@ -490,7 +496,7 @@ def test_blocking_before(self): | |
dotnet="2.29.0", | ||
golang="?", | ||
java="?", | ||
nodejs="?", | ||
nodejs="3.19.0", | ||
php_appsec="0.7.0", | ||
python={"django-poc": "1.10", "flask-poc": "1.10", "*": "?"}, | ||
ruby="?", | ||
|
@@ -525,7 +531,7 @@ def test_non_blocking(self): | |
|
||
def setup_blocking_before(self): | ||
self.set_req1 = weblog.post("/tag_value/clean_value_3882/200", data="None") | ||
self.block_req2 = weblog.post("/tag_value/tainted_value_body/200", data={"value5": "bsldhkuqwgervf"},) | ||
self.block_req2 = weblog.post("/tag_value/tainted_value_body/200", data={"value5": "bsldhkuqwgervf"}) | ||
|
||
def test_blocking_before(self): | ||
"""Test that blocked requests are blocked before being processed""" | ||
|
@@ -613,7 +619,7 @@ def test_non_blocking(self): | |
|
||
@rfc("https://datadoghq.atlassian.net/wiki/spaces/APS/pages/2667021177/Suspicious+requests+blocking") | ||
@coverage.not_implemented | ||
@released(cpp="?", dotnet="2.29.0", php_appsec="0.7.0", python="?", nodejs="?", golang="?", ruby="?") | ||
@released(cpp="?", dotnet="2.29.0", php_appsec="0.7.0", python="?", nodejs="3.19.0", golang="?", ruby="?") | ||
class Test_Suspicious_Request_Blocking: | ||
"""Test if blocking on multiple addresses with multiple rules is supported""" | ||
|
||
|
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
|
||
|
||
@rfc("https://docs.google.com/document/d/1GUd8p7HBp9gP0a6PZmDY26dpGrS1Ztef9OYdbK3Vq3M/edit") | ||
@released(cpp="?", dotnet="2.16.0", php_appsec="0.7.0", python="1.10.0", ruby="?", nodejs="?", golang="1.47.0") | ||
@released(cpp="?", dotnet="2.16.0", php_appsec="0.7.0", python="1.10.0", ruby="?", nodejs="3.11.0", golang="1.47.0") | ||
@released( | ||
java={ | ||
"spring-boot": "0.110.0", | ||
|
@@ -32,6 +32,7 @@ | |
context.appsec_rules_file is not None, reason="No Remote Config sub with custom rules file", | ||
) | ||
@bug(context.weblog_variant == "uds-echo") | ||
@bug("[email protected]" < context.library < "[email protected]", reason="bugged on that version range") | ||
@coverage.basic | ||
@scenarios.appsec_ip_blocking | ||
class Test_AppSecIPBlocking: | ||
|
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
|
||
|
||
@rfc("https://docs.google.com/document/d/1GUd8p7HBp9gP0a6PZmDY26dpGrS1Ztef9OYdbK3Vq3M/edit") | ||
@released(cpp="?", dotnet="2.16.0", php_appsec="0.7.0", python="1.10.0", ruby="?", nodejs="3.11", golang="1.47.0") | ||
@released(cpp="?", dotnet="2.16.0", php_appsec="0.7.0", python="1.10.0", ruby="?", nodejs="3.11.0", golang="1.47.0") | ||
@released( | ||
java={ | ||
"spring-boot": "0.110.0", | ||
|
@@ -30,7 +30,7 @@ | |
context.appsec_rules_file is not None, reason="No Remote Config sub with custom rules file", | ||
) | ||
@bug(context.weblog_variant == "uds-echo") | ||
@bug(context.library > "nodejs@3.16.0", reason="Under investigation") | ||
@bug("[email protected]" < context.library < "nodejs@3.18.0", reason="bugged on that version range") | ||
@coverage.basic | ||
@scenarios.appsec_ip_blocking_maxed | ||
class Test_AppSecIPBlockingMaxed: | ||
|
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
Oops, something went wrong.