-
Notifications
You must be signed in to change notification settings - Fork 0
Fix 2.10.0 vulerabilities #159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a0aa5d3
cd31d67
7a6b117
4d4fd0f
cfccc18
dda5f2a
91f84d3
d4b1e7d
09926c6
df123a2
ff76f0a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -5,23 +5,45 @@ WORKDIR /usr/src/app | |||||
| COPY . . | ||||||
| RUN mvn package -DskipTests | ||||||
|
|
||||||
| FROM maven:3.9.9-amazoncorretto-17-al2023 AS tomcat | ||||||
|
|
||||||
| ENV CATALINA_HOME=/usr/local/tomcat | ||||||
| ENV TOMCAT_VERSION=11.0.18 | ||||||
|
|
||||||
| RUN curl -fsSL https://archive.apache.org/dist/tomcat/tomcat-11/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz -o /tmp/tomcat.tar.gz && \ | ||||||
| mkdir -p ${CATALINA_HOME} && \ | ||||||
| tar -xzf /tmp/tomcat.tar.gz -C ${CATALINA_HOME} --strip-components=1 && \ | ||||||
| rm /tmp/tomcat.tar.gz | ||||||
|
|
||||||
| # Production stage - Amazon Linux 2023 with Corretto 17 and Tomcat 11 | ||||||
| FROM amazoncorretto:17-al2023 AS final | ||||||
| FROM amazoncorretto:17-al2023-headless AS final | ||||||
|
|
||||||
| ENV CATALINA_HOME=/usr/local/tomcat | ||||||
| ENV PATH=$CATALINA_HOME/bin:$PATH | ||||||
| ENV TOMCAT_VERSION=11.0.12 | ||||||
| ENV TOMCAT_VERSION=11.0.18 | ||||||
|
|
||||||
| # Cache bust ARG - update this date to force fresh package pulls | ||||||
| ARG CACHE_BUST=2026-03-02 | ||||||
|
|
||||||
| RUN dnf update -y && \ | ||||||
| dnf install -y unzip tar gzip shadow-utils wget && \ | ||||||
| # Force refresh repo metadata and install fixed package versions | ||||||
| RUN echo "CACHE_BUST=${CACHE_BUST}" && \ | ||||||
| dnf clean all && \ | ||||||
| dnf makecache --refresh && \ | ||||||
| dnf upgrade -y --refresh --best --allowerasing && \ | ||||||
| dnf install -y --setopt=install_weak_deps=False wget && \ | ||||||
| dnf install -y --refresh --best \ | ||||||
| 'openssl-libs >= 1:3.2.2-1.amzn2023.0.5' \ | ||||||
| 'openssl-fips-provider-latest >= 1:3.2.2-1.amzn2023.0.5' \ | ||||||
| 'curl-minimal >= 0:8.18.0' \ | ||||||
| '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 && \ | ||||||
|
||||||
| 'alsa-lib >= 0:1.2.15.3' 2>/dev/null || true && \ | |
| 'alsa-lib >= 0:1.2.15.3' && \ |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -32,6 +32,13 @@ | |||||
| <!-- Use dependencyManagement to enforce patched protobuf across transitive pulls --> | ||||||
|
||||||
| <!-- 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
AI
Mar 9, 2026
There was a problem hiding this comment.
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.
| <version>2.21.1</version> |
There was a problem hiding this comment.
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.