Merged
Conversation
Creates a symlink from the input to the output only if the input apk is signed by a certificate whose sha256 matches the one provided.
This was referenced Nov 23, 2020
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
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 adds an APK signature verification derivation called
verifyApk.verifyApktakes an input APK file and certificate sha256, and outputs a symlink to that file if and only if the APK signature is valid and the certificate SHA256 digest matches the one provided. The goal is to ensure authenticity of build inputs in addition to integrity, which is already ensured via use of Nix.This is currently just being used for the prebuilt MicroG and Google APKs derived from a Google image. (We build everything else from source.) These are example uses of
verifyApk, and don't provide a ton of additional assurance, in contrast to if we fetched APKs from other (less trustworthy) sources. The Google APKs are currently directly from a Google image, whose SHA256 comes from thedevelopers.google.comwebpage using HTTPS, so they are unlikely to be compromised. Another alternative for the MicroG package would be to check the detached GPG signature provided on the Github releases page. (See also: NixOS/nixpkgs#43233)