You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by fa...@apache.org on 2023/07/30 14:13:38 UTC

[incubator-pekko-grpc] branch main updated: upgrade to protobuf-java 3.20.3 (from 3.20.1) due to CVEs (#117)

This is an automated email from the ASF dual-hosted git repository.

fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko-grpc.git


The following commit(s) were added to refs/heads/main by this push:
     new e69b0920 upgrade to protobuf-java 3.20.3 (from 3.20.1) due to CVEs (#117)
e69b0920 is described below

commit e69b0920d76aa7190e56e4524c88c3eddc8c4d19
Author: PJ Fanning <pj...@users.noreply.github.com>
AuthorDate: Sun Jul 30 15:13:33 2023 +0100

    upgrade to protobuf-java 3.20.3 (from 3.20.1) due to CVEs (#117)
    
    * protobuf 3.20.3
    
    * try to just upgrade protobuf java version
    
    * split protoc and protobuf-java versions
    
    * Update Dependencies.scala
---
 build.sbt                                                          | 7 ++++---
 project/Dependencies.scala                                         | 7 ++++---
 project/VersionSyncCheckPlugin.scala                               | 2 +-
 .../src/main/scala/org/apache/pekko/grpc/sbt/PekkoGrpcPlugin.scala | 2 +-
 sbt-plugin/src/sbt-test/gen-java/01-gen-basic-java/build.sbt       | 2 +-
 sbt-plugin/src/sbt-test/gen-java/04-crash-on-keywords/build.sbt    | 2 +-
 6 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/build.sbt b/build.sbt
index 1a1eac37..d7f5119a 100644
--- a/build.sbt
+++ b/build.sbt
@@ -56,7 +56,8 @@ lazy val codegen = Project(id = "codegen", base = file("codegen"))
     buildInfoKeys += "pekkoVersion" -> Dependencies.Versions.pekko,
     buildInfoKeys += "pekkoHttpVersion" -> Dependencies.Versions.pekkoHttp,
     buildInfoKeys += "grpcVersion" -> Dependencies.Versions.grpc,
-    buildInfoKeys += "googleProtobufVersion" -> Dependencies.Versions.googleProtobuf,
+    buildInfoKeys += "googleProtocVersion" -> Dependencies.Versions.googleProtoc,
+    buildInfoKeys += "googleProtobufJavaVersion" -> Dependencies.Versions.googleProtobufJava,
     buildInfoPackage := "org.apache.pekko.grpc.gen",
     (Compile / assembly / artifact) := {
       val art = (Compile / assembly / artifact).value
@@ -83,7 +84,7 @@ lazy val runtime = Project(id = "runtime", base = file("runtime"))
     AutomaticModuleName.settings("pekko.grpc.runtime"),
     ReflectiveCodeGen.generatedLanguages := Seq("Scala"),
     ReflectiveCodeGen.extraGenerators := Seq("ScalaMarshallersCodeGenerator"),
-    PB.protocVersion := Dependencies.Versions.googleProtobuf)
+    PB.protocVersion := Dependencies.Versions.googleProtoc)
   .enablePlugins(org.apache.pekko.grpc.build.ReflectiveCodeGen)
   .enablePlugins(ReproducibleBuildsPlugin)
 
@@ -161,7 +162,7 @@ lazy val interopTests = Project(id = "interop-tests", base = file("interop-tests
     ReflectiveCodeGen.generatedLanguages := Seq("Scala", "Java"),
     ReflectiveCodeGen.extraGenerators := Seq("ScalaMarshallersCodeGenerator"),
     ReflectiveCodeGen.codeGeneratorSettings ++= Seq("server_power_apis"),
-    PB.protocVersion := Dependencies.Versions.googleProtobuf,
+    PB.protocVersion := Dependencies.Versions.googleProtoc,
     // We need to be able to publish locally in order for sbt interopt tests to work
     // however this sbt project should not be published to an actual repository
     publishLocal / skip := false,
diff --git a/project/Dependencies.scala b/project/Dependencies.scala
index de06e905..3a950600 100644
--- a/project/Dependencies.scala
+++ b/project/Dependencies.scala
@@ -35,7 +35,8 @@ object Dependencies {
     // Even referenced explicitly in the sbt-plugin's sbt-tests
     // If changing this, remember to update protoc plugin version to align in
     // maven-plugin/src/main/maven/plugin.xml and org.apache.pekko.grpc.sbt.PekkoGrpcPlugin
-    val googleProtobuf = "3.20.1" // checked synced by VersionSyncCheckPlugin
+    val googleProtoc = "3.20.1" // checked synced by VersionSyncCheckPlugin
+    val googleProtobufJava = "3.20.3"
 
     val scalaTest = "3.2.15"
 
@@ -87,8 +88,8 @@ object Dependencies {
   }
 
   object Protobuf {
-    val protobufJava = "com.google.protobuf" % "protobuf-java" % Versions.googleProtobuf
-    val googleCommonProtos = "com.google.protobuf" % "protobuf-java" % Versions.googleProtobuf % "protobuf"
+    val protobufJava = "com.google.protobuf" % "protobuf-java" % Versions.googleProtobufJava
+    val googleCommonProtos = "com.google.protobuf" % "protobuf-java" % Versions.googleProtobufJava % "protobuf"
   }
 
   object Plugins {
diff --git a/project/VersionSyncCheckPlugin.scala b/project/VersionSyncCheckPlugin.scala
index 4c5c0fa4..65f4b03f 100644
--- a/project/VersionSyncCheckPlugin.scala
+++ b/project/VersionSyncCheckPlugin.scala
@@ -40,7 +40,7 @@ object VersionSyncCheckPlugin extends AutoPlugin {
         Paths.get("gradle-plugin/src/main/groovy/org/apache/pekko/grpc/gradle/PekkoGrpcPluginExtension.groovy"))).value,
     googleProtobufVersionSyncCheck := versionSyncCheckImpl(
       "Google Protobuf",
-      Dependencies.Versions.googleProtobuf,
+      Dependencies.Versions.googleProtoc,
       raw"""(?i)protoc_?version.*= ?"-?v?(\d+\.\d+\.\d+)"""".r.unanchored,
       Seq(
         Paths.get("maven-plugin/src/main/maven/plugin.xml"),
diff --git a/sbt-plugin/src/main/scala/org/apache/pekko/grpc/sbt/PekkoGrpcPlugin.scala b/sbt-plugin/src/main/scala/org/apache/pekko/grpc/sbt/PekkoGrpcPlugin.scala
index 4a8eeb9b..cbb06e77 100644
--- a/sbt-plugin/src/main/scala/org/apache/pekko/grpc/sbt/PekkoGrpcPlugin.scala
+++ b/sbt-plugin/src/main/scala/org/apache/pekko/grpc/sbt/PekkoGrpcPlugin.scala
@@ -111,7 +111,7 @@ object PekkoGrpcPlugin extends AutoPlugin {
         generatorLogger.logger = streams.value.log
         (Test / PB.recompile).value
       },
-      PB.protocVersion := BuildInfo.googleProtobufVersion)
+      PB.protocVersion := BuildInfo.googleProtocVersion)
 
   def configSettings(config: Configuration): Seq[Setting[_]] =
     inConfig(config)(
diff --git a/sbt-plugin/src/sbt-test/gen-java/01-gen-basic-java/build.sbt b/sbt-plugin/src/sbt-test/gen-java/01-gen-basic-java/build.sbt
index a50522b5..58c221a0 100644
--- a/sbt-plugin/src/sbt-test/gen-java/01-gen-basic-java/build.sbt
+++ b/sbt-plugin/src/sbt-test/gen-java/01-gen-basic-java/build.sbt
@@ -11,4 +11,4 @@ javacOptions += "-Xdoclint:all"
 
 pekkoGrpcGeneratedLanguages := Seq(PekkoGrpc.Java)
 
-libraryDependencies += "com.google.protobuf" % "protobuf-java" % org.apache.pekko.grpc.gen.BuildInfo.googleProtobufVersion % "protobuf"
+libraryDependencies += "com.google.protobuf" % "protobuf-java" % org.apache.pekko.grpc.gen.BuildInfo.googleProtobufJavaVersion % "protobuf"
diff --git a/sbt-plugin/src/sbt-test/gen-java/04-crash-on-keywords/build.sbt b/sbt-plugin/src/sbt-test/gen-java/04-crash-on-keywords/build.sbt
index a50522b5..58c221a0 100644
--- a/sbt-plugin/src/sbt-test/gen-java/04-crash-on-keywords/build.sbt
+++ b/sbt-plugin/src/sbt-test/gen-java/04-crash-on-keywords/build.sbt
@@ -11,4 +11,4 @@ javacOptions += "-Xdoclint:all"
 
 pekkoGrpcGeneratedLanguages := Seq(PekkoGrpc.Java)
 
-libraryDependencies += "com.google.protobuf" % "protobuf-java" % org.apache.pekko.grpc.gen.BuildInfo.googleProtobufVersion % "protobuf"
+libraryDependencies += "com.google.protobuf" % "protobuf-java" % org.apache.pekko.grpc.gen.BuildInfo.googleProtobufJavaVersion % "protobuf"


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org