Skip to content

[MINOR UPDATE]: Potential fix for code scanning alert no. 41: Use of a cryptographic algorithm with insufficient key size - #3089

Merged
cgivre merged 1 commit into
masterfrom
alert-autofix-41
Oct 5, 2026
Merged

cgivre merged 1 commit into
masterfrom
alert-autofix-41

Conversation

@cgivre

@cgivre cgivre commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Potential fix for https://github.com/apache/drill/security/code-scanning/41

The correct fix is to increase the RSA key size used during key-pair generation from 1024 to 2048 bits (or higher). This preserves existing behavior (auto-generating a self-signed certificate for the web server) while making the generated key compliant with current minimum recommendations.

In exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/ssl/SslContextFactoryConfigurator.java, update the useAutoGeneratedSelfSignedCertificate(...) method at the key generation block:

  • Keep algorithm as RSA.
  • Replace keyPairGenerator.initialize(1024, random); with keyPairGenerator.initialize(2048, random);.

No additional imports, methods, or dependencies are required.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…algorithm with insufficient key size

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@cgivre cgivre changed the title Potential fix for code scanning alert no. 41: Use of a cryptographic algorithm with insufficient key size [MINOR UPDATE]: Potential fix for code scanning alert no. 41: Use of a cryptographic algorithm with insufficient key size Oct 2, 2026
@cgivre cgivre self-assigned this Oct 2, 2026
@cgivre
cgivre requested a review from pjfanning October 2, 2026 19:02
@cgivre
cgivre marked this pull request as ready for review October 2, 2026 19:03

@pjfanning pjfanning left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@cgivre
cgivre merged commit 6d8cec0 into master Oct 5, 2026
11 checks passed
@cgivre
cgivre deleted the alert-autofix-41 branch October 5, 2026 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants