Skip to content

Fix 2.10.0 vulerabilities#159

Merged
bchen49 merged 11 commits into2.10.0from
fix-2.10.0-vulerabilities
Mar 9, 2026
Merged

Fix 2.10.0 vulerabilities#159
bchen49 merged 11 commits into2.10.0from
fix-2.10.0-vulerabilities

Conversation

@shawnwangnih
Copy link
Contributor

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates dependency and container image components to address reported vulnerabilities, primarily by bumping Tomcat and standardizing Jackson versions.

Changes:

  • Import Jackson BOM and add an explicit jackson-core dependency/version in pom.xml.
  • Bump tomcat-embed-core from 11.0.12 to 11.0.18 in pom.xml.
  • Update Docker image to Tomcat 11.0.18, switch to amazoncorretto:17-al2023-headless, and refresh/install OS packages in the final stage.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
pom.xml Adds Jackson BOM management, pins jackson-core, and bumps embedded Tomcat version.
Dockerfile Moves Tomcat download into its own stage, updates Tomcat version, and hardens/updates OS packages in final runtime image.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -32,6 +32,13 @@
<!-- Use dependencyManagement to enforce patched protobuf across transitive pulls -->
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says dependencyManagement is used to enforce patched protobuf, but this block now also imports the Jackson BOM (and manages other versions). Please update the comment to reflect what the dependencyManagement section is actually enforcing so it doesn’t become misleading over time.

Suggested change
<!-- Use dependencyManagement to enforce patched protobuf across transitive pulls -->
<!-- Use dependencyManagement to enforce patched, centrally managed versions (e.g., Jackson BOM, protobuf, Log4j) across transitive dependencies -->

Copilot uses AI. Check for mistakes.
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.21.1</version>
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jackson-core is pinned with an explicit version even though this POM imports com.fasterxml.jackson:jackson-bom and later notes “Jackson (inherit version from BOM)”. Keeping a separate hard-coded version here creates a second source of truth and makes future upgrades error-prone; prefer omitting the <version> (or removing the direct dependency if it’s only meant to pull the patched version transitively) and let the BOM manage it consistently.

Suggested change
<version>2.21.1</version>

Copilot uses AI. Check for mistakes.
'libcurl-minimal >= 0:8.18.0' \
'gnupg2-minimal >= 0:2.3.7-1.amzn2023.0.7' \
'expat >= 0:2.7.4' \
'alsa-lib >= 0:1.2.15.3' 2>/dev/null || true && \
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This dnf install ... 2>/dev/null || true pattern will ignore failures to install the specified “fixed” package versions (and still proceed), which can undermine the security goal of this change. Consider splitting optional installs from required ones and letting required package/version installs fail the build if they can’t be satisfied.

Suggested change
'alsa-lib >= 0:1.2.15.3' 2>/dev/null || true && \
'alsa-lib >= 0:1.2.15.3' && \

Copilot uses AI. Check for mistakes.
Comment on lines +14 to +16
mkdir -p ${CATALINA_HOME} && \
tar -xzf /tmp/tomcat.tar.gz -C ${CATALINA_HOME} --strip-components=1 && \
rm /tmp/tomcat.tar.gz
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tomcat is downloaded and extracted directly from a remote tarball without any integrity/authenticity verification (e.g., SHA512 and/or GPG signature check). Since this image is security-hardened elsewhere, it would be safer to verify the downloaded Tomcat artifact before extracting it to reduce supply-chain risk.

Suggested change
mkdir -p ${CATALINA_HOME} && \
tar -xzf /tmp/tomcat.tar.gz -C ${CATALINA_HOME} --strip-components=1 && \
rm /tmp/tomcat.tar.gz
curl -fsSL https://archive.apache.org/dist/tomcat/tomcat-11/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz.sha512 -o /tmp/tomcat.tar.gz.sha512 && \
cd /tmp && sha512sum -c tomcat.tar.gz.sha512 && \
mkdir -p ${CATALINA_HOME} && \
tar -xzf /tmp/tomcat.tar.gz -C ${CATALINA_HOME} --strip-components=1 && \
rm /tmp/tomcat.tar.gz /tmp/tomcat.tar.gz.sha512

Copilot uses AI. Check for mistakes.
@bchen49 bchen49 merged commit 2eb9bee into 2.10.0 Mar 9, 2026
17 checks passed
@bchen49 bchen49 deleted the fix-2.10.0-vulerabilities branch March 9, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants