-
Notifications
You must be signed in to change notification settings - Fork 207
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
Widely distributed vulnerabilities #312
Comments
It is certainly good to keep test dependencies up-to-date but we don't ship them so I care much less about vulnerabilities there. The focus of vulnerability scanning should be on the published packages in Maven Central. |
That's fair/legit. I would say though that this issue in particular has a lot of vulnerabilities in the examples and similar things that end up being used by customers/developers -- sometimes they even take the examples and push them into production environments. I know that's stupid and not fair, but that's what happens. Also, do you have a list of the code repos that end up pushing packages into Maven Central? I ask because the scanning tool we use (Mend) is focused on source code scanning. Therefore, it will only pick these things up if we point it at the repositories that are used to build those packages. |
Created a PR to address the remaining logback and json issues -- both of which are/were in the examples and such: #315 |
What's the deal with https://github.com/hyperledger/fabric-chaincode-java/blob/main/build.gradle#L54 -- JUnit v4.12 as a |
I would be very happy for somebody to remove that and ensure all unit tests are using JUnit 5 natively. |
@bestbeforetoday -- will you please review #316 and #317. This seems like some low-hanging fruit that we can easily fix. I've got some more PRs coming down the pike. Hopefully you'll just be able to review and merge. Thanks! |
As per #312, and also per https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-5072, the newest version of org.json:json should be used. Signed-off-by: Ben Smith <[email protected]>
I think all of these vulnerabilities have been addressed in the latest release version. |
fabric-chaincode-java
includes jUnit v4.12 directly at https://github.com/hyperledger/fabric-chaincode-java/blob/main/build.gradle#L54. Also referenced here: https://github.com/hyperledger/fabric-chaincode-java/blob/main/fabric-chaincode-integration-test/src/contracts/fabric-ledger-api/build.gradle#L22. And here: https://github.com/hyperledger/fabric-chaincode-java/blob/main/fabric-chaincode-integration-test/src/contracts/bare-gradle/build.gradle. Also,fabric-chaincode-java
refers to system-rules v1.17.0 here: https://github.com/hyperledger/fabric-chaincode-java/blob/main/build.gradle#L52, which refers tojunit-dep
v4.9 as shown in https://mvnrepository.com/artifact/com.github.stefanbirkner/system-rules/1.17.0, andjunit-dep
v4.9 has migrated tojunit
v4.11 as per https://mvnrepository.com/artifact/junit/junit-dep/4.11logback-classic
v1.2.0 importslogback-core
v1.2.0 at https://mvnrepository.com/artifact/ch.qos.logback/logback-classic/1.2.0. Here's the locations:fabric-chaincode-java/examples/fabric-contract-example-maven/pom.xml
Line 18 in 40126d0
fabric-chaincode-java/fabric-chaincode-integration-test/src/contracts/bare-maven/pom.xml
Line 18 in 40126d0
fabric-chaincode-java/fabric-chaincode-integration-test/src/contracts/wrapper-maven/pom.xml
Line 18 in 40126d0
protobuf-java
v3.19.4. The search results can be seen here: https://github.com/search?q=repo%3Ahyperledger%2Ffabric-chaincode-java%20protobuf-java&type=code. Examples includefabric-chaincode-java/fabric-chaincode-integration-test/src/contracts/bare-gradle/build.gradle
Line 26 in 3b5b2cb
fabric-chaincode-java/fabric-chaincode-integration-test/src/contracts/fabric-shim-api/build.gradle
Line 26 in 3b5b2cb
protobuf-java-util
at https://github.com/hyperledger/fabric-chaincode-java/blob/main/fabric-chaincode-shim/build.gradle#L55 has been addressed, but unfortunately, the vulnerability is aboutprotobuf-java
, notprotobuf-java-util
. However, the instances at https://github.com/hyperledger/fabric-chaincode-java/blob/main/fabric-chaincode-integration-test/src/contracts/bare-gradle/build.gradle and https://github.com/hyperledger/fabric-chaincode-java/blob/main/fabric-chaincode-integration-test/src/contracts/fabric-shim-api/build.gradle have hadprotobuf-java
completely removed, which is great work. This appears to be the only instance left in the project. Oddly, Mend scanning is still picking another one up, but I can't find it.fabric-chaincode-shim
: https://github.com/hyperledger/fabric-chaincode-java/blob/main/fabric-chaincode-shim/build.gradle#L55. Also got one in https://github.com/hyperledger/fabric-chaincode-java/blob/main/fabric-chaincode-shim/build.gradle#L44, which pulls infabric-protos
v0.2.0, which includes grpc-protobuf v1.45.1 as per https://mvnrepository.com/artifact/org.hyperledger.fabric/fabric-protos/0.2.0.The text was updated successfully, but these errors were encountered: