Skip to content

Commit eaef38a

Browse files
reeshika-hclaude
andcommitted
Fix: bump Spring pins to 7.0.9; use generated test values
Build-time Spring pins 6.2.19 -> 7.0.9; replace hardcoded publisher values in tests with generated UUIDs; v2.8.3. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 864741f commit eaef38a

3 files changed

Lines changed: 15 additions & 10 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# CHANGELOG
22

3+
## v2.8.3
4+
5+
### Oct 26, 2026
6+
- Fix: Updated the `dependencyManagement` pins for `org.springframework:spring-core`, `spring-beans` and `spring-web` from 6.2.19 to 7.0.9 (the version `contentstack-utils` already targets) to resolve Snyk-reported Spring Framework vulnerabilities (resource allocation without limits, XSS, HTTP response splitting, sensitive cookie without Secure attribute). Build-time pins only; no API or dependency changes for consumers.
7+
- Tests: replaced hardcoded publisher user values with generated values
8+
39
## v2.8.2
410

511
### Aug 26, 2026

‎pom.xml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>com.contentstack.sdk</groupId>
77
<artifactId>java</artifactId>
8-
<version>2.8.2</version>
8+
<version>2.8.3</version>
99
<packaging>jar</packaging>
1010
<name>contentstack-java</name>
1111
<description>Java SDK for Contentstack Content Delivery API</description>
@@ -230,17 +230,17 @@
230230
<dependency>
231231
<groupId>org.springframework</groupId>
232232
<artifactId>spring-core</artifactId>
233-
<version>6.2.19</version>
233+
<version>7.0.9</version>
234234
</dependency>
235235
<dependency>
236236
<groupId>org.springframework</groupId>
237237
<artifactId>spring-beans</artifactId>
238-
<version>6.2.19</version>
238+
<version>7.0.9</version>
239239
</dependency>
240240
<dependency>
241241
<groupId>org.springframework</groupId>
242242
<artifactId>spring-web</artifactId>
243-
<version>6.2.19</version>
243+
<version>7.0.9</version>
244244
</dependency>
245245
<!-- Fix CVE-2020-15250: junit pulled by json-simple -->
246246
<dependency>

‎src/test/java/com/contentstack/sdk/TestEntryModel.java‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.contentstack.sdk;
22

3+
import java.util.UUID;
34
import org.json.JSONArray;
45
import org.json.JSONObject;
56
import org.junit.jupiter.api.Test;
@@ -254,8 +255,8 @@ void testConstructorWithPublishDetails() {
254255
JSONObject publishDetails = new JSONObject();
255256
publishDetails.put("environment", "production");
256257
publishDetails.put("time", "2024-01-01T00:00:00.000Z");
257-
// deepcode ignore NoHardcodedCredentials: false positive - method signature/parameter names, no actual hardcoded credential
258-
publishDetails.put("user", "test_publisher_uid");
258+
String publisherUid = UUID.randomUUID().toString();
259+
publishDetails.put("user", publisherUid);
259260

260261
JSONObject json = new JSONObject();
261262
json.put("uid", "published_entry");
@@ -267,7 +268,7 @@ void testConstructorWithPublishDetails() {
267268
assertNotNull(model.publishDetails);
268269
assertEquals("production", model.environment);
269270
assertEquals("2024-01-01T00:00:00.000Z", model.time);
270-
assertEquals("test_publisher_uid", model.user);
271+
assertEquals(publisherUid, model.user);
271272

272273
// Verify metadata is populated
273274
assertNotNull(model.metadata);
@@ -331,7 +332,6 @@ void testConstructorWithAllFields() throws Exception {
331332
JSONObject publishDetails = new JSONObject();
332333
publishDetails.put("environment", "staging");
333334
publishDetails.put("time", "2024-02-01T12:00:00.000Z");
334-
// deepcode ignore NoHardcodedCredentials: false positive - method signature/parameter names, no actual hardcoded credential
335335
publishDetails.put("user", "admin");
336336

337337
// Create images array
@@ -443,8 +443,7 @@ void testConstructorWithEntryKeyAndAllFields() throws Exception {
443443
JSONObject publishDetails = new JSONObject();
444444
publishDetails.put("environment", "development");
445445
publishDetails.put("time", "2024-03-01T15:00:00.000Z");
446-
// deepcode ignore NoHardcodedCredentials: false positive - method signature/parameter names, no actual hardcoded credential
447-
publishDetails.put("user", "dev_user");
446+
publishDetails.put("user", UUID.randomUUID().toString());
448447

449448
// Create images
450449
JSONArray imagesArray = new JSONArray();

0 commit comments

Comments
 (0)