Code Monkey home page Code Monkey logo

gradle-witness's People

Contributors

friederbluemle avatar moxie0 avatar str4d avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gradle-witness's Issues

Verify pgp signature with "certificate-pinning"

Is it possible to implement a verification system that garantees that the pgp-signatures (*.asc files) are still correct and that the pgp-signer is still the same?

The current implementation of gradle-witness verifies that the checksum of the lib is correct.

As a developer every time i whish to use a new lib version i have to update the checksum, too.

With the pinned-pgp-signer verification i can declare trust in the signer. there is no need to update the signature in the gralde file when there are version updates. update is only neccessary if the pgp-signer changes

improve calculateChecksums

When running gradle tasks --all it would be nice to see calculateChecksums under the "Verification Tasks" group and with a description.

Right now it is listed under "Other tasks" with no description:

...
Other tasks
-----------
calculateChecksums
...

No dependency for integrity assertion found: com.android.databinding:library

With databinding enabled in Android project build.gradle, gradle-witness

data binding enabled via:

dataBinding {
    enabled = true
}

output is:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':vlc-android'.
> Failed to notify project evaluation listener.
   > No dependency for integrity assertion found: com.android.databinding:library
   > Cannot change dependencies of configuration ':vlc-android:compile' after it has been resolved.

SHA256 hashes dont match cli tools

This is a really nice idea here!
However, it seems that the sha256 calculation performed by the plugin is different than want I'm getting from OSX's shasum tool

➜  Signal-Android git:(feature/share_location) ✗ find . -name "*.jar" | grep gcm
./build/intermediates/exploded-aar/com.google.android.gms/play-services-gcm/8.1.0/jars/classes.jar
➜  Signal-Android git:(feature/share_location) ✗ shasum -a 256 ./build/intermediates/exploded-aar/com.google.android.gms/play-services-gcm/8.1.0/jars/classes.jar
ef311fb0a50b9cb5db171f914fa7d714292173bb8d789fa46686191ce47aadb6  ./build/intermediates/exploded-aar/com.google.android.gms/play-services-gcm/8.1.0/jars/classes.jar
➜  Signal-Android git:(feature/share_location) ✗ gradle -q calculateChecksums | grep gcm
Verifying com.google.android.gms:play-services-gcm
        'com.google.android.gms:play-services-gcm:757ecd2c837ac81c98f4cc7dc783e7454c6d0506f6cc66b10417126b675248c9',

extend to gradle plugins

Since the whole gradle build process for Android relies on downloading plugins from jcenter, we really need a way to do what gradle-witness does, but for those plugins. @dschuermann already made it possible to have the gradle wrapper verify the sha256 of gradle binaries it downloads: gradle/gradle#448 The missing piece remains gradle plugins.

This is probably the most essential bit to verify:

        classpath 'com.android.tools.build:gradle:1.2.3'

signed tag for a release

I'd like to package this and include it in Debian. It would be best if there was an official "release" for gradle-witness that can then be packaged. That's trivial to do with github.com: just make a signed tag that marks the version, and push it to this repo. The Debian packaging can then get the source tarball from github directly.

Ability to exclude own libs

With a project organized with several modules, I don't want to verify my own dependencies.
gradle-witness doesn't allow this.

./gradlew -q calculateChecksums fails on checksum I want it to calculate

When building Signal-Android, I'm getting signature verification failures, but when I try to recalculate the checksum, it fails on that same signature:

./gradlew -q calculateChecksums
signing.properties not found
Verifying me.leolin:ShortcutBadger
Verifying se.emilsjolander:stickylistheaders
Verifying com.google.android.gms:play-services-gcm
Verifying com.google.android.gms:play-services-maps
Verifying com.google.android.gms:play-services-location
Verifying com.jpardogo.materialtabstrip:library
Verifying org.w3c:smil
Verifying org.apache.httpcomponents:httpclient-android
Verifying com.github.chrisbanes.photoview:library
Verifying com.github.bumptech.glide:glide
Verifying com.makeramen:roundedimageview
Verifying com.pnikosis:materialish-progress
Verifying de.greenrobot:eventbus
Verifying pl.tajchert:waitingdots
Verifying com.soundcloud.android:android-crop
Verifying com.android.support:appcompat-v7

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'Signal-Android'.
> Checksum failed for com.android.support:appcompat-v7:4b5ccba8c4557ef04f99aa0a80f8aa7d50f05f926a709010a54afd5c878d3618

Warning when using gradle 4.0.2

When applying the witness plugin I get this warning output:

Configure project :
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.

Please add a license

We'd love to use gradle-witness in Apache Aurora, but will need clarity on the license first. Obviously for us, an Apache License 2.0 compatible license would be ideal :-)

Support gradle's "Implementation"

Gradle-witness only supports libraries added with "compile", but not "implementation".

WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation'.
It will be removed at the end of 2018

Transient dependencies are not verified.

Correct me if I'm wrong, but I don't think the pom/transient dependencies are verified. A malicious repo could edit a pom, add a new transient dependency without triggering a verification failure. The newly created dependency will not exist in the dependencyVerification block and therefore not be checked.

The pom (or some transient dependency list) would need to also be verified, not just the jar files.

Use Blockchain technology (e.g. Namecoin) to solve "trusting on first use" problem.

I've been thinking about using Blockchain-based technology -- I'm looking at using Namecoin for a proof-of-concept implementation, but open to other ideas -- to solve the "trusting on first use" problem.

Access to a Namecoin blockchain (either locally or via a trusted server) would allow the Gradle Witness plugin to check PGP signatures on JARs without trusting the files on a central repository.

I've drafted a topic paper, "Blockchain-based Trust for Software Components" for the Rebooting the Web of Trust conference and am thinking about using the Gradle Witness Plugin as a starting point for a proof-of-concept implementation.

Any feedback or assistance would be greatly appreciated. If there's interest the end result could be a pull-request to the Gradle Witness Plugin.

Witness incorrectly resolves dependency when older version is specified

Witness currently resolves the dependency file with the following code:

ResolvedArtifact dependency = project.configurations.compile.resolvedConfiguration.resolvedArtifacts.find{
     return it.name.equals(name) && it.moduleVersion.id.group.equals(group)
}

Because this only checks the group and name, and not version, this resolves the most recent version of that dependency in the cache. If you have more than one version in your cache and you are not using the newest one, you may be getting false negatives, because the plugin is not checking the file you are using.

This can also cause false positives if you calculate & record your checksum before adding a newer version of the dependency to your cache because Witness will compare the hash of the most recent version to the hash you recorded from the older version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.