Skip to content
Open
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eclipse-temurin:17.0.18_8-jre-noble
FROM eclipse-temurin:17.0.21_9-jre-noble

WORKDIR /app

Expand Down
138 changes: 56 additions & 82 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,23 @@
</scm>

<properties>
<maven-dependency-plugin.version>3.8.1</maven-dependency-plugin.version>
<maven-jar-plugin.version>3.4.1</maven-jar-plugin.version>
<spring-boot-maven-plugin.version>3.5.11</spring-boot-maven-plugin.version>
<awsspring.version>3.4.2</awsspring.version>
<amazon.pom.version>2.41.32</amazon.pom.version>
<elide.version>7.1.16</elide.version>
<amazon.sqs.version>2.1.4</amazon.sqs.version>
<maven-dependency-plugin.version>3.11.0</maven-dependency-plugin.version>
<maven-jar-plugin.version>3.5.1</maven-jar-plugin.version>
<spring-boot-maven-plugin.version>4.1.2</spring-boot-maven-plugin.version>
<awsspring.version>4.2.2</awsspring.version>
<amazon.pom.version>2.59.0</amazon.pom.version>
<elide.version>7.2.0</elide.version>
<amazon.sqs.version>2.1.5</amazon.sqs.version>
<ocfl.java.core.version>2.2.3</ocfl.java.core.version>
<ocfl.java.aws.version>2.2.3</ocfl.java.aws.version>
<jakarta.json.version>2.0.1</jakarta.json.version>
<jakarta.json-api.version>2.1.3</jakarta.json-api.version>
<okhttp.version>5.3.2</okhttp.version>
<jsoup.version>1.22.1</jsoup.version>
<jacoco-maven-plugin.version>0.8.14</jacoco-maven-plugin.version>
<bouncycastle.version>1.84</bouncycastle.version>
<asm.version>9.9.1</asm.version>
<okhttp.version>5.5.1</okhttp.version>
<rest-assured.version>6.3.0</rest-assured.version>
<jsoup.version>1.24.1</jsoup.version>
<jacoco-maven-plugin.version>0.8.16</jacoco-maven-plugin.version>
<bouncycastle.version>1.87</bouncycastle.version>
<asm.version>9.11.1</asm.version>
<sonar.projectName>pass-core</sonar.projectName>
<sonar.projectKey>eclipse-pass_pass-core</sonar.projectKey>
<sonar.coverage.jacoco.xmlReportPaths>${project.build.directory}/site/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
Expand Down Expand Up @@ -111,16 +112,15 @@
<type>pom</type>
<scope>import</scope>
</dependency>

