Skip to content

fix(security): remediate base image CVEs from docker scout scan - #42075

Merged
subrata71 merged 2 commits into
releasefrom
fix/app-15742
Aug 12, 2026
Merged

fix(security): remediate base image CVEs from docker scout scan#42075
subrata71 merged 2 commits into
releasefrom
fix/app-15742

Conversation

@subrata71

@subrata71 subrata71 commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Linear: https://linear.app/appsmith/issue/APP-15742

Why

docker scout cves --only-fixed on the shipped release image reports 176 fixable vulnerabilities. This is the CE-owned share of the base image fixes — the regions of deploy/docker/base.dockerfile that CE and EE hold in common.

Follows the same ownership split as #41873 (golang bump for the mongo-tools builder), #41808 (Caddy/xcaddy) and #41850 (mongo-tools from source).

What changed

Change Effect
Purge software-properties-common after add-apt-repository clears 12 findings (7 high)
mongo-tools Go toolchain 1.26.41.26.5 clears the stdlib findings
x/net pin 0.55.00.56.0 (Caddy + mongo-tools) clears CVE-2026-46600
New x/text0.39.0 pin (Caddy + mongo-tools) clears CVE-2026-56852

Why software-properties-common can go

It exists solely for the add-apt-repository -y ppa:git-core/ppa call, but drags in python3-launchpadlib and with it python3-cryptography, python3-jwt and python3-httplib2. The PPA's sources entry and signing key persist independently of the tool that wrote them, so purging after registration is safe.

Verified by building the dependency-package block in isolation:

  • python3-cryptography, python3-jwt, python3-httplib2, python3-launchpadlib, software-properties-common — all removed, no .dist-info left behind.
  • git 2.54.0 (Ubuntu 24.04 ships 2.43, so the PPA is still active), supervisord 4.2.5, mongod 7.0.39, mongosh 2.9.2, psql 14.23 — all working.
  • /etc/apt/sources.list.d/git-core-ubuntu-ppa-noble.sources still present.

On the Go pins

Verify these with go version -m <binary>, not by grepping for module@version strings — the grep reports the pre-replace version and makes a working pin look inert. Confirmed on the built binaries:

caddy      dep golang.org/x/text v0.38.0 => v0.39.0
mongodump  dep golang.org/x/text v0.39.0

Scope

EE-only parts of this file — the Keycloak upgrade and the Temporal builder — are handled separately in appsmith-ee#9404, matching the existing split (#9060 for Keycloak, #9155 / #9052 for Temporal). Nothing in this PR touches a region that does not exist in EE, so it should sync cleanly.

A full base-image rebuild and rescan was done on the EE side with both halves applied: 123 → 52 findings (−58%), high 42 → 20.

Summary by CodeRabbit

  • Chores
    • Updated build tooling and platform components to newer versions for improved compatibility and maintenance.
    • Refined MongoDB tooling builds with more consistent dependency versions.
    • Reduced unnecessary packages from runtime images after setup, helping keep deployments leaner.

CE share of a docker scout sweep of the shipped image.

- Purge software-properties-common once add-apt-repository has registered
  the git-core PPA. It pulls in python3-launchpadlib, which drags
  python3-cryptography, python3-jwt and python3-httplib2 into the runtime
  image for 12 findings. The PPA source and its key outlive the tool.
- mongo-tools Go toolchain 1.26.4 -> 1.26.5, clearing the stdlib findings.
- Bump the x/net pin to 0.56.0 for Caddy and mongo-tools.

Verified by building the dependency-package block in isolation: the three
python packages and software-properties-common are gone, while git (2.54.0,
still from the PPA), supervisord, mongod, mongosh and psql all work.

The comment about x/text records a verified negative: a --replace only binds
for a module Caddy actually requires, so pinning x/text there is a silent
no-op. Documented rather than left as a trap for the next person.
…builder

Mirrors the EE correction. The Caddy x/text --replace was previously removed on
the mistaken belief it was a no-op; `go version -m` on the built binary shows it
binds correctly (dep v0.38.0 => v0.39.0). Grepping a Go binary for
module@version reports the pre-replace version, which is what produced the wrong
call.

Also adds the pin to the mongo-tools builder, whose shipped binaries carry an
unreplaced x/text v0.38.0 — the version CVE-2026-56852 is flagged against.
@linear-code

linear-code Bot commented Jul 31, 2026

Copy link
Copy Markdown

APP-15742

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 325aa5ae-08c8-42fc-8a0e-a18d0078427e

📥 Commits

Reviewing files that changed from the base of the PR and between da2e280 and 2b12c6c.

📒 Files selected for processing (1)
  • deploy/docker/base.dockerfile

Walkthrough

Changes

Docker image updates

Layer / File(s) Summary
Builder dependency pins
deploy/docker/base.dockerfile
Caddy and MongoDB builders use updated Go versions and pinned golang.org/x/text, golang.org/x/net, and golang.org/x/crypto dependencies.
Repository package cleanup
deploy/docker/base.dockerfile
The image purges software-properties-common and removes unused dependencies after PPA setup.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

  • appsmithorg/appsmith-ee#9402 — Both changes update deploy/docker/base.dockerfile to address image vulnerabilities and remove software-properties-common.

Possibly related PRs

Suggested reviewers: wyattwalter, sebastianiv21

Poem

Pins align in Docker’s frame,
Go and modules change their name.
PPA tools complete their role,
Then leave the image clean and whole.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the security-focused base image CVE remediation described in the changes.
Description check ✅ Passed The description provides clear motivation, issue context, changes, validation results, and scope, but omits several template sections.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/app-15742

Comment @coderabbitai help to get the list of available commands.

@subrata71
subrata71 marked this pull request as ready for review July 31, 2026 18:36
@subrata71
subrata71 requested a review from a team as a code owner July 31, 2026 18:36

@salevine salevine left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved

@github-actions

Copy link
Copy Markdown

This PR has not seen activitiy for a while. It will be closed in 7 days unless further activity is detected.

@github-actions github-actions Bot added the Stale label Aug 11, 2026
@subrata71 subrata71 removed the Stale label Aug 12, 2026
@subrata71 subrata71 self-assigned this Aug 12, 2026
@subrata71
subrata71 merged commit b4bd635 into release Aug 12, 2026
21 of 22 checks passed
@subrata71
subrata71 deleted the fix/app-15742 branch August 12, 2026 11:32
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