Skip to content

Add openssl upgrade for security patch#22

Merged
MaryamZi merged 2 commits into
wso2:mainfrom
RadCod3:fix/docker-workflow
Apr 10, 2026
Merged

Add openssl upgrade for security patch#22
MaryamZi merged 2 commits into
wso2:mainfrom
RadCod3:fix/docker-workflow

Conversation

@RadCod3

@RadCod3 RadCod3 commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

Purpose

$subject
Temp fix till python base image fixes the vulnerabilities reported in the trivy scan.

Summary by CodeRabbit

  • Chores
    • Upgraded runtime image OS libraries (including OpenSSL-related packages) to newer versions.
    • No changes to runtime behavior, entrypoint, or dependency installation; only underlying system libraries updated.

@RadCod3 RadCod3 requested a review from MaryamZi as a code owner April 10, 2026 11:56
@coderabbitai

coderabbitai Bot commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f9f82b31-81ef-465d-bbd5-f62baf9f49d7

📥 Commits

Reviewing files that changed from the base of the PR and between 93ccb5b and 485a8d3.

📒 Files selected for processing (1)
  • python-interpreter/Dockerfile
✅ Files skipped from review due to trivial changes (1)
  • python-interpreter/Dockerfile

Walkthrough

Added an Alpine package upgrade step (apk upgrade --no-cache libcrypto3 libssl3) in the python-interpreter/Dockerfile final image stage (after FROM python:3.13-alpine). No changes to builder stage, dependency installation, build caching, or runtime entrypoint/command.

Changes

Cohort / File(s) Summary
Security Patch
python-interpreter/Dockerfile
Added an OS-level apk upgrade --no-cache libcrypto3 libssl3 step in the final Docker image stage to update OpenSSL-related libraries.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A tiny upgrade hopped on board,
libcrypto and libssl restored.
Layers patched with careful art,
Secure and snug — a rabbit's heart! 🥕🔒

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete. While it provides a Purpose section, it omits most required template sections (Goals, Approach, User stories, Release note, Documentation, etc.), making it largely incomplete. Expand the description to include critical sections: Goals, Approach, Release note, Documentation, and other applicable template sections to provide complete context.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding an OpenSSL/security package upgrade to the Dockerfile for security patching.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@MaryamZi MaryamZi requested a review from Copilot April 10, 2026 11:58

@coderabbitai coderabbitai Bot 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.

♻️ Duplicate comments (1)
python-interpreter/Dockerfile (1)

38-39: ⚠️ Potential issue | 🔴 Critical

Fix the apk command syntax (same issue as builder stage).

The --no-cache flag positioning is incorrect here as well.

🔧 Proposed fix
 # Patch CVE-2026-28390
-RUN apk upgrade --no-cache libcrypto3 libssl3
+RUN apk --no-cache upgrade libcrypto3 libssl3
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@python-interpreter/Dockerfile` around lines 38 - 39, The apk command in the
CVE patch RUN step uses the flag after the subcommand; change it to place
--no-cache immediately after apk (i.e., use apk --no-cache upgrade ...) so the
no-cache option is applied correctly; update the RUN line under the "# Patch
CVE-2026-28390" comment that currently starts with "RUN apk upgrade --no-cache
libcrypto3 libssl3" to mirror the builder-stage fix.
🧹 Nitpick comments (1)
python-interpreter/Dockerfile (1)

4-5: Consider whether the builder stage needs the OpenSSL upgrade.

Since the builder stage is only used to install Python dependencies and is discarded in the final image, the OpenSSL vulnerability may not be exploitable during the build process. If the build doesn't execute code that uses OpenSSL (e.g., HTTPS requests, cryptographic operations), this upgrade might be unnecessary in the builder stage.

However, if the build process does involve network operations or cryptographic tasks, keeping the upgrade is prudent.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@python-interpreter/Dockerfile` around lines 4 - 5, The Dockerfile currently
runs "RUN apk upgrade --no-cache libcrypto3 libssl3" in the builder stage;
decide whether the builder actually performs network/crypto operations during
dependency installation—if not, remove that RUN from the builder and move it
into the final image stage (or only run it in the final stage) so the upgrade
applies to the runtime image, otherwise keep it in the builder; update the
Dockerfile to ensure the upgrade is performed in the final stage (or both) by
relocating or duplicating the "apk upgrade --no-cache libcrypto3 libssl3"
command accordingly and documenting why it remains in the builder if you choose
to keep it.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@python-interpreter/Dockerfile`:
- Around line 38-39: The apk command in the CVE patch RUN step uses the flag
after the subcommand; change it to place --no-cache immediately after apk (i.e.,
use apk --no-cache upgrade ...) so the no-cache option is applied correctly;
update the RUN line under the "# Patch CVE-2026-28390" comment that currently
starts with "RUN apk upgrade --no-cache libcrypto3 libssl3" to mirror the
builder-stage fix.

---

Nitpick comments:
In `@python-interpreter/Dockerfile`:
- Around line 4-5: The Dockerfile currently runs "RUN apk upgrade --no-cache
libcrypto3 libssl3" in the builder stage; decide whether the builder actually
performs network/crypto operations during dependency installation—if not, remove
that RUN from the builder and move it into the final image stage (or only run it
in the final stage) so the upgrade applies to the runtime image, otherwise keep
it in the builder; update the Dockerfile to ensure the upgrade is performed in
the final stage (or both) by relocating or duplicating the "apk upgrade
--no-cache libcrypto3 libssl3" command accordingly and documenting why it
remains in the builder if you choose to keep it.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 39ed6934-8e9e-4c30-bca5-dda3a80c8878

📥 Commits

Reviewing files that changed from the base of the PR and between df02220 and 93ccb5b.

📒 Files selected for processing (1)
  • python-interpreter/Dockerfile

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the python-interpreter container build to mitigate reported OpenSSL-related vulnerabilities by upgrading Alpine SSL libraries during image build, as a temporary measure until the upstream Python base image resolves the findings.

Changes:

  • Upgrade libcrypto3 and libssl3 in the builder stage.
  • Upgrade libcrypto3 and libssl3 in the final runtime stage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread python-interpreter/Dockerfile Outdated
Comment on lines +38 to +39
# Patch CVE-2026-28390
RUN apk upgrade --no-cache libcrypto3 libssl3

Copilot AI Apr 10, 2026

Copy link

Choose a reason for hiding this comment

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

The inline comment references a specific CVE, but the Dockerfile doesn’t document which fixed package versions are required; as repos change, this can become stale/misleading. Consider making the comment more general (e.g., “Upgrade OpenSSL libs for security fixes”) or include the tracking link/version expectation that justifies these packages.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in 485a8d3

Comment thread python-interpreter/Dockerfile Outdated
Comment on lines +4 to +6
# Patch CVE-2026-28390
RUN apk upgrade --no-cache libcrypto3 libssl3

Copilot AI Apr 10, 2026

Copy link

Choose a reason for hiding this comment

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

The builder stage isn’t included in the final image of a multi-stage build, so upgrading libcrypto/libssl here won’t affect the runtime contents of the produced image. Consider removing this from the builder stage (or add a brief note explaining why the builder stage itself must be patched) to avoid extra build time and maintenance.

Suggested change
# Patch CVE-2026-28390
RUN apk upgrade --no-cache libcrypto3 libssl3

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in 485a8d3

@MaryamZi MaryamZi requested a review from Copilot April 10, 2026 12:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MaryamZi MaryamZi merged commit 8e2db0d into wso2:main Apr 10, 2026
7 checks passed
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