Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 15 additions & 26 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ plugins {
}

group = 'uk.gov.hmcts'
version = '0.2.7'
version = '0.3.0'

java {
toolchain {
Expand Down Expand Up @@ -130,49 +130,40 @@ repositories {
}

ext {
log4JVersion = "2.25.3"
logbackVersion = "1.5.32"
jacksonVersion = "2.21.2"
lombokVersion = "1.18.44"
mapstructVersion = "1.6.3"
springVersion = "3.5.13"
springVersion = "4.0.5"
}

ext['snakeyaml.version'] = '2.0'

dependencyManagement {
imports {
mavenBom 'org.springframework.boot:spring-boot-dependencies:3.5.13'
mavenBom "com.fasterxml.jackson:jackson-bom:${jacksonVersion}"
mavenBom 'org.springframework.boot:spring-boot-dependencies:4.0.5'
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2025.1.1'
}
}

dependencies {
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: springVersion
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: springVersion
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-aop', version: springVersion
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-json', version: springVersion
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-oauth2-resource-server', version: springVersion
implementation 'org.springframework.boot:spring-boot'
implementation 'org.springframework:spring-context'
implementation 'org.springframework:spring-web'
implementation 'jakarta.servlet:jakarta.servlet-api'
implementation 'org.springframework.security:spring-security-web'
implementation 'org.springframework.security:spring-security-oauth2-jose'
implementation 'org.springframework.security:spring-security-oauth2-resource-server'
implementation 'com.fasterxml.jackson.core:jackson-databind'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign:5.0.1', {
exclude group: 'commons-fileupload', module: 'commons-fileupload'
}
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:3.0.2',{
exclude group: 'org.springframework.boot', module: 'spring-boot-jackson'
exclude group: 'org.springframework.boot', module: 'spring-boot-webmvc'
exclude group: 'org.springframework.boot', module: 'spring-boot-web-server'
exclude group: 'org.springframework.boot', module: 'spring-boot-validation'
exclude group: 'org.hibernate.validator', module: 'hibernate-validator' // Excluded for CVE-2025-15104
}
implementation 'org.hibernate.validator:hibernate-validator:9.1.0.Final' // CVE-2025-15104 not yet fixed, so suppressed in owasp file

implementation group: 'com.github.hmcts.java-logging', name: 'logging', version: '8.0.0'

implementation 'com.microsoft.azure:applicationinsights-spring-boot-starter:2.6.4'

implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: log4JVersion
implementation group: 'org.apache.logging.log4j', name: 'log4j-to-slf4j', version: log4JVersion
implementation group: 'ch.qos.logback', name: 'logback-classic', version: logbackVersion
implementation group: 'ch.qos.logback', name: 'logback-core', version: logbackVersion
implementation group: 'org.mapstruct', name: 'mapstruct', version: mapstructVersion
runtimeOnly 'org.apache.tomcat.embed:tomcat-embed-el'

compileOnly "org.projectlombok:lombok:${lombokVersion}"
annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
Expand All @@ -195,9 +186,7 @@ dependencies {
smokeTestAnnotationProcessor "org.mapstruct:mapstruct-processor:${mapstructVersion}"

testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-test', version: springVersion
testImplementation group: 'io.rest-assured', name: 'rest-assured', version: '6.0.0'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'

testImplementation 'javax.servlet:javax.servlet-api:4.0.1'
}

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
Expand All @@ -57,9 +56,6 @@ class EventLoggingServiceTest {
@MockitoBean
private Appender<ILoggingEvent> mockAppender;

@Captor
private ArgumentCaptor<ILoggingEvent> captor;

@Autowired
private SecurityEventLoggingService service;

Expand Down Expand Up @@ -135,6 +131,7 @@ void logEvent_minimalParams() {
service.logEvent("TestEvent", "Success", null, "TestType",null, null);

// Assert
ArgumentCaptor<ILoggingEvent> captor = ArgumentCaptor.forClass(ILoggingEvent.class);
verify(mockAppender, atLeastOnce()).doAppend(captor.capture());
List<ILoggingEvent> events = captor.getAllValues();
String nowText = now.toString();
Expand Down Expand Up @@ -162,6 +159,7 @@ void logEvent_populatedParams() {
service.logEvent("TestEvent", "Success", buid, "TestType",opTimestamp, data);

// Assert
ArgumentCaptor<ILoggingEvent> captor = ArgumentCaptor.forClass(ILoggingEvent.class);
verify(mockAppender, atLeastOnce()).doAppend(captor.capture());
List<ILoggingEvent> events = captor.getAllValues();
String nowText = now.toString();
Expand Down
Loading