Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb37d5ae07 | ||
|
|
e7a81092c5 | ||
|
|
e8f76aa2d9 | ||
|
|
ae450fa878 | ||
|
|
4a792c54ef | ||
|
|
ecb1700c08 | ||
|
|
fc99de2d53 | ||
|
|
e099e0302b | ||
|
|
6764cf1eff |
@@ -43,6 +43,17 @@ ext {
|
||||
jwtVersion = "0.13.0"
|
||||
awsSdkVersion = "2.44.12"
|
||||
testcontainersMinioVersion = "1.21.4"
|
||||
// Security CVE overrides for Spring Boot 4 BOM-managed transitives
|
||||
nettyVersion = "4.2.15.Final"
|
||||
jackson2Version = "2.22.0"
|
||||
// jackson-annotations ships 2-component versions (2.22, not 2.22.0)
|
||||
jackson2AnnotationsVersion = "2.22"
|
||||
// Jackson 3 (tools.jackson) used by Spring Boot 4; 3.1.4 patches CVE-2026-54512..54518
|
||||
jackson3Version = "3.1.4"
|
||||
postgresqlVersion = "42.7.11"
|
||||
// velocity-engine-core 2.3 (via shib-velocity SAML stack) shades a vulnerable
|
||||
// commons-io 2.8.0 (CVE-2024-47554) into its jar; 2.4.1 no longer shades it
|
||||
velocityVersion = "2.4.1"
|
||||
// junit-platform-launcher version managed by Spring Boot BOM
|
||||
modernJavaVersion = 25
|
||||
}
|
||||
@@ -222,10 +233,33 @@ subprojects {
|
||||
resolutionStrategy.force "org.apache.commons:commons-lang3:${commonsLang3}"
|
||||
// CVE-2024-47554: commons-io DoS prevention
|
||||
resolutionStrategy.force "commons-io:commons-io:${commonsIoVersion}"
|
||||
// CVE-2024-47554: velocity-engine-core 2.3 shades commons-io 2.8.0; 2.4.1 unshades it
|
||||
resolutionStrategy.force "org.apache.velocity:velocity-engine-core:${velocityVersion}"
|
||||
// Keep BouncyCastle modules aligned to avoid runtime linkage errors
|
||||
resolutionStrategy.force "org.bouncycastle:bcprov-jdk18on:${bouncycastleVersion}"
|
||||
resolutionStrategy.force "org.bouncycastle:bcpkix-jdk18on:${bouncycastleVersion}"
|
||||
resolutionStrategy.force "org.bouncycastle:bcutil-jdk18on:${bouncycastleVersion}"
|
||||
resolutionStrategy.eachDependency { details ->
|
||||
// Netty 4.2.x: CVE-2026-44249/45416/45673/45674/47244/47691/48043/50010/50020/50560
|
||||
// /42579/42580/42581/42583/42584/42585/42587/41417 - force 4.2.15.Final across all modules
|
||||
if (details.requested.group == "io.netty") {
|
||||
details.useVersion nettyVersion
|
||||
details.because "CVE-2026 netty fixes (>=4.2.15.Final)"
|
||||
}
|
||||
// Jackson 2.x: CVE-2026-54512/54513/54514/54515/54516/54517/54518 - force 2.22.0.
|
||||
// jackson-annotations uses 2-component versions (2.22), unlike core/databind (2.22.0).
|
||||
if (details.requested.group.startsWith("com.fasterxml.jackson")) {
|
||||
details.useVersion(details.requested.name == "jackson-annotations"
|
||||
? jackson2AnnotationsVersion : jackson2Version)
|
||||
details.because "CVE-2026-54512..54518 jackson 2.x fixes (>=2.22.0)"
|
||||
}
|
||||
// Jackson 3 (tools.jackson) ships with Spring Boot 4; same CVE-2026-54512..54518
|
||||
// family is fixed in 3.1.4 (stays in Spring Boot's 3.1.x line).
|
||||
if (details.requested.group.startsWith("tools.jackson")) {
|
||||
details.useVersion jackson3Version
|
||||
details.because "CVE-2026-54512..54518 jackson 3.x fixes (>=3.1.4)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencyManagement {
|
||||
@@ -235,6 +269,8 @@ subprojects {
|
||||
dependencies {
|
||||
// Override BOM-managed commons-lang3 for CVE-2025-48924 fix
|
||||
dependency "org.apache.commons:commons-lang3:$commonsLang3"
|
||||
// CVE-2026-42198: Spring Boot 4 BOM pins postgresql 42.7.10; override to patched 42.7.11
|
||||
dependency "org.postgresql:postgresql:$postgresqlVersion"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Stirling-PDF backend-only image — JAR built with -PbuildWithFrontend=false, UI ships separately.
|
||||
|
||||
ARG BASE_VERSION=1.0.2
|
||||
ARG BASE_VERSION=1.0.4
|
||||
ARG BASE_IMAGE=stirlingtools/stirling-pdf-base:${BASE_VERSION}
|
||||
|
||||
# Stage 1: Build the Java application (backend only, no frontend)
|
||||
|
||||
+10
-6
@@ -5,7 +5,7 @@
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
# Stage 1: Build and strip Calibre
|
||||
FROM ubuntu:noble@sha256:c4a8d5503dfb2a3eb8ab5f807da5bc69a85730fb49b5cfca2330194ebcc41c7b AS calibre-build
|
||||
FROM ubuntu:noble@sha256:786a8b558f7be160c6c8c4a54f9a57274f3b4fb1491cf65146521ae77ff1dc54 AS calibre-build
|
||||
ARG TARGETPLATFORM
|
||||
ARG CALIBRE_VERSION=9.4.0
|
||||
ARG CALIBRE_STRIP_WEBENGINE=false
|
||||
@@ -270,7 +270,7 @@ RUN if [ "${CALIBRE_STRIP_WEBENGINE}" = "true" ]; then \
|
||||
|
||||
|
||||
# Stage 2: Build Ghostscript from source
|
||||
FROM ubuntu:noble@sha256:c4a8d5503dfb2a3eb8ab5f807da5bc69a85730fb49b5cfca2330194ebcc41c7b AS gs-build
|
||||
FROM ubuntu:noble@sha256:786a8b558f7be160c6c8c4a54f9a57274f3b4fb1491cf65146521ae77ff1dc54 AS gs-build
|
||||
ARG TARGETPLATFORM
|
||||
ARG GS_VERSION=10.06.0
|
||||
|
||||
@@ -294,7 +294,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
|
||||
|
||||
# Stage 3: Build PDF Tools (QPDF and ImageMagick 7)
|
||||
FROM ubuntu:noble@sha256:c4a8d5503dfb2a3eb8ab5f807da5bc69a85730fb49b5cfca2330194ebcc41c7b AS pdf-tools-build
|
||||
FROM ubuntu:noble@sha256:786a8b558f7be160c6c8c4a54f9a57274f3b4fb1491cf65146521ae77ff1dc54 AS pdf-tools-build
|
||||
ARG TARGETPLATFORM
|
||||
ARG QPDF_VERSION=12.3.2
|
||||
ARG IM_VERSION=7.1.2-13
|
||||
@@ -339,7 +339,7 @@ RUN mkdir -p /magick-export/usr/bin \
|
||||
|
||||
|
||||
# Stage 4: Build Python venv
|
||||
FROM ubuntu:noble@sha256:c4a8d5503dfb2a3eb8ab5f807da5bc69a85730fb49b5cfca2330194ebcc41c7b AS python-venv-build
|
||||
FROM ubuntu:noble@sha256:786a8b558f7be160c6c8c4a54f9a57274f3b4fb1491cf65146521ae77ff1dc54 AS python-venv-build
|
||||
ARG TARGETPLATFORM
|
||||
ARG UNOSERVER_VERSION=3.6
|
||||
|
||||
@@ -352,7 +352,8 @@ RUN --mount=type=cache,target=/root/.cache/pip,sharing=locked \
|
||||
python3 -m venv /opt/venv --system-site-packages && \
|
||||
/opt/venv/bin/pip install --no-cache-dir --prefer-binary --only-binary=:all: \
|
||||
weasyprint pdf2image opencv-python-headless ocrmypdf \
|
||||
cryptography \
|
||||
"cryptography>=48.0.1" \
|
||||
"lxml>=6.1.0" \
|
||||
"unoserver==${UNOSERVER_VERSION}" && \
|
||||
find /opt/venv -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true && \
|
||||
find /opt/venv \( -name '*.pyc' -o -name '*.pyi' \) -delete 2>/dev/null || true && \
|
||||
@@ -364,7 +365,7 @@ RUN --mount=type=cache,target=/root/.cache/pip,sharing=locked \
|
||||
|
||||
|
||||
# Final runtime image - the actual base image
|
||||
FROM eclipse-temurin:25-jre-noble@sha256:b27ca47660a8fa837e47a8533b9b1a3a430295cf29ca28d91af4fd121572dc29 AS runtime
|
||||
FROM eclipse-temurin:25-jre-noble@sha256:f9bd8815e73632c22985ebb133ec49b9fc4ad5ffe0657594ac02748ad0431ab7 AS runtime
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
@@ -382,6 +383,9 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
apt-get install -y --no-install-recommends software-properties-common; \
|
||||
add-apt-repository -y ppa:libreoffice/ppa; \
|
||||
apt-get update; \
|
||||
# Security: upgrade base-image packages to latest noble patches (reduces deb CVEs
|
||||
# in openssl, perl, libxml2, gnutls, cups, curl, etc. inherited from the runtime base)
|
||||
apt-get upgrade -y; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
# Core tools
|
||||
ca-certificates tzdata tini bash fontconfig curl \
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Stirling-PDF - Full version (embedded frontend)
|
||||
# Uses pre-built base image for fast builds
|
||||
|
||||
ARG BASE_VERSION=1.0.2
|
||||
ARG BASE_VERSION=1.0.4
|
||||
ARG BASE_IMAGE=stirlingtools/stirling-pdf-base:${BASE_VERSION}
|
||||
|
||||
# Stage 1: Build the Java application and frontend
|
||||
@@ -59,7 +59,7 @@ RUN JPDFIUM_PLATFORM="$([ "$TARGETARCH" = arm64 ] && echo linux-arm64 || echo li
|
||||
--no-daemon
|
||||
|
||||
# Stage 2: Extract Spring Boot Layers
|
||||
FROM eclipse-temurin:25-jre-noble@sha256:b27ca47660a8fa837e47a8533b9b1a3a430295cf29ca28d91af4fd121572dc29 AS jar-extract
|
||||
FROM eclipse-temurin:25-jre-noble@sha256:f9bd8815e73632c22985ebb133ec49b9fc4ad5ffe0657594ac02748ad0431ab7 AS jar-extract
|
||||
WORKDIR /tmp
|
||||
COPY --from=app-build /app/app/core/build/libs/*.jar app.jar
|
||||
RUN java -Djarmode=tools -jar app.jar extract --layers --destination /layers
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# Extra fonts for air-gapped environments
|
||||
# Uses pre-built base image for fast builds
|
||||
|
||||
ARG BASE_VERSION=1.0.2
|
||||
ARG BASE_VERSION=1.0.4
|
||||
ARG BASE_IMAGE=stirlingtools/stirling-pdf-base:${BASE_VERSION}
|
||||
|
||||
# Stage 1: Build the Java application and frontend
|
||||
|
||||
@@ -55,7 +55,7 @@ RUN JPDFIUM_PLATFORM="$([ "$TARGETARCH" = arm64 ] && echo linux-arm64 || echo li
|
||||
|
||||
# Stage 2: Runtime image
|
||||
# glibc base (not Alpine/musl): JPDFium's PDFium natives are glibc-linked.
|
||||
FROM eclipse-temurin:25-jre-noble@sha256:b27ca47660a8fa837e47a8533b9b1a3a430295cf29ca28d91af4fd121572dc29
|
||||
FROM eclipse-temurin:25-jre-noble@sha256:f9bd8815e73632c22985ebb133ec49b9fc4ad5ffe0657594ac02748ad0431ab7
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive \
|
||||
LANG=C.UTF-8 \
|
||||
@@ -99,6 +99,7 @@ ENV VERSION_TAG=$VERSION_TAG \
|
||||
RUN mkdir -p $HOME /configs /logs /customFiles /pipeline/watchedFolders /pipeline/finishedFolders /storage /tmp/stirling-pdf /tmp/stirling-pdf/heap_dumps && \
|
||||
mkdir -p /usr/share/fonts/opentype/noto && \
|
||||
apt-get update && \
|
||||
apt-get upgrade -y && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
tzdata \
|
||||
|
||||
Reference in New Issue
Block a user