Skip to content

Commit

Permalink
Upgrade to latest docker image and update a few libraries with CVEs (#…
Browse files Browse the repository at this point in the history
…3488)

Fixes CVE CVE-2022-25857, CVE-2022-42003, CVE-2022-42004

Also updates maven wrapper and a couple maven plugins
  • Loading branch information
llinder authored Dec 14, 2022
1 parent e5d7f21 commit 25e231b
Show file tree
Hide file tree
Showing 15 changed files with 52 additions and 28 deletions.
Binary file modified .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
18 changes: 17 additions & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ GenericContainer<?> createZipkinContainer(@Nullable GenericContainer<?> storage)

final GenericContainer<?> zipkin;
if (RELEASE_VERSION == null) {
zipkin = new GenericContainer<>(parse("ghcr.io/openzipkin/java:15.0.5_p3"));
zipkin = new GenericContainer<>(parse("ghcr.io/openzipkin/java:17.0.5_p8"));
List<String> classpath = new ArrayList<>();
for (String item : System.getProperty("java.class.path").split(File.pathSeparator)) {
Path path = Paths.get(item);
Expand Down
4 changes: 2 additions & 2 deletions build-bin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ explicitly defined and `on.tags` is a [glob pattern](https://docs.github.com/en/
```yaml
on:
push:
tags: '[0-9]+.[0-9]+.[0-9]+**' # Ex. 8.272.10 or 15.0.5_p3
tags: '[0-9]+.[0-9]+.[0-9]+**' # Ex. 8.272.10 or 17.0.5_p8
branches: master
jobs:
Expand Down Expand Up @@ -223,7 +223,7 @@ jobs:
- if [ "${SHOULD_DEPLOY}" != "true" ]; then travis_terminate 0; fi
- travis_wait ./build-bin/deploy master
- stage: deploy
# Ex. 8.272.10 or 15.0.5_p3
# Ex. 8.272.10 or 17.0.5_p8
if: tag =~ /^[0-9]+\.[0-9]+\.[0-9]+/ AND type = push AND env(GH_TOKEN) IS present
install: ./build-bin/configure_deploy
script: ./build-bin/deploy ${TRAVIS_TAG}
Expand Down
6 changes: 3 additions & 3 deletions build-bin/docker/docker_args
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,21 @@ if [ -n "${DOCKER_TARGET}" ]; then
fi

# When non-empty, becomes the base layer including tag appropriate for the image being built.
# Ex. ghcr.io/openzipkin/java:15.0.5_p3-jre
# Ex. ghcr.io/openzipkin/java:17.0.5_p8-jre
#
# This is not required to be a base (FROM scratch) image like ghcr.io/openzipkin/alpine:3.14.2
# See https://docs.docker.com/glossary/#parent-image
if [ -n "${DOCKER_PARENT_IMAGE}" ]; then
docker_args="${docker_args} --build-arg docker_parent_image=${DOCKER_PARENT_IMAGE}"
fi

# When non-empty, becomes the build-arg alpine_version. Ex. "3.14.2"
# When non-empty, becomes the build-arg alpine_version. Ex. "3.16.3"
# Used to align base layers from https://github.com/orgs/openzipkin/packages/container/package/alpine
if [ -n "${ALPINE_VERSION}" ]; then
docker_args="${docker_args} --build-arg alpine_version=${ALPINE_VERSION}"
fi

# When non-empty, becomes the build-arg java_version. Ex. "15.0.5_p3"
# When non-empty, becomes the build-arg java_version. Ex. "17.0.5_p8"
# Used to align base layers from https://github.com/orgs/openzipkin/packages/container/package/java
if [ -n "${JAVA_VERSION}" ]; then
docker_args="${docker_args} --build-arg java_version=${JAVA_VERSION}"
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Use latest version here: https://github.com/orgs/openzipkin/packages/container/package/java
# This is defined in many places because Docker has no "env" script functionality unless you use
# docker-compose: When updating, update everywhere.
ARG java_version=15.0.8_p4
ARG java_version=17.0.5_p8

# We copy files from the context into a scratch container first to avoid a problem where docker and
# docker-compose don't share layer hashes https://github.com/docker/compose/issues/883 normally.
Expand Down
7 changes: 4 additions & 3 deletions docker/test-images/zipkin-cassandra/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
# Use latest version here: https://github.com/orgs/openzipkin/packages/container/package/java
# This is defined in many places because Docker has no "env" script functionality unless you use
# docker-compose: When updating, update everywhere.
ARG java_version=15.0.5_p3
# Note: Cassandra does not support Java 17 yet so use older JRE for testing
ARG java_version=15.0.8_p4

# We copy files from the context into a scratch container first to avoid a problem where docker and
# docker-compose don't share layer hashes https://github.com/docker/compose/issues/883 normally.
Expand All @@ -34,7 +35,7 @@ FROM ghcr.io/openzipkin/java:${java_version} as install
# Use latest stable version: https://cassandra.apache.org/download/
# This is defined in many places because Docker has no "env" script functionality unless you use
# docker-compose: When updating, update everywhere.
ARG cassandra_version=3.11.9
ARG cassandra_version=4.0.7
ENV CASSANDRA_VERSION=$cassandra_version
WORKDIR /install

Expand All @@ -44,7 +45,7 @@ RUN /tmp/install.sh && rm /tmp/install.sh

FROM ghcr.io/openzipkin/java:${java_version}-jre as zipkin-cassandra
LABEL org.opencontainers.image.description="Cassandra on OpenJDK and Alpine Linux with Zipkin keyspaces pre-installed"
ARG cassandra_version=3.11.9
ARG cassandra_version=4.0.7
LABEL cassandra-version=$cassandra_version
ENV CASSANDRA_VERSION=$cassandra_version

Expand Down
5 changes: 1 addition & 4 deletions docker/test-images/zipkin-cassandra/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ storage_port: 7000
native_transport_port: 9042
listen_address: 127.0.0.1
start_native_transport: true
start_rpc: false
seed_provider:
- class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters:
Expand Down Expand Up @@ -186,9 +185,7 @@ is_cassandra_alive || exit 1

echo "*** Installing cqlsh"
# stuck on python2 for compatibility with cassandra 3.x
apk add --update --no-cache python2 py2-setuptools
# use pip version that is compatible with python2
python2 -m easy_install pip==20.3.4
apk add --update --no-cache python3 py3-pip
pip install -Iq cqlsh
function cql() {
cqlsh --cqlversion=${cqlversion} "$@" 127.0.0.1 ${temp_native_transport_port}
Expand Down
2 changes: 1 addition & 1 deletion docker/test-images/zipkin-elasticsearch6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Use latest version here: https://github.com/orgs/openzipkin/packages/container/package/java
# This is defined in many places because Docker has no "env" script functionality unless you use
# docker-compose: When updating, update everywhere.
ARG java_version=15.0.5_p3
ARG java_version=17.0.5_p8

# We copy files from the context into a scratch container first to avoid a problem where docker and
# docker-compose don't share layer hashes https://github.com/docker/compose/issues/883 normally.
Expand Down
2 changes: 1 addition & 1 deletion docker/test-images/zipkin-elasticsearch7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Use latest version here: https://github.com/orgs/openzipkin/packages/container/package/java
# This is defined in many places because Docker has no "env" script functionality unless you use
# docker-compose: When updating, update everywhere.
ARG java_version=15.0.5_p3
ARG java_version=17.0.5_p8

# We copy files from the context into a scratch container first to avoid a problem where docker and
# docker-compose don't share layer hashes https://github.com/docker/compose/issues/883 normally.
Expand Down
2 changes: 1 addition & 1 deletion docker/test-images/zipkin-kafka/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# Use latest version here: https://github.com/orgs/openzipkin/packages/container/package/java
# This is defined in many places because Docker has no "env" script functionality unless you use
# docker-compose: When updating, update everywhere.
ARG java_version=15.0.5_p3
ARG java_version=17.0.5_p8

# We copy files from the context into a scratch container first to avoid a problem where docker and
# docker-compose don't share layer hashes https://github.com/docker/compose/issues/883 normally.
Expand Down
4 changes: 2 additions & 2 deletions docker/test-images/zipkin-mysql/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Use latest version here: https://github.com/orgs/openzipkin/packages/container/package/alpine
# This is defined in many places because Docker has no "env" script functionality unless you use
# docker-compose: When updating, update everywhere.
ARG alpine_version=3.14.3
ARG alpine_version=3.16.3

# We copy files from the context into a scratch container first to avoid a problem where docker and
# docker-compose don't share layer hashes https://github.com/docker/compose/issues/883 normally.
Expand All @@ -37,7 +37,7 @@ HEALTHCHECK --interval=1s --start-period=30s --timeout=5s CMD ["docker-healthche
ENTRYPOINT ["start-mysql"]

# Use latest from https://pkgs.alpinelinux.org/packages?name=mysql
ARG mysql_version=10.6.8
ARG mysql_version=10.6.11
LABEL mysql-version=$mysql_version
ENV MYSQL_VERSION=$mysql_version

Expand Down
6 changes: 3 additions & 3 deletions docker/test-images/zipkin-ui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
# Use latest version here: https://github.com/orgs/openzipkin/packages/container/package/alpine
# This is defined in many places because Docker has no "env" script functionality unless you use
# docker-compose: When updating, update everywhere.
ARG alpine_version=3.14.3
ARG alpine_version=3.16.3

# java_version is used during the installation process to build or download the zipkin-lens jar.
#
# Use latest version here: https://github.com/orgs/openzipkin/packages/container/package/java
# This is defined in many places because Docker has no "env" script functionality unless you use
# docker-compose: When updating, update everywhere.
ARG java_version=15.0.5_p3
ARG java_version=17.0.5_p8

# We copy files from the context into a scratch container first to avoid a problem where docker and
# docker-compose don't share layer hashes https://github.com/docker/compose/issues/883 normally.
Expand Down Expand Up @@ -61,7 +61,7 @@ RUN /build-bin/maven/maven_build_or_unjar io.zipkin zipkin-lens ${VERSION}
FROM ghcr.io/openzipkin/alpine:$alpine_version as zipkin-ui
LABEL org.opencontainers.image.description="NGINX on Alpine Linux hosting the Zipkin UI with Zipkin API proxy_pass"
# Use latest from https://pkgs.alpinelinux.org/packages?name=nginx
ARG nginx_version=1.20.2
ARG nginx_version=1.22.1
LABEL nginx-version=$nginx_version

ENV ZIPKIN_BASE_URL=http://zipkin:9411
Expand Down
13 changes: 8 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<netty.version>4.1.78.Final</netty.version>

<!-- It's easy for Jackson dependencies to get misaligned, so we manage it ourselves. -->
<jackson.version>2.13.2.1</jackson.version>
<jackson.version>2.14.0</jackson.version>

<java-driver.version>4.11.3</java-driver.version>
<micrometer.version>1.9.3</micrometer.version>
Expand All @@ -66,7 +66,9 @@

<!-- update together -->
<spring-boot.version>2.5.14</spring-boot.version>
<spring.version>5.3.22</spring.version>
<spring.version>5.3.23</spring.version>
<!-- override spring dependency version, CVE-2022-25857 -->
<snakeyaml.version>1.33</snakeyaml.version>

<!-- MySQL connector is GPL, even if it has an OSS exception.
https://www.mysql.com/about/legal/licensing/foss-exception/
Expand Down Expand Up @@ -101,12 +103,12 @@
-->
<license.skip>true</license.skip>

<animal-sniffer-maven-plugin.version>1.20</animal-sniffer-maven-plugin.version>
<animal-sniffer-maven-plugin.version>1.22</animal-sniffer-maven-plugin.version>
<go-offline-maven-plugin.version>1.2.8</go-offline-maven-plugin.version>
<!-- TODO: cleanup any redundant ignores now also in the 4.0 release (once final) -->
<license-maven-plugin.version>4.0.rc2</license-maven-plugin.version>
<maven-bundle-plugin.version>5.1.1</maven-bundle-plugin.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
<!-- Use same version as https://github.com/openzipkin/docker-java -->
<maven-dependency-plugin.version>3.1.2</maven-dependency-plugin.version>
<maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
Expand All @@ -119,7 +121,7 @@
<maven-release-plugin.version>3.0.0-M1</maven-release-plugin.version>
<maven-shade-plugin.version>3.2.4</maven-shade-plugin.version>
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
<maven-surefire-plugin.version>3.0.0-M7</maven-surefire-plugin.version>
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
</properties>

Expand Down Expand Up @@ -302,6 +304,7 @@
<source>${main.java.version}</source>
<target>${main.java.version}</target>
<fork>true</fork>
<release>8</release>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
Expand Down
7 changes: 7 additions & 0 deletions zipkin-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@
</exclusions>
</dependency>

<!-- Override Spring dependency to avoide CVE-2022-25857 -->
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>${snakeyaml.version}</version>
</dependency>

<!-- Override log4j 2 version to avoid CVE-2021-44228 -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
Expand Down

0 comments on commit 25e231b

Please sign in to comment.