Skip to content

Conversation

@Godin
Copy link
Member

@Godin Godin commented Feb 2, 2018

Fixes #641

@Godin Godin self-assigned this Feb 2, 2018
@Godin Godin added this to the 0.8.1 milestone Feb 2, 2018
@Godin Godin requested a review from marchof February 2, 2018 21:05
</prerequisites>

<dependencyManagement>
<dependencies>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Godin Should we leave a comment here, why this redundant/explicit dependency has been added?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marchof dependencyManagement is to explicitly declare version of transitive dependency, so strictly speaking can't say that it is redundant, and some even advice to fully control transivite dependencies and always explicitly declare their versions. And seems that commons-collections uses semantic versioning, so update from 3.2 to 3.2.2 (on its own) seems like a good idea to grab bug-fixes. Commit message and so git blame will anyway be linked with this PR and hence with initial ticket. But also can add link to a ticket as a comment, or you was thinking about some other comment?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Godin Someone looking at it might ask: why do we care about this version? I was thinking about a in-line comment like:

Avoid transitive dependency on version with security issue CVE-2015-7450

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marchof I still don't believe that serialization can be involved during execution of plugin, and so don't believe that security issue can be exploited here, also because

--- jacoco-maven-plugin.test/pom.xml
+++ jacoco-maven-plugin.test/pom.xml
@@ -31 +31 @@
-    <jacoco.includes>org.jacoco.maven.*</jacoco.includes>
+    <jacoco.includes>*</jacoco.includes>
$ mvn clean install
$ java -jar /tmp/jacoco-0.8.0/lib/jacococli.jar execinfo jacoco-maven-plugin.test/target/jacoco.exec | grep InvokerTransformer | wc -l
0

insecure org/apache/commons/collections/functors/InvokerTransformer is not touched during execution of our tests that IMO quite exhaustive. And so didn't wanted to scare by comment users that browse sources or follow commits (see for example 6a0c097#commitcomment-26640407) 😉 But ok - can add such message and let you handle user questions about where is immediate release to fix security vulnerability 😆 or maybe add such comment just before release to scare users of old versions 😈

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW latest version of org.apache.maven.reporting:maven-reporting-impl:3.0.0 brings 3.2.1 as transitive dependency, so I'm pretty sure that many Maven plugins do not have 3.2.2.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Godin After this discussion I feel like we should close #641 as ´Other Project´.

  • The only sustainable fix is bumping the dependency in the maven-reporting-impl project.
  • There are many other plugins depending on it, so why adding a hack in JaCoCo?
  • As you wrote the vulnerable part is not used.
  • Builds need excessive local privileges like access to the file system, network etc anyways. So either you trust your build or you run it in a sandboxed environment.

@marchof
Copy link
Member

marchof commented Feb 12, 2018

@Godin What is your preference about this issue?

  1. Merge as is or
  2. do nothing about it in JaCoCo?

After the discussion my personal preference would be 2.

@Godin
Copy link
Member Author

Godin commented Feb 14, 2018

@marchof well, looks like we will need third opinion 😆
While I agree that appearance of transitive dependency of maven-reporting-impl in dependencyManagement looks hacky and potentially might be forgotten in future with bad consequences, and that the best place to spread fix is in maven-reporting-impl, and that builds should be done in a sandboxed environment, and truly believe that there is no vulnerability and so even hard to classify such change, I also can understand that premise of #641 is a wish to simply globally ban dependency to get sandbox, and who knows when maven-reporting-impl will be updated and why not use mechanism to manage dependency. Solution described in #641 about update of dependencies of plugins without their releases can also be considered as error-prone "hacky" dependency management, but not on our side 😉

Maybe as a trade-off can propose to update this PR with comment next to dependency on maven-reporting-impl to not forget its connection with dependencyManagement, but why someone will not check all tree of dependencies during updates without this comment?

Or we can flip a coin to decide - right now Google says that upper side is "heads" 😆 In any case I will love reduction of open tickets and PRs 😉

@marchof
Copy link
Member

marchof commented Feb 14, 2018

@Godin My personal preference is to do nothing here. But I can life with a documented declaration.

👍 for reduction of open tickets

@Godin
Copy link
Member Author

Godin commented Feb 14, 2018

@marchof please check - IMO looks better now

@marchof
Copy link
Member

marchof commented Feb 15, 2018

@Godin Looks better now, except that there is no mention why the "slight update" is done. But good to merge for me -- at least I will probably remember why.

@Godin Godin merged commit c45ecca into master Mar 21, 2018
@Godin Godin deleted the issue-641 branch March 21, 2018 08:58
@jacoco jacoco locked as resolved and limited conversation to collaborators Oct 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants