Request guidance in usage of spring-cloud-starter-vault-config library (which is having compile time dependency with vulnerable jackson-core) - spring-cloud-vault-config

As per microservices implementation using spring boot application and using maven we are using dependency for spring-cloud-starter-vault-config.
I understand as per the current status spring-cloud-starter-vault-config is having a compile time dependency with spring-vault-core which in turn is having a dependency with jackson-databind
The issue happening is jackson-databind is having a dependency with jackson-core which is having the vulnerbility issue, As of now there is no published non-vulnerable
version available for jackson-core. Due to this reason we are unable to use the spring-cloud-starter-vault-config which finally having a dependency with jackson-core.
The logical dependency in short is as,
spring-cloud-starter-vault-config --> spring-vault-core --> jackson-databind --> jackson-core (having vulnerability)
Can you please guide how can we can use the spring-cloud-starter-vault-config library without any vulnerable dependency with jackson-core
I am expecting to use the spring-cloud-starter-vault-config library which is not compile time dependency with jackson-core
I have also tried the suggestion of making spring.http.converters.preferred-json-mapper=gson
as mentioned in
Is the Spring framework vulnerable because of Jackson dependency
still the issue persists, request to guide further on the same.
ie, by excluding jackson-core dependency from spring-cloud-starter-vault-config library it is not working.

Related

Kotlin multiplatform library exporting dependencies for JVM

I’m creating a multiplatform for jvm and iOS on kotlin using Gradle.
For the jvm, even if I define my dependencies as implementation, they are included in the library generated .pom and with runtime scope.
By using implementation, I was expecting that these dependencies are not passed to the library consumer.
But, when I use this library on my other jvm project, Gradle is importing the library-specific version. Not the one that I set in my application dependencies.
in this case, I'm doing a downgrade. The library is using the dependency version 1.4.1, and on the application I want to use version 1.4.0.1.
By using implementation, I was expecting that these dependencies are not passed to the library consumer.
If you expect the consumers to provide those transitive dependencies themselves, you should use compileOnly instead of implementation.
The difference between api and implementation is that transitive dependencies declared with api will be visible and usable by the application by just depending on your library (seen at compile time AND runtime). With implementation, the transitive dependency will still be here at runtime but will not be visible on the compile classpath of the consuming application, so you cannot use the transitive dependency's declarations in the application's code.
Have a look at the table here:
https://docs.gradle.org/current/userguide/java_library_plugin.html
If you stick with implementation, you can still force a version for the transitive dependency in Gradle by using strictly or by excluding it and redeclaring it yourself. See the doc:
https://docs.gradle.org/current/userguide/dependency_downgrade_and_exclude.html

IBM MFP8 Oracle Binary Issue

IBM MFP 8, Javascript SQL Adapter, in my POM.xml
I have added the dependency for Oracle library and build is successful, working fine..
But In Code review, Getting a critical error as
Update this scope and remove the "systemPath"
system
${basedir}/ojdbc6-11.2.0.3.jar
How to resolve the same ?
Its a maven error which you are getting as you have added the library directly as a dependency.
You can solve this by adding the Oracle library to your local maven repository and add it as maven dependency in POM file. Alternatively (better option) specify the proper repository (if one exists) so it can be automatically downloaded by maven.

gradle custom dependency resolution

Is it possible to bypass Ivy (or whatever else Gradle uses internally for dependency resolution) and still keep the same dependency DSL? I'm trying to develop a plugin for resolving native dependencies that would use the system's package manager to install dependencies, but Gradle's RepositoryHandler only allows Ivy, Maven, or flat dir repositories.
If you want to completely bypass Gradle's dependency resolution system, then you'll also have to create your own DSL. To do so, you would use Gradle concepts such as "extension objects" and "domain object containers".

Avoiding platform-dependent dependencies when creating Eclipse Plugin

We are developing an Eclipse plugin for graphic editing of task graphs and then stores the serialized version in XML. We have used EMF and GMF to build our plugin, and were able to package and test it on win32 systems.
However, when we try to use install on other systems (64-bit windows, Linux), we get the
requires 'org.eclipse.core.filesystem.win32.x86[1.1.200.v20100505-1235]'
error.
We are not explicitly calling a win32 filesystem method, and I thought that although the plugin was developed on a win32 system, the plugin's dependency would only be on the org.eclipse.core.filesystem package, which would be resolved locally at install time on the user's machine.
Am I missing something? Should I edit a specific (autogenerated) file and remove the reference to the win32 package mention?
Thanks in advance for your time.
-A
org.eclipse.core.filesystem is the plugin and org.eclipse.core.filesystem.win32.x86 is a fragment. Ideally you should have dependency on the plugin only. How did the fragment end up as a dependency in your plugin? You can safely remove the fragment from your dependency

Versioning for a maven project with small, very frequent releases

I'm converting an ant project to a maven one. This project differs from the ones I've usually converted since it has very frequent releases, typically 8-10 times per day.
By release I mean that the resulting jar is packaged and included in the production enviroment. This project is a leaf one, so it publishes no API, it only consumes it. It is also at most a runtime dependency for two other projects.
I'd like to have a versioning scheme where:
it's easy to deploy without forcing the developers to think about what version number to assign to the project, since the number is meaningless;
It's easy to include the latest version of this project as a dependency without constantly bumping up dependency versions;
Most likely the dependency version would not be a -SNAPSHOT, since that would conflict with the maven-release-plugin we're using for other projects, but I'm open to suggestions.
Actually, you can use x-SNAPSHOT version and still use the maven-release-plugin. Just use mvn release:prepare before mvn release:perform to prepare your release and change the version in the poms from x-SNAPSHOT to a new version (you will be prompted for the versions to use). You can check out this introduction to the maven-release-plugin for a quick overview of release:prepare and release:perform.
Then, to include the latest version without constantly updating dependencies version, you could use dependency ranges like in the following snippet where we specify a range Junit 3.8 - Junit 4.0:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>[3.8,4.0)</version>
<scope>test</scope>
</dependency>
A version before or after the comma is not required, and means +/- infinity. For example, [4.0,) means any version greater than or equal to 4.0.
Personally, I don't like to use dependency ranges that much because I find that it can lead to build reproducibility issues and makes the build more fragile.
But you may have good reasons to use them.