From 0d49c12f5398d2205b8e0d4b18b70fd26ff35c22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Gonz=C3=A1lez=20Garc=C3=ADa?= Date: Tue, 12 Mar 2024 08:45:08 +0100 Subject: [PATCH] update MAX_SIZE_EXCEEDED value (#6779) --- .../iast/model/json/TruncatedVulnerabilitiesAdapter.java | 2 +- .../iast/model/json/VulnerabilityEncodingTest.groovy | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dd-java-agent/agent-iast/src/main/java/com/datadog/iast/model/json/TruncatedVulnerabilitiesAdapter.java b/dd-java-agent/agent-iast/src/main/java/com/datadog/iast/model/json/TruncatedVulnerabilitiesAdapter.java index ffe32b726bc..f4a72d77602 100644 --- a/dd-java-agent/agent-iast/src/main/java/com/datadog/iast/model/json/TruncatedVulnerabilitiesAdapter.java +++ b/dd-java-agent/agent-iast/src/main/java/com/datadog/iast/model/json/TruncatedVulnerabilitiesAdapter.java @@ -14,7 +14,7 @@ class TruncatedVulnerabilitiesAdapter extends FormattingAdapter { - private static final String MAX_SIZE_EXCEEDED = "MAX SIZE EXCEEDED"; + private static final String MAX_SIZE_EXCEEDED = "MAX_SIZE_EXCEEDED"; private final JsonAdapter vulnerabilityAdapter; diff --git a/dd-java-agent/agent-iast/src/test/groovy/com/datadog/iast/model/json/VulnerabilityEncodingTest.groovy b/dd-java-agent/agent-iast/src/test/groovy/com/datadog/iast/model/json/VulnerabilityEncodingTest.groovy index 76c81d5696e..1f404357475 100644 --- a/dd-java-agent/agent-iast/src/test/groovy/com/datadog/iast/model/json/VulnerabilityEncodingTest.groovy +++ b/dd-java-agent/agent-iast/src/test/groovy/com/datadog/iast/model/json/VulnerabilityEncodingTest.groovy @@ -415,7 +415,7 @@ class VulnerabilityEncodingTest extends DDSpecification { { "type": "WEAK_HASH", "evidence": { - "value": "MAX SIZE EXCEEDED" + "value": "MAX_SIZE_EXCEEDED" }, "hash":1042880134, "location": { @@ -454,7 +454,7 @@ class VulnerabilityEncodingTest extends DDSpecification { "vulnerabilities": [ { "evidence": { - "value": "MAX SIZE EXCEEDED" + "value": "MAX_SIZE_EXCEEDED" }, "hash": 1042880134, "location": { @@ -467,7 +467,7 @@ class VulnerabilityEncodingTest extends DDSpecification { }, { "evidence": { - "value": "MAX SIZE EXCEEDED" + "value": "MAX_SIZE_EXCEEDED" }, "hash": 1042880134, "location": { @@ -543,7 +543,7 @@ class VulnerabilityEncodingTest extends DDSpecification { } private static int countGenericEvidenceOccurrences(final String input){ - Pattern pattern = Pattern.compile("\"evidence\":\\{\"value\":\"MAX SIZE EXCEEDED\"}") + Pattern pattern = Pattern.compile("\"evidence\":\\{\"value\":\"MAX_SIZE_EXCEEDED\"}") Matcher matcher = pattern.matcher(input) int count = 0 while (matcher.find()){