Skip to content

[Snyk] Security upgrade python from 3.11-slim to 3.14.0rc1-slim #6286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rubenfiszel
Copy link
Contributor

@rubenfiszel rubenfiszel commented Jul 28, 2025

snyk-top-banner

Snyk has created this PR to fix 2 vulnerabilities in the dockerfile dependencies of this project.

Keeping your Docker base image up-to-date means you’ll benefit from security fixes in the latest version of your chosen image.

Snyk changed the following file(s):

  • lsp/Dockerfile

We recommend upgrading to python:3.14.0rc1-slim, as this image has only 43 known vulnerabilities. To do this, merge this pull request, then verify your application still works as expected.

Vulnerabilities that will be fixed with an upgrade:

Issue Score
critical severity Integer Overflow or Wraparound
SNYK-DEBIAN12-ZLIB-6008963
  500  
high severity Directory Traversal
SNYK-DEBIAN12-PAM-10378969
  400  
high severity Directory Traversal
SNYK-DEBIAN12-PAM-10378969
  400  
high severity Directory Traversal
SNYK-DEBIAN12-PAM-10378969
  400  
high severity Directory Traversal
SNYK-DEBIAN12-PAM-10378969
  400  

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Directory Traversal


Important

Upgrade Python base image in lsp/Dockerfile to 3.14.0rc1-slim to fix security vulnerabilities.

  • Dockerfile Update:
    • Upgrade base image in lsp/Dockerfile from python:3.11-slim to python:3.14.0rc1-slim to address security vulnerabilities.
    • Fixes vulnerabilities: Integer Overflow in zlib and Directory Traversal in PAM.

This description was created by Ellipsis for 9a94d4d. You can customize this summary. It will automatically update as commits are pushed.

Copy link

cloudflare-workers-and-pages bot commented Jul 28, 2025

Deploying windmill with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9a94d4d
Status: ✅  Deploy successful!
Preview URL: https://0589e9e6.windmill.pages.dev
Branch Preview URL: https://snyk-fix-d433567d105589037ed.windmill.pages.dev

View logs

Copy link
Contributor

claude bot commented Jul 28, 2025

Claude finished @rubenfiszel's task —— View job


Pull Request Review Analysis

Todo List:

  • Read and analyze the changed Dockerfile
  • Assess security benefits and risks of the upgrade
  • Evaluate Python version compatibility implications
  • Review potential performance considerations
  • Provide comprehensive feedback with specific suggestions
  • Include testing/reproduction instructions

Analysis of Changes:
The change is straightforward: upgrading the Python base image from python:3.11-slim to python:3.14.0rc1-slim in lsp/Dockerfile:1. This Dockerfile builds a Language Server Protocol (LSP) service that provides multi-language support including Python (via Pyright), TypeScript/JavaScript (Deno), Go (gopls), and diagnostic services.

Security Assessment

✅ Benefits:

  • Fixes 2 vulnerabilities with scores 500 (Integer Overflow in zlib) and 400 (Directory Traversal in PAM)
  • Reduces total known vulnerabilities from an unspecified number to 43
  • Updates underlying system packages in the base image

⚠️ Risks & Concerns:

  • Release Candidate Usage: Python 3.14.0rc1 is a release candidate, not a stable release. This introduces inherent stability risks for production use
  • Breaking Changes: Python 3.14 may have backward compatibility issues with existing dependencies
  • Limited Testing: RC versions have less community testing and may contain undiscovered bugs

Compatibility Assessment

Python Dependencies Analysis:
The LSP service uses many popular Python packages (45+ packages in Pipfile) including:

  • Data Science: pandas, numpy, matplotlib, seaborn, polars
  • Database: psycopg2-binary, pymongo, sqlalchemy
  • Cloud: boto3, awscli, google-api-python-client
  • Web: requests, urllib3, tornado
  • Windmill-specific: wmill, wmill_pg

Compatibility Concerns:

  • Some packages may not have tested compatibility with Python 3.14 RC
  • Binary extensions (psycopg2-binary, numpy) may have compatibility issues
  • The major version jump (3.11 → 3.14) introduces potential syntax and API changes

Performance Considerations

Potential Benefits:

  • Python 3.14 includes performance improvements and optimizations
  • Newer interpreter may provide faster execution for compute-intensive LSP operations
  • Updated system libraries could improve overall container performance

Potential Risks:

  • RC versions may have unoptimized code paths
  • Compatibility shims for older code could impact performance
  • Memory usage patterns may differ, affecting container resource requirements

Code Quality & Best Practices

Current Implementation Quality:

  • Dockerfile follows multi-stage build pattern appropriately
  • Uses slim base images to minimize attack surface
  • Proper dependency management with pipenv
  • Good separation of concerns with different language servers

Areas for Improvement:

  1. Pin Exact Versions: Consider pinning exact package versions in Pipfile for reproducible builds
  2. Health Checks: Add container health checks for better monitoring
  3. Non-root User: Consider running processes as non-root user for additional security

Specific Recommendations

🚨 HIGH PRIORITY - Consider Alternative Approach:
Instead of upgrading to Python 3.14 RC, consider:

  1. Python 3.13 Stable: Use python:3.13-slim which provides security updates without RC risks
  2. LTS Version: Stick with python:3.12-slim (LTS) and address vulnerabilities through system package updates
  3. Staged Rollout: Test this change in development/staging environments extensively before production

If Proceeding with 3.14 RC:

  1. Add comprehensive integration tests
  2. Monitor for dependency installation failures during build
  3. Have rollback plan ready
  4. Consider timeline - Python 3.14 final release is expected soon

Testing Instructions

To verify the LSP service functionality with this change:

Container Testing:
Build and run the updated LSP container locally, then test each language server endpoint by connecting to the Windmill development environment and verifying that code completion, error detection, and syntax highlighting work correctly for Python scripts in the script editor. Access the script editor, create new Python scripts using various packages from the Pipfile (pandas, numpy, requests, boto3), and confirm that Pyright provides proper IntelliSense, error reporting, and type checking. Also test Go and TypeScript/JavaScript LSP functionality to ensure the multi-language setup remains functional. The service should respond properly on all websocket endpoints (/ws/pyright, /ws/diagnostic, /ws/ruff, /ws/deno, /ws/go) and the health check endpoint should return "ok".

Final Recommendation

⚠️ RECOMMEND CAUTION: While this change addresses legitimate security vulnerabilities, using a Python release candidate in production introduces significant stability risks. Consider using Python 3.13 stable instead, or wait for Python 3.14 final release before proceeding.


Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 9a94d4d in 32 seconds. Click for details.
  • Reviewed 10 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. lsp/Dockerfile:1
  • Draft comment:
    The base image is now using Python 3.14.0rc1-slim, which is a release candidate. Ensure that this version is fully compatible with your project before deploying to production, or consider using a stable release.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 30% <= threshold 50% The comment is about a dependency change, specifically the base image version. It advises caution about using a release candidate version, which is a valid concern. However, it asks the author to ensure compatibility, which violates the rule against asking for confirmation or verification. The comment could be rephrased to suggest using a stable release instead.

Workflow ID: wflow_gksSxKczo9PmlyUB

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@rubenfiszel rubenfiszel force-pushed the main branch 3 times, most recently from d745b80 to 42e06e7 Compare August 7, 2025 18:27
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.

2 participants