<!-- Added to fix CVE-2026-22732 -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-bom</artifactId>
<version>6.5.9</version>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured-bom</artifactId>
<version>${rest-assured.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>


<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
Expand Down Expand Up @@ -157,26 +157,11 @@
<artifactId>bcpkix-jdk18on</artifactId>
<version>${bouncycastle.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.14</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.28.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.15.0</version>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>4.13.2</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
Expand Down Expand Up @@ -205,63 +190,34 @@
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.21.0</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.11.0</version>
<version>2.22.0</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>33.4.8-jre</version>
<version>33.8.0-jre</version>
</dependency>
<dependency>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
<version>2.42.0</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>4.27.5</version>
<version>2.52.0</version>
</dependency>
<dependency>
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
<version>3.52.0</version>
<version>4.4.0</version>
</dependency>
<!-- End of transitive deps with convergence issues. -->

<!-- The following deps were declared to resolve CVEs from transitive deps. -->
<!-- These should all be checked whenever deps are upgraded. Should be removed if possible once parent -->
<!-- dep updates with fixed version. -->

<!-- CVE-2026-27446 -->
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-jakarta-server</artifactId>
<version>2.53.0</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.6.0</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-jakarta-client</artifactId>
<version>2.53.0</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
<groupId>org.jooq</groupId>
<artifactId>joou-java-6</artifactId>
<version>0.9.5</version>
</dependency>
<!-- End of transitive deps with CVE issues. -->
<!-- End of transitive deps with convergence issues. -->

</dependencies>
</dependencyManagement>
Expand All @@ -277,6 +233,11 @@
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<scope>runtime</scope>
</dependency>

<!-- Elide JSON:API -->
<dependency>
Expand Down Expand Up @@ -315,14 +276,14 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-saml2-service-provider</artifactId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security-saml2</artifactId>
</dependency>

<!-- Database -->
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-liquibase</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
Expand All @@ -349,8 +310,14 @@

<!-- Messaging -->
<dependency>
<groupId>org.apache.activemq</groupId>
<groupId>org.apache.artemis</groupId>
<artifactId>artemis-jakarta-server</artifactId>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
Expand Down Expand Up @@ -437,6 +404,12 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
Expand All @@ -451,12 +424,12 @@
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>localstack</artifactId>
<artifactId>testcontainers-localstack</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<artifactId>testcontainers-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -578,7 +551,7 @@
<ignoredUsedUndeclaredDependency>io.ocfl:ocfl-java-api:</ignoredUsedUndeclaredDependency>
<ignoredUsedUndeclaredDependency>com.google.code.findbugs:jsr305:</ignoredUsedUndeclaredDependency>
<!-- These come from spring boot activemq artemis starter -->
<ignoredUsedUndeclaredDependency>org.apache.activemq:artemis-jakarta-server:</ignoredUsedUndeclaredDependency>
<ignoredUsedUndeclaredDependency>org.apache.artemis:artemis-jakarta-server:</ignoredUsedUndeclaredDependency>
<!-- These come from spring boot starter test -->
<ignoredUsedUndeclaredDependency>org.mockito::</ignoredUsedUndeclaredDependency>
<ignoredUsedUndeclaredDependency>org.junit.jupiter:junit-jupiter-api:</ignoredUsedUndeclaredDependency>
Expand All @@ -605,11 +578,12 @@
<!-- slf4j is the API used in the code, logback is the logging provider not used directly -->
<ignoredUnusedDeclaredDependency>ch.qos.logback:logback-classic:</ignoredUnusedDeclaredDependency>
<!-- These are runtime scope -->
<ignoredUnusedDeclaredDependency>org.liquibase:liquibase-core:</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>com.h2database:h2:</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>org.postgresql:postgresql:</ignoredUnusedDeclaredDependency>
<!-- Provides commons-logging API for Spring Framework 7, bridged to slf4j -->
<ignoredUnusedDeclaredDependency>org.slf4j:jcl-over-slf4j:</ignoredUnusedDeclaredDependency>
<!-- These come from spring boot activemq artemis starter -->
<ignoredUnusedDeclaredDependency>org.apache.activemq:artemis-jakarta-server:</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>org.apache.artemis:artemis-jakarta-server:</ignoredUnusedDeclaredDependency>
<!-- Used transitively via user-service and other modules -->
<ignoredUnusedDeclaredDependency>jakarta.json:jakarta.json-api:</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>com.fasterxml.jackson.core:jackson-databind:</ignoredUnusedDeclaredDependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public Optional<String> getS3RepoPrefix() {
* @return The S3 bucket name of the File Service
*/
public Optional<String> getBucketName() {
return Optional.of(s3BucketName);
return Optional.ofNullable(s3BucketName);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/eclipse/pass/main/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.persistence.autoconfigure.EntityScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.jms.annotation.EnableJms;
import org.springframework.scheduling.annotation.EnableScheduling;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import org.springframework.security.saml2.provider.service.registration.RelyingPartyRegistrationRepository;
import org.springframework.security.saml2.provider.service.web.DefaultRelyingPartyRegistrationResolver;
import org.springframework.security.saml2.provider.service.web.RelyingPartyRegistrationResolver;
import org.springframework.security.saml2.provider.service.web.authentication.OpenSaml4AuthenticationRequestResolver;
import org.springframework.security.saml2.provider.service.web.authentication.OpenSaml5AuthenticationRequestResolver;
import org.springframework.security.saml2.provider.service.web.authentication.Saml2AuthenticationRequestResolver;
import org.springframework.security.saml2.provider.service.web.authentication.Saml2WebSsoAuthenticationFilter;
import org.springframework.security.web.SecurityFilterChain;
Expand All @@ -41,7 +41,7 @@
import org.springframework.security.web.header.writers.ContentSecurityPolicyHeaderWriter;
import org.springframework.security.web.header.writers.DelegatingRequestMatcherHeaderWriter;
import org.springframework.security.web.savedrequest.HttpSessionRequestCache;
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
import org.springframework.security.web.servlet.util.matcher.PathPatternRequestMatcher;
import org.springframework.security.web.util.matcher.OrRequestMatcher;


Expand Down Expand Up @@ -77,7 +77,7 @@
* @throws Exception on error
*/
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {

Check warning on line 80 in src/main/java/org/eclipse/pass/main/security/SecurityConfiguration.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Replace generic exceptions with specific library exceptions or a custom exception.

See more on https://sonarcloud.io/project/issues?id=eclipse-pass_pass-core&issues=AaHrJUmz5PWOMChUNzQs&open=AaHrJUmz5PWOMChUNzQs&pullRequest=143
// Disable unused functionality
http.formLogin(FormLoginConfigurer::disable);
http.anonymous(AnonymousConfigurer::disable);
Expand All @@ -88,15 +88,15 @@
// Ensure that GET requests to the doi service are protected since they have side effects
http.csrf(csrf -> csrf.csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse())
.requireCsrfProtectionMatcher(new OrRequestMatcher(CsrfFilter.DEFAULT_CSRF_MATCHER,
new AntPathRequestMatcher("/doi/**")))
PathPatternRequestMatcher.withDefaults().matcher("/doi/**")))
.csrfTokenRequestHandler(new SpaCsrfTokenRequestHandler()));

// Set Content Security Policy header only for /app/
ContentSecurityPolicyHeaderWriter cspHeaderWriter = new ContentSecurityPolicyHeaderWriter();
cspHeaderWriter.setPolicyDirectives(contentSecurityPolicy);

DelegatingRequestMatcherHeaderWriter appCspHeaderWriter = new DelegatingRequestMatcherHeaderWriter(
new AntPathRequestMatcher("/app/**"), cspHeaderWriter);
PathPatternRequestMatcher.withDefaults().matcher("/app/**"), cspHeaderWriter);

http.headers(h -> h.addHeaderWriter(appCspHeaderWriter));

Expand All @@ -109,7 +109,7 @@

// Prevent a continue parameter from being added after login
HttpSessionRequestCache requestCache = new HttpSessionRequestCache();
requestCache.setMatchingRequestParameterName(null);

Check warning on line 112 in src/main/java/org/eclipse/pass/main/security/SecurityConfiguration.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Annotate the parameter with @javax.annotation.Nullable in method 'setMatchingRequestParameterName' declaration, or make sure that null can not be passed as argument.

See more on https://sonarcloud.io/project/issues?id=eclipse-pass_pass-core&issues=AaHrJUmz5PWOMChUNzQr&open=AaHrJUmz5PWOMChUNzQr&pullRequest=143
http.requestCache(rc -> rc.requestCache(requestCache));

// Prevent WWW-Authenticate header causing a browser popup after a session timeout
Expand Down Expand Up @@ -156,8 +156,8 @@
Saml2AuthenticationRequestResolver authenticationRequestResolver(RelyingPartyRegistrationRepository registrations) {
RelyingPartyRegistrationResolver registrationResolver =
new DefaultRelyingPartyRegistrationResolver(registrations);
OpenSaml4AuthenticationRequestResolver authenticationRequestResolver =
new OpenSaml4AuthenticationRequestResolver(registrationResolver);
OpenSaml5AuthenticationRequestResolver authenticationRequestResolver =
new OpenSaml5AuthenticationRequestResolver(registrationResolver);
authenticationRequestResolver.setAuthnRequestCustomizer((context) -> context
.getAuthnRequest().setForceAuthn(true));
return authenticationRequestResolver;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
@ActiveProfiles("test-S3")
class FileStorageServiceS3Test extends FileStorageServiceTest {
private static final DockerImageName LOCALSTACK_IMG =
DockerImageName.parse("localstack/localstack:3.8.1");
DockerImageName.parse("localstack/localstack:4.14.0");

private static final LocalStackContainer localStack =
new LocalStackContainer(LOCALSTACK_IMG)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
@Testcontainers
class AwsParamStoreConfigTest {
private static final DockerImageName LOCALSTACK_IMG =
DockerImageName.parse("localstack/localstack:3.8.1");
DockerImageName.parse("localstack/localstack:4.14.0");

@Container
private static final LocalStackContainer localStack = new LocalStackContainer(LOCALSTACK_IMG).withServices(SSM);
Expand Down
Loading
Loading