Commit Graph

16 Commits

Author SHA1 Message Date
Christoph Atteneder
b1a53531ad
Update dependency verification for changes in pricenode 2022-06-09 09:41:33 +02:00
Daniel Bast
064c7590a8
Update gradle wrapper to 7.3.3
Done via `./gradlew wrapper --gradle-version 7.3.3 --distribution-type all`

From the release description:

This is a patch release for Gradle 7.3.

It fixes the following issues:

* #19360 Upgrade checks to Log4j 2.17.0

We recommend users upgrade to 7.3.3 instead of 7.3.

See also https://github.com/gradle/gradle/releases/tag/v7.3.3
2021-12-25 13:03:14 +01:00
Chris Beams
07a139c927
Upgrade log4j 2.15.0 => 2.17.0
This change upgrades log4j to patch fixes for recently documented
CVE-2021-45046 CVE-2021-45105 vulnerabilities related to the Log4Shell
exploit.

Like the earlier fix, Bisq does not appear to be vulnerable to these
exploits because it does not use log4j directly, only transitively
depends on it. Nevertheless, the upgrade is still the safe bet.
2021-12-20 07:34:04 +01:00
Chris Beams
55becc59c0
Avoid Log4J "Log4Shell" exploit
This commit upgrades our transitive dependency on Log4J 2 from 2.14.1 to
the newly-released 2.15.0 to avoid the CVE described at
https://www.lunasec.io/docs/blog/log4j-zero-day/.

We do not use log4j directly anywhere in our codebase, so our exposure
to this exploit was already mitigated if not eliminated, but Spring Boot
depends on Log4J 2 internally. This commit upgrades Spring Boot's
underlying dependency on Log4J to 2.15.0 in the manner recommended at
https://github.com/spring-projects/spring-boot/issues/28958.
2021-12-10 10:40:36 +01:00
Chris Beams
31c6e16e63
Use Spring dependency-management plugin in pricenode
This is in preparation for addressing log4j 2 zero day exploit described
at https://www.lunasec.io/docs/blog/log4j-zero-day/. See full details
in the next commit.

Bringing in the dependency-management plugin results in many changes to
our Gradle verification metadata file, but all are BOM / POM / Module
manifests. No additional jar or code dependencies have been whitelisted
with this change.
2021-12-10 10:34:09 +01:00
Chris Beams
42b00b3a3e
Fix guava dependency issue
Problem: a

    NoSuchMethodError: 'java.util.stream.Collector
    com.google.common.collect.ImmutableMultiset.toImmutableMultiset()'

exception was being thrown when testing the previously-merged upgrade to
Gradle 7.3, as described at keybase://chat/bisq#testing/2466.

Solution: This problem is similar to the issue reported at
jeremylong/DependencyCheck#3221. The source of the problem was multiple
conflicting guava jars on the runtime classpath. This commit upgrades to
guava 30.1.1-jre which ensures a single jar on the classpath.
2021-11-21 17:06:10 +01:00
Chris Beams
ea629de1a1
Add missing metadata for jackson-base pom 2.12.1
Problem: When merging #5824, the absence of this entry caused a build
failure at dependency verification time against JDK11 and JDK15 on
Ubuntu-latest [1]. It may also cause failures on other JDK/OS
combinations, but the GitHub workflow was aborted before those failures
couldhave occurred. In any case, this omission did not create build
failures on any of the local development machines that tested the
aforementioned PR. Reasons for this discrepancy are unknown.

Solution: manually fetch the pom from [2], run `sha256sum` on it locally
and commit the result to the verification metadata file.

[1]: https://github.com/bisq-network/bisq/runs/4249640611?check_suite_focus=true#step:6:33
[2]: https://repo1.maven.org/maven2/com/fasterxml/jackson/jackson-base/2.11.1/jackson-base-2.11.1.pom
2021-11-18 12:38:01 +01:00
Christoph Atteneder
0ea056c6d2
Add Windows artifact hashes 2021-11-15 13:26:05 +01:00
Chris Beams
d964ded2af
Add missing verification metadata
These entries showed up as missing when @jmacxx ran this PR branch on
his local Linux machine under JDK 11. It is not clear why these
dependencies were required there and not elsewhere, e.g. under CI or on
my own Mac.
2021-11-13 15:28:43 +01:00
Chris Beams
5e93cfea47
Add missing dependency verification entries
This fixes the CI build failure at
https://github.com/bisq-network/bisq/runs/4198811212?check_suite_focus=true#step:6:306
by adding missing entries for findbugs, jsr305 and various netty
artifacts. It is not clear why these artifacts were required under linux
and not under MacOS.
2021-11-13 14:56:49 +01:00
Chris Beams
d7129a2d19
Disable verification for javadoc and source jars
Prior to this commit, IDEA would fail to build the project because it
downloads javadoc and source jars that do not have entries in the
verification file. These artifacts are now trusted by default as
documented at https://docs.gradle.org/current/userguide/dependency_verification.html#sec:skipping-javadocs
2021-11-13 14:43:03 +01:00
Chris Beams
e09d56b696
Upgrade Mockito to 4.0.0
This fixes the 'Unsupported class file major version 60' problem
documented at mockito/mockito#2065 to allow building Bisq on JDK 16+.
2021-11-13 13:53:38 +01:00
Chris Beams
990365d5b9
Upgrade Lombok to support JDK16+
This fixes the IllegalAccessError problem documented at
https://stackoverflow.com/a/66981165/622403
2021-11-13 13:43:00 +01:00
Chris Beams
3557fe9844
Add verification metadata for MacOS x86 artifacts
This commit updates the verification-metadata.xml file to include
osx-x86_64 variants of protoc dependencies.
2021-11-13 13:33:26 +01:00
Chris Beams
695fe39cf7
Add verification metadata for linux-specific artifacts
CI build failed after the previous commit because the new dependency
verification file was generated on a Mac and therefore did not include
linux-specification artifact variants. This same process will need to
be done under Windows as well.
2021-11-13 13:26:03 +01:00
Chris Beams
6f8197b419
Migrate to Gradle's built-in dependency verification
This commit removes the use of our fork of the gradle-witness plugin in
favor of Gradle's relatively new built-in dependency verification
feature [1].

The gradle/verification-metadata.xml file was produced using the
following command:

    ./gradlew --write-verification-metadata sha256 build

Where `build` is the usual `gradle build` command. All dependency
configurations are resolved this way, and written out to the file.

The resulting file contains 273 unique dependency declarations, as
compared to just 64 in our now-removed gradle-witness.gradle file. This
means that the coverage of dependencies verified is much more complete.

The new file contains the same sha256 checksums for each dependency as
the old file. This was manually spot-checked for a significant number of
the dependencies.

Like with gradle-witness, builds will break when dependencies are
upgraded (and now also when they are added). To fix these breakages, the
`--write-verification-metadata sha256` option must be provided to the
build. Note that new entries will be added for upgraded depedencies, but
old entries are not removed automatically from the file. These must be
removed manually.

[1]: https://docs.gradle.org/current/userguide/dependency_verification.html
2021-11-13 12:59:52 +01:00