Skip to content

Commit 09e5c68

Browse files
committed
Test multiple rasp metrics
1 parent cfc4e06 commit 09e5c68

File tree

1 file changed

+11
-0
lines changed
  • appsec/tests/integration/src/test/groovy/com/datadog/appsec/php/integration

1 file changed

+11
-0
lines changed

appsec/tests/integration/src/test/groovy/com/datadog/appsec/php/integration/CommonTests.groovy

+11
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,17 @@ trait CommonTests {
325325
assert exploit.frames[3].line == 28
326326
}
327327

328+
@Test
329+
void 'multiple rasp'() {
330+
def trace = container.traceFromRequest(
331+
'/multiple_rasp.php?path=../somefile&other=../otherfile&domain=169.254.169.254') {HttpResponse<InputStream> resp ->
332+
assert resp.statusCode() == 200
333+
}
334+
335+
Span span = trace.first()
336+
assert span.metrics."_dd.appsec.rasp.rule.eval" == 5.0d
337+
}
338+
328339
@Test
329340
void 'user blocking'() {
330341
def trace = container.traceFromRequest('/user_id.php?id=user2020') { HttpResponse<InputStream> resp ->

0 commit comments

Comments
 (0)