Skip to content

Conversation

@officialasishkumar
Copy link
Member

No description provided.

Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Copilot AI review requested due to automatic review settings October 8, 2025 11:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes TLS-related issues in the Flask MySQL setup by removing SSL disabling and adding certificate authority configuration. The changes ensure proper TLS handling between the Flask application and MySQL database.

  • Removed the --ssl=0 command from MySQL container to enable SSL/TLS connections
  • Updated MySQL healthcheck to use root credentials for proper authentication
  • Added CA certificate setup in the Flask application Dockerfile for TLS trust

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
flask_mysql/docker-compose.yml Enables SSL in MySQL and fixes healthcheck authentication
flask_mysql/Dockerfile Adds CA certificate installation and setup for TLS connections

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

# ---- END NEW HEALTHCHECK ----

CMD ["python", "main.py"]
# Install the ca-certificates package to use the system certificates (the below command is for Debian-based systems, you may need to adjust it for other distributions)
Copy link

Copilot AI Oct 8, 2025

Choose a reason for hiding this comment

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

The comment is indented incorrectly with extra spaces and should be aligned with the RUN command below it.

Suggested change
# Install the ca-certificates package to use the system certificates (the below command is for Debian-based systems, you may need to adjust it for other distributions)
# Install the ca-certificates package to use the system certificates (the below command is for Debian-based systems, you may need to adjust it for other distributions)

Copilot uses AI. Check for mistakes.
# Install the ca-certificates package to use the system certificates (the below command is for Debian-based systems, you may need to adjust it for other distributions)
RUN apt-get update && apt-get install -y ca-certificates
# Download the ca.crt file and the setup_ca.sh script
ADD https://raw.githubusercontent.com/keploy/keploy/refs/heads/main/pkg/core/proxy/tls/asset/ca.crt ca.crt
Copy link

Copilot AI Oct 8, 2025

Choose a reason for hiding this comment

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

The ADD command has extra spaces between 'ADD' and the URL. This should be consistent spacing.

Suggested change
ADD https://raw.githubusercontent.com/keploy/keploy/refs/heads/main/pkg/core/proxy/tls/asset/ca.crt ca.crt
ADD https://raw.githubusercontent.com/keploy/keploy/refs/heads/main/pkg/core/proxy/tls/asset/ca.crt ca.crt

Copilot uses AI. Check for mistakes.
RUN apt-get update && apt-get install -y ca-certificates
# Download the ca.crt file and the setup_ca.sh script
ADD https://raw.githubusercontent.com/keploy/keploy/refs/heads/main/pkg/core/proxy/tls/asset/ca.crt ca.crt
ADD https://raw.githubusercontent.com/keploy/keploy/refs/heads/main/pkg/core/proxy/tls/asset/setup_ca.sh setup_ca.sh
Copy link

Copilot AI Oct 8, 2025

Choose a reason for hiding this comment

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

Downloading files directly from GitHub's main branch poses security risks as the content can change without notice. Consider pinning to a specific commit hash or tag, or verify file integrity with checksums.

Suggested change
ADD https://raw.githubusercontent.com/keploy/keploy/refs/heads/main/pkg/core/proxy/tls/asset/setup_ca.sh setup_ca.sh
ADD https://raw.githubusercontent.com/keploy/keploy/6e2b2e2/pkg/core/proxy/tls/asset/setup_ca.sh setup_ca.sh

Copilot uses AI. Check for mistakes.

CMD ["python", "main.py"]
# Install the ca-certificates package to use the system certificates (the below command is for Debian-based systems, you may need to adjust it for other distributions)
RUN apt-get update && apt-get install -y ca-certificates
Copy link

Copilot AI Oct 8, 2025

Choose a reason for hiding this comment

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

The apt cache should be cleaned after package installation to reduce image size. Consider adding && rm -rf /var/lib/apt/lists/* to the end of this RUN command.

Suggested change
RUN apt-get update && apt-get install -y ca-certificates
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*

Copilot uses AI. Check for mistakes.
@officialasishkumar officialasishkumar merged commit 0b318c4 into main Oct 8, 2025
1 check 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