Skip to content

Standardize jackson-core in Docker images to pinned versions from Maven Central#4220

Open
jykae wants to merge 4 commits intoflyway:mainfrom
jykae:main
Open

Standardize jackson-core in Docker images to pinned versions from Maven Central#4220
jykae wants to merge 4 commits intoflyway:mainfrom
jykae:main

Conversation

@jykae
Copy link

@jykae jykae commented Mar 17, 2026

Proposed changes

Flyway 12's Maven assembly bundles multiple jackson-core versions in /flyway/lib/ because internal modules (flyway-core, flyway-database-*, flyway-reports) each resolve their own transitive jackson dependency. This triggers Trivy findings for the older versions.

Changes

  • All three Dockerfile variants (base, alpine, azure) that extract the flyway-commandline tarball now:

    • Delete all jackson-core-*.jar from the extracted distribution
    • Download the two required versions from Maven Central with SHA-256 verification
    • com.fasterxml.jackson.core:jackson-core:2.21.1 (2.x API consumers)
    • tools.jackson.core:jackson-core:3.1.0 (Flyway's own 3.x usage)
  • Versions and checksums are build ARGs with defaults matching pom.xml, overridable at build time without code changes

ARG JACKSON_CORE_V2=2.21.1
ARG JACKSON_CORE_V2_SHA256=1edd5f2e49dca5f8e4519957c24b7b3050bd1c7ee883920da33cff031ff1f7c0
ARG JACKSON_CORE_V3=3.1.0
ARG JACKSON_CORE_V3_SHA256=4dd383f96b51b9b9ac4b74bdf1c150df0100443e1da1fba480f57da09a2dcef7

Mono/oracle/redgate overlay Dockerfiles inherit from these base images — no changes needed there.

Copilot AI and others added 4 commits March 17, 2026 12:18
…rsions

Remove all jackson-core JARs bundled by the Maven assembly and replace
them with the exact pinned versions downloaded from Maven Central during
Docker build. This ensures the runtime image contains only:
  - jackson-core 2.21.1 (com.fasterxml.jackson.core)
  - jackson-core 3.1.0  (tools.jackson.core)

Applied to all three Dockerfile variants (base, alpine, azure) that
extract the flyway-commandline tarball.

Co-authored-by: jykae <293452+jykae@users.noreply.github.com>
Address code review feedback: verify integrity of JARs downloaded from
Maven Central using sha256sum to prevent supply-chain tampering.

Co-authored-by: jykae <293452+jykae@users.noreply.github.com>
…encies

Standardize jackson-core in Docker images to pinned versions from Maven Central
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.

❌ Copilot
❌ jykae
You have signed the CLA already but the status is still pending? Let us recheck it.

@jykae
Copy link
Author

jykae commented Mar 18, 2026

@copilot could you sign your contributor license agreement in PR comment

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