From de98400c39da91fb0c3b200e57676f8abdc6cc50 Mon Sep 17 00:00:00 2001 From: Alex Goodman Date: Fri, 11 Sep 2026 14:44:45 -0400 Subject: [PATCH] fix(test): drop apt from java-no-main-package fixture (#5283) the base image is digest-pinned to a bullseye snapshot whose InRelease has expired, so `apt-get update` now exits 100 on any cold fixture build. rather than disable Check-Valid-Until (which just delays the next break), skip apt entirely: - `less` was never used and `unzip` already ships in the base image - rezip with `jar cfM` from the base JDK instead of installing `zip` the `-M` matters here: this fixture intentionally has no META-INF/MANIFEST.MF, and plain `jar cf` would generate one. Signed-off-by: Alex Goodman --- .../testdata/image-java-no-main-package/Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/syft/internal/test/integration/testdata/image-java-no-main-package/Dockerfile b/cmd/syft/internal/test/integration/testdata/image-java-no-main-package/Dockerfile index 3271f14cf..9356e4f8b 100644 --- a/cmd/syft/internal/test/integration/testdata/image-java-no-main-package/Dockerfile +++ b/cmd/syft/internal/test/integration/testdata/image-java-no-main-package/Dockerfile @@ -8,8 +8,6 @@ RUN mkdir tmp WORKDIR /usr/share/jenkins/tmp -RUN apt-get update 2>&1 > /dev/null && apt-get install -y less zip 2>&1 > /dev/null - RUN unzip ../jenkins.war 2>&1 > /dev/null RUN rm -rf ./META-INF/MANIFEST.MF ./WEB-INF ./jsbundles ./scripts ./css @@ -18,7 +16,8 @@ WORKDIR /usr/share/jenkins RUN rm -rf jenkins.war -RUN cd ./tmp && zip -r ../jenkins.war . && cd .. +# use jar (from the JDK in the base image) to rezip -- M keeps it manifest-less, which is the point of this fixture +RUN cd ./tmp && jar cfM ../jenkins.war . && cd .. RUN rm -rf ./tmp