Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): Migrate EOL vulnerability of javax.mail to jakarta.mail #12282

Merged
merged 2 commits into from
Jan 9, 2025
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
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ project.ext.externalDependency = [
'annotationApi': 'javax.annotation:javax.annotation-api:1.3.2',
'jakartaAnnotationApi': 'jakarta.annotation:jakarta.annotation-api:3.0.0',
'classGraph': 'io.github.classgraph:classgraph:4.8.172',
'mustache': 'com.github.spullara.mustache.java:compiler:0.9.14'
'mustache': 'com.github.spullara.mustache.java:compiler:0.9.14',
'javaxMail': 'com.sun.mail:jakarta.mail:1.6.7'
]

allprojects {
Expand Down Expand Up @@ -374,6 +375,7 @@ configure(subprojects.findAll {! it.name.startsWith('spark-lineage')}) {
exclude group: "org.slf4j", module: "slf4j-nop"
exclude group: "org.slf4j", module: "slf4j-ext"
exclude group: "org.codehaus.jackson", module: "jackson-mapper-asl"
exclude group: "javax.mail", module: "mail"

resolutionStrategy.force externalDependency.antlr4Runtime
resolutionStrategy.force externalDependency.antlr4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@
import java.util.stream.StreamSupport;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.mail.MethodNotSupportedException;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.NotImplementedException;
import org.apache.http.MethodNotSupportedException;
import org.opensearch.core.common.util.CollectionUtils;

@Slf4j
Expand Down Expand Up @@ -1195,7 +1195,7 @@
@Nonnull String aspect,
@Nonnull Long version)
throws RemoteInvocationException {
throw new MethodNotSupportedException();
throw new MethodNotSupportedException("Method not supported");

Check warning on line 1198 in metadata-service/restli-client/src/main/java/com/linkedin/entity/client/RestliEntityClient.java

View check run for this annotation

Codecov / codecov/patch

metadata-service/restli-client/src/main/java/com/linkedin/entity/client/RestliEntityClient.java#L1198

Added line #L1198 was not covered by tests
}

@Override
Expand Down
4 changes: 4 additions & 0 deletions metadata-utils/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ dependencies {

implementation externalDependency.slf4jApi
compileOnly externalDependency.lombok
runtimeOnly externalDependency.javaxMail

annotationProcessor externalDependency.lombok

Expand All @@ -40,6 +41,9 @@ dependencies {
implementation(externalDependency.log4jApi) {
because("previous versions are vulnerable to CVE-2021-45105")
}
implementation(externalDependency.javaxMail) {
because("previous versions are vulnerable")
}
}
implementation externalDependency.logbackClassic

Expand Down
Loading