Skip to content
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

Checking java download against a checksum for security #45

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

Conversation

SafPlusPlus
Copy link

Since Oracle's JRE is being downloaded over HTTP, but not checked against a secure checksum, I considered this a bit of a security issue. I added a variable for a sha256 checksum and checked against this after the download in the OSS and Pro dockerfiles.

Oracle supplies these checksums officially for this version at https://www.oracle.com/webfolder/s/digest/8u102checksum.html

Subsequent updates of the JRE version in these dockerfiles should update the checksum accordingly.

Feel free to give me feedback if the change should need more work. :)

Copy link
Member

@dbradicich dbradicich left a comment

Choose a reason for hiding this comment

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

+1 seems a good improvement to me, thanks

@@ -25,19 +25,21 @@ ENV JAVA_HOME /opt/java
ENV JAVA_VERSION_MAJOR 8
ENV JAVA_VERSION_MINOR 102
ENV JAVA_VERSION_BUILD 14

ENV JAVA_CHECKSUM="50bc7ff61ba064c471adc2ec08e44690f0dac4cd673a3666b6d7b24a48bd7169"
Copy link
Member

Choose a reason for hiding this comment

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

might be worth adding a note here (in both files) linking to https://www.oracle.com/webfolder/s/digest/8u102checksum.html to show where this came from, and that its actually a legit value

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