-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into mtoff/query-string-consistency
- Loading branch information
Showing
19 changed files
with
144 additions
and
95 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 |
---|---|---|
|
@@ -122,7 +122,7 @@ Clone the repo: | |
git clone [email protected]:DataDog/dd-trace-java.git | ||
cd dd-trace-java | ||
``` | ||
By default you will be on the `master` branch, but if you'd like to run system-tests on the changes you made to your local branch, `gitc checkout` to that branch. | ||
By default you will be on the `master` branch, but if you'd like to run system-tests on the changes you made to your local branch, `git checkout` to that branch before proceeding. | ||
|
||
2. Build Java Tracer artifacts | ||
``` | ||
|
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 |
---|---|---|
|
@@ -17,7 +17,7 @@ class TestInsecureCookie(BaseSinkTest): | |
data = {} | ||
location_map = {"nodejs": {"express4": "iast/index.js", "express4-typescript": "iast.ts"}} | ||
|
||
@bug(context.library < "[email protected]", reason="Incorrect handling of HttpOnly flag") | ||
@bug(context.library < "[email protected]", reason="APMRP-360") | ||
def test_secure(self): | ||
super().test_secure() | ||
|
||
|
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 TestNoHttponlyCookie(BaseSinkTest): | |
data = {} | ||
location_map = {"nodejs": {"express4": "iast/index.js", "express4-typescript": "iast.ts"}} | ||
|
||
@bug(context.library < "[email protected]", reason="Incorrect handling of HttpOnly flag") | ||
@bug(context.library < "[email protected]", reason="APMRP-360") | ||
def test_secure(self): | ||
super().test_secure() | ||
|
||
|
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 TestNoSamesiteCookie(BaseSinkTest): | |
data = {} | ||
location_map = {"nodejs": {"express4": "iast/index.js", "express4-typescript": "iast.ts"}} | ||
|
||
@bug(context.library < "[email protected]", reason="Incorrect handling of HttpOnly flag") | ||
@bug(context.library < "[email protected]", reason="APMRP-360") | ||
def test_secure(self): | ||
super().test_secure() | ||
|
||
|
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,7 @@ class TestSSRF(BaseSinkTest): | |
"python": {"flask-poc": "app.py", "django-poc": "app/urls.py"}, | ||
} | ||
|
||
@bug(context.library < "[email protected]", reason="https://github.com/DataDog/dd-trace-java/pull/5172") | ||
@bug(context.library < "[email protected]", reason="APMRP-360") | ||
def test_insecure(self): | ||
super().test_insecure() | ||
|
||
|
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 |
---|---|---|
|
@@ -25,7 +25,7 @@ def test_source_reported(self): | |
context.library < "[email protected]" and "spring-boot" not in context.weblog_variant, | ||
reason="Metrics not implemented", | ||
) | ||
@bug(context.library >= "[email protected]" and context.library < "[email protected]", reason="Not reported") | ||
@bug(context.library >= "[email protected]" and context.library < "[email protected]", reason="APMRP-360") | ||
@missing_feature(library="dotnet", reason="Not implemented yet") | ||
def test_telemetry_metric_instrumented_source(self): | ||
super().test_telemetry_metric_instrumented_source() | ||
|
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 |
---|---|---|
|
@@ -22,7 +22,7 @@ class TestCookieName(BaseSourceTest): | |
context.library < "[email protected]" and "spring-boot" not in context.weblog_variant, | ||
reason="Metrics not implemented", | ||
) | ||
@bug(context.library >= "[email protected]" and context.library < "[email protected]", reason="Not working as expected") | ||
@bug(context.library >= "[email protected]" and context.library < "[email protected]", reason="APMRP-360") | ||
@missing_feature(weblog_variant="akka-http", reason="Not working as expected") | ||
def test_telemetry_metric_instrumented_source(self): | ||
super().test_telemetry_metric_instrumented_source() | ||
|
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 |
---|---|---|
|
@@ -98,7 +98,7 @@ def test_header_collection(self): | |
missing_response_headers = set(required_response_headers) - set(span.get("meta", {}).keys()) | ||
assert not missing_response_headers, f"Missing response headers: {missing_response_headers}" | ||
|
||
@bug(context.library < "[email protected]") | ||
@bug(context.library < "[email protected]", reason="APMRP-360") | ||
def test_root_span_coherence(self): | ||
"""Appsec tags are not on span where type is not web, http or rpc""" | ||
valid_appsec_span_types = ["web", "http", "rpc"] | ||
|
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 |
---|---|---|
|
@@ -181,7 +181,7 @@ def setup_cookies_with_special_chars2(self): | |
|
||
@irrelevant(library="golang", reason="not handled by the Go standard cookie parser") | ||
@irrelevant(library="dotnet", reason="Quotation marks cause kestrel to erase the whole value") | ||
@bug(context.library < "[email protected]") | ||
@bug(context.library < "[email protected]", reason="APMRP-360") | ||
@irrelevant(context.appsec_rules_version >= "1.2.7", reason="cookies were disabled for the time being") | ||
def test_cookies_with_special_chars2(self): | ||
"""Other cookies patterns""" | ||
|
@@ -225,7 +225,7 @@ def setup_cookies_with_special_chars2_custom_rules(self): | |
|
||
@irrelevant(library="golang", reason="Not handled by the Go standard cookie parser") | ||
@irrelevant(library="dotnet", reason="Quotation marks cause kestrel to erase the whole value") | ||
@bug(context.library < "[email protected]") | ||
@bug(context.library < "[email protected]", reason="APMRP-360") | ||
@scenarios.appsec_custom_rules | ||
def test_cookies_with_special_chars2_custom_rules(self): | ||
"""Other cookies patterns""" | ||
|
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 |
---|---|---|
|
@@ -52,10 +52,10 @@ class Test_Blocking: | |
def setup_no_accept(self): | ||
self.r_na = weblog.get("/waf/", headers={"User-Agent": "Arachni/v1"}) | ||
|
||
@bug(context.library < "[email protected]" and context.weblog_variant == "spring-boot-undertow", reason="npe") | ||
@bug(context.library < "[email protected]" and context.weblog_variant == "spring-boot-wildfly", reason="npe") | ||
@bug(context.library < "[email protected]", reason="Bug, minify and remove new line characters") | ||
@bug(context.library < "[email protected]", reason="wrong default content-type") | ||
@bug(context.library < "[email protected]" and context.weblog_variant == "spring-boot-undertow", reason="APMRP-360") | ||
@bug(context.library < "[email protected]" and context.weblog_variant == "spring-boot-wildfly", reason="APMRP-360") | ||
@bug(context.library < "[email protected]", reason="APMRP-360") | ||
@bug(context.library < "[email protected]", reason="APMRP-360") | ||
def test_no_accept(self): | ||
"""Blocking without an accept header""" | ||
assert self.r_na.status_code == 403 | ||
|
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 |
---|---|---|
|
@@ -30,8 +30,8 @@ class Test_HttpProtocol: | |
def setup_http_protocol(self): | ||
self.r_1 = weblog.get("/waf/", params={"key": ".cookie;domain="}) | ||
|
||
@bug(context.library < "[email protected]") | ||
@bug(context.library < "[email protected]") | ||
@bug(context.library < "[email protected]", reason="APMRP-360") | ||
@bug(context.library < "[email protected]", reason="APMRP-360") | ||
def test_http_protocol(self): | ||
""" AppSec catches attacks by violation of HTTP protocol in encoded cookie value""" | ||
interfaces.library.assert_waf_attack(self.r_1, waf_rules.http_protocol_violation.crs_943_100) | ||
|
@@ -74,7 +74,7 @@ def test_lfi_percent_2f(self): | |
def setup_lfi_in_path(self): | ||
self.r_5 = weblog.get("/waf/..") | ||
|
||
@bug(context.library < "[email protected]") | ||
@bug(context.library < "[email protected]", reason="APMRP-360") | ||
@irrelevant(library="python", weblog_variant="django-poc") | ||
@irrelevant(library="dotnet", reason="lfi patterns are always filtered by the host web-server") | ||
@irrelevant( | ||
|
@@ -322,7 +322,7 @@ def setup_security_scan(self): | |
self.r10 = weblog.get("/administrator/components/component.php") | ||
self.r11 = weblog.get("/login.pwd") | ||
|
||
@bug(context.library < "[email protected]" and context.weblog_variant == "spring-boot-undertow") | ||
@bug(context.library < "[email protected]" and context.weblog_variant == "spring-boot-undertow", reason="APMRP-360") | ||
@bug(library="java", weblog_variant="spring-boot-openliberty", reason="APPSEC-6583") | ||
def test_security_scan(self): | ||
"""AppSec WAF catches Discovery scan""" | ||
|
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 |
---|---|---|
|
@@ -32,7 +32,7 @@ class Test_TelemetryMetrics: | |
|
||
setup_headers_are_correct = _setup | ||
|
||
@bug(context.library < "[email protected]", reason="Missing two headers") | ||
@bug(context.library < "[email protected]", reason="APMRP-360") | ||
def test_headers_are_correct(self): | ||
"""Tests that all telemetry requests have correct headers.""" | ||
for data in interfaces.library.get_telemetry_data(flatten_message_batches=False): | ||
|
@@ -77,7 +77,7 @@ def test_metric_waf_init(self): | |
|
||
setup_metric_waf_requests = _setup | ||
|
||
@bug(context.library < "[email protected]", reason="Missing tags") | ||
@bug(context.library < "[email protected]", reason="APMRP-360") | ||
def test_metric_waf_requests(self): | ||
"""Test waf.requests metric.""" | ||
expected_metric_name = "waf.requests" | ||
|
Oops, something went wrong.