-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add Gradle dependency verification metadata #116
Conversation
Signed-off-by: Patryk Miś <[email protected]>
Very good! I saw some time ago a news about a supply-chain attack on npm, but I didn't go in depth to understand how it is done and how to protect against it. In this sense, you are being a true security analyst for Speak Touch |
|
Signed-off-by: Patryk Miś <[email protected]>
See <https://docs.gradle.org/current/userguide/dependency_verification.html> Signed-off-by: Patryk Miś <[email protected]>
32c2112
to
bbc3ee2
Compare
Some questions and considerations:
|
Are you using InteliJ or Android Studio? Which version? It can be bug related to https://youtrack.jetbrains.com/issue/IDEA-258328 and have a workarround.
I do that to make sure no task will be skipped and also to not use currently running Gradle deamons.
It just fail if something can't be validated if
Everything can be bypassed, like removing sha-256 hash from I'm considering to make an action for push/pull though, to check independantly if everything is valid before merging pull request. Let me know and I'll do it in separat PR. |
I use Android Studio, Android Studio Hedgehog | 2023.1.1 RC 3.
I understand, but my question is whether the validation will be done by a specific pipeline. I will do a test by sending a commit changing a dependency, and see if the Validate Gradle Wrapper fails |
The Validate Gradle Wrapper did not fail. So, a GitHub action is needed to check this |
Exactly. Validate Gradle Wrapper checks wrapper jar checksum only. |
Why don't we want it to be signed? We can encode the keystore in the GitHub secrets to sign automatically. |
Do you have more trust to GitHub servers than your own machine? |
I will rebase this PR. It seams InteliJ Idea 2023.1 has this issue, and Android Studio version you use is based on this version. Android Studio is the customized fork of InteliJ. |
Well, since I have a separate machine for work, I trust it a lot. I can't say what would be more likely; some failure on GitHub allowing the leakage of the keystore or me inadvertently installing malicious software on my machine. I think either scenario is quite unlikely, I would like a pipeline to generate the APK more for convenience really. |
Signed-off-by: Patryk Miś <[email protected]>
Ok, shall I do it in separate Pr or just here? |
ec6a8d4
to
c41f2a6
Compare
I can use the latest version of IntelliJ while waiting for a new release of Android Studio, but then it's necessary to indicate the reduced compatibility in the README. |
I've just added a workarround. Can you try now? |
If you are talking about github action to generating the APK/AAB, I wasn't suggesting doing it now. We can discuss more about this. But I think a GitHub action to run the dependency check is necessary, it would be annoying to find out that the validation is failing after merging the pull request. We need to ensure that the develop and master branches are always functioning, eliminating human errors. So, I will add this action as a requirement for merging the pull request |
It worked! |
15b2374
to
abe9a2b
Compare
Description
Speak Touch is an accessibility service with access to screen content and user input, emphasizing the need for rigorous security measures. This pull request introduces Gradle dependency verification metadata.
To generate this metadata, the following command should be executed each time a dependency is updated:
Why is this important?
Security First: Given the nature of our accessibility service, which interacts with screen content and user input, prioritizing security is paramount. The inclusion of dependency verification metadata ensures the ongoing integrity and security of the dependencies used in our project.
Protection Against Supply-Chain Attacks: In the event of unauthorized changes to dependencies or potential supply-chain attacks, the verification process serves as an early warning system, fortifying the accessibility service against potential security threats.
This pull request underscores our commitment to security, ensuring a robust and secure environment for the Speak Touch accessibility service.
More reading: Android Security: Securing Your Gradle Builds from Baddies.