-
Notifications
You must be signed in to change notification settings - Fork 19
GH-699: hash/digest verification of URL dependencies #701
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b6ea61d
to
eb31875
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #701 +/- ##
==========================================
- Coverage 91.91% 91.51% -0.39%
==========================================
Files 56 58 +2
Lines 1667 1755 +88
Branches 105 115 +10
==========================================
+ Hits 1532 1606 +74
- Misses 99 111 +12
- Partials 36 38 +2
🚀 New features to boost your workflow:
|
c61f699
to
44748cc
Compare
44748cc
to
4212a5b
Compare
Rest of the test cases for the class are a WIP that I will continue when I next have some time.
c475307
to
bdfc465
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change introduces a new set of options that can be specified when referencing protoc plugins by URL that allow users to specify the expected digest of the resource to be downloaded. If the downloaded resource does not match the digest, then the plugins are not executed, and the build will fail with an error.
The aim is to allow users to verify that their dependencies have not been tampered with prior to running anything. This is already performed internally by Maven on Maven-based dependencies.
Digests will be able to be specified in the format
md5:09f7e02f1290be211da707a266f153b3
,sha256:66a045b452102c59d840ec097d59d9467e13a3f34f6494e539ffd32c1bb35f18
, etc for any supported JVMMessageDigest
(this is usually a small set including MD5, SHA-1, SHA-256, and SHA-512).Users should consult the documentation for their Java version to see which MessageDigest format are supported for their platform.
Users may in theory be able to extend this by adding bouncy castle to the classpath, although this will not be tested nor verified in this PR.
TODO list
*.utils.Digests
, and replace with this newDigest
classCloses GH-699.