You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Maven POM for opentelemetry-exporter-sender-okhttp resolves a dependency to okio to the default 3.2.0 (as okhttp 4.11 depends on) instead of the okio BOM version declared in opentelemetry gradle build files.
Steps to reproduce
Have the opentelemetry artifacts in the local maven repository
What version and what artifacts are you using?
opentelemetry-exporter-sender-okhttp:3.6.0
Environment
Runtime: OpenJDK Runtime Environment Zulu17.44+15-CA (build 17.0.8+7-LTS)
OS: OS X Sonoma
Additional context
I'd stumbled upon this issue due to OWASP dependency check reporting CVE-2023-3635 wrt okio 3.2.0 . As I tried to find out whether a newer opentelemetry-java artifacts would've bumped the okio dependency, I've seen the aforementioned BOM declaration, leading me to believe it was intended to make opentelemetry use a properly newer version of okio already.
I guess it's an issue with Gradle not including the <dependencyManagement> part in the generated POM file. If that's the case and it was not in any way intended, I could take a stab at providing a fix PR, but would first like to pick a project maintainer's mind about the issue (perhaps some guidelines, if any).
The text was updated successfully, but these errors were encountered:
Hi @trask! Thank you and sorry, I couldn't find this issue previously. It is related but focuses on sth different (the CVE itself vs dependency management), but if the problem I described here was solved, the other issue would also have a better resolution.
opentelemetry gradle build files do properly define a dependency on the newer okio BOM (i.e. without the vulnerability in question) and when running gradlew dependencies for opentelemetry-java/exporters/sender/okhttp we can see that gradle resolves the newer version:
runtimeClasspath - Runtime classpath of source set 'main'.
...
| +--- com.squareup.okio:okio-bom:{strictly 3.6.0} -> 3.6.0
– instead of the 3.2.0 version as resolved when using opentelemetry libs as a maven artifact.
If gradle could be made to retain the okio-bom in the resulting maven artifact's pom.xml by adding a <dependencyManagement> block, I think it would make the opentelemetry (when used as a dependency) also pull in the proper, newer version of okio. WDYT?
This comment contains the reason we can't (maybe shouldn't?) do that:
We've verified that the non-vulnerable okio version works within opentelemetry's usage patterns of okhttp (since the opentelemetry-java tests themselves are running against the non-vulnerable okio version via the okio-bom usage).
But if we pass along these non-aligned versions of okhttp and okio as transitive dependencies, we could potentially break people downstream who are using okhttp in other ways.
Describe the bug
Maven POM for
opentelemetry-exporter-sender-okhttp
resolves a dependency to okio to the default 3.2.0 (as okhttp 4.11 depends on) instead of the okio BOM version declared in opentelemetry gradle build files.Steps to reproduce
mvn -f ~/.m2/repository/io/opentelemetry/opentelemetry-exporter-sender-okhttp/1.31.0/opentelemetry-exporter-sender-okhttp-1.31.0.pom dependency:tree
Alternatively:
What did you expect to see?
– because the opentelemetry gradle dependency management file declares a dependency on the relevant BOM in version 3.6.0
What did you see instead?
What version and what artifacts are you using?
opentelemetry-exporter-sender-okhttp:3.6.0
Environment
Runtime: OpenJDK Runtime Environment Zulu17.44+15-CA (build 17.0.8+7-LTS)
OS: OS X Sonoma
Additional context
I'd stumbled upon this issue due to OWASP dependency check reporting CVE-2023-3635 wrt okio 3.2.0 . As I tried to find out whether a newer opentelemetry-java artifacts would've bumped the okio dependency, I've seen the aforementioned BOM declaration, leading me to believe it was intended to make opentelemetry use a properly newer version of okio already.
I guess it's an issue with Gradle not including the
<dependencyManagement>
part in the generated POM file. If that's the case and it was not in any way intended, I could take a stab at providing a fix PR, but would first like to pick a project maintainer's mind about the issue (perhaps some guidelines, if any).The text was updated successfully, but these errors were encountered: