You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by David Dillard <dd...@symantec.com> on 2014/09/30 20:44:31 UTC

Maven, Dependencies and Vulnerabilities

Hi,

I've been working on an internal presentation on how letting Maven's dependency mediation feature select versions of transitive dependencies can introduce vulnerabilities into a product and how to deal with that problem.  Unfortunately, it's a very manual process and I was thinking that perhaps changes could be made to Maven that would provide better automation.  To that end I'm wondering if the team has ever considered adding a section to the POM that would list significant changes in that release.  This would include a list of vulnerabilities fixed (e.g. CVE-XXXX-YYYY) or serious bugs fixed.  Each one could include a known set of versions affected (ala how CVEs work today) thus allowing tooling to say: the version of artifact XYZ you're using has a known vulnerability, would you like to upgrade to this new version with that vuln fixed?

On a related note, has a different dependency mediation system ever been considered (as an option), e.g. latest version or latest version on a branch?


Thanks,

David


Re: Maven, Dependencies and Vulnerabilities

Posted by Paul Benedict <pb...@apache.org>.
There is a Maven Changes Plugin which projects can use to list out changes
to their project.
http://maven.apache.org/plugins/maven-changes-plugin/

Regarding CVE, Redhat has a Maven plugin to find "victim" dependencies:
https://securityblog.redhat.com/2013/01/02/detecting-vulnerable-java-dependencies-at-build-time/

Paul


Cheers,
Paul

On Tue, Sep 30, 2014 at 1:44 PM, David Dillard <dd...@symantec.com>
wrote:

> Hi,
>
> I've been working on an internal presentation on how letting Maven's
> dependency mediation feature select versions of transitive dependencies can
> introduce vulnerabilities into a product and how to deal with that
> problem.  Unfortunately, it's a very manual process and I was thinking that
> perhaps changes could be made to Maven that would provide better
> automation.  To that end I'm wondering if the team has ever considered
> adding a section to the POM that would list significant changes in that
> release.  This would include a list of vulnerabilities fixed (e.g.
> CVE-XXXX-YYYY) or serious bugs fixed.  Each one could include a known set
> of versions affected (ala how CVEs work today) thus allowing tooling to
> say: the version of artifact XYZ you're using has a known vulnerability,
> would you like to upgrade to this new version with that vuln fixed?
>
> On a related note, has a different dependency mediation system ever been
> considered (as an option), e.g. latest version or latest version on a
> branch?
>
>
> Thanks,
>
> David
>
>

RE: Maven, Dependencies and Vulnerabilities

Posted by David Dillard <dd...@symantec.com>.
Thanks!  This looks like it covers the most important part of what I'm looking for.


-----Original Message-----
From: Mark Derricutt [mailto:mark@talios.com] 
Sent: Tuesday, September 30, 2014 5:04 PM
To: Maven Users List
Subject: Re: Maven, Dependencies and Vulnerabilities

On 1 Oct 2014, at 7:44, David Dillard wrote:

> Hi,
>
> I've been working on an internal presentation on how letting Maven's 
> dependency mediation feature select versions of transitive 
> dependencies can introduce vulnerabilities into a product and how to 
> deal with that problem.  Unfortunately, it's a very manual process and 
> I was thinking that perhaps changes could be made to Maven that would 
> provide better automation.  To that end I'm wondering if the team has 
> ever considered adding a section to the POM that would list 
> significant changes in that release.  This would include a list of 
> vulnerabilities fixed (e.g. CVE-XXXX-YYYY) or serious bugs fixed.
> Each one could include a known set of versions affected (ala how CVEs 
> work today) thus allowing tooling to say: the version of artifact XYZ 
> you're using has a known vulnerability, would you like to upgrade to 
> this new version with that vuln fixed?

There already exists a plugin covering a lot of this, using the CVE
databases:

   https://github.com/jeremylong/DependencyCheck

This comes with a CLI, Jenkins, Maven, and Ant tasks for checking your dependencies/jars against CVE vulnerabilities.

Does this cover all the things you're working on?  Maybe join forces?


Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven, Dependencies and Vulnerabilities

Posted by Mark Derricutt <ma...@talios.com>.
On 1 Oct 2014, at 7:44, David Dillard wrote:

> Hi,
>
> I've been working on an internal presentation on how letting Maven's 
> dependency mediation feature select versions of transitive 
> dependencies can introduce vulnerabilities into a product and how to 
> deal with that problem.  Unfortunately, it's a very manual process and 
> I was thinking that perhaps changes could be made to Maven that would 
> provide better automation.  To that end I'm wondering if the team has 
> ever considered adding a section to the POM that would list 
> significant changes in that release.  This would include a list of 
> vulnerabilities fixed (e.g. CVE-XXXX-YYYY) or serious bugs fixed.  
> Each one could include a known set of versions affected (ala how CVEs 
> work today) thus allowing tooling to say: the version of artifact XYZ 
> you're using has a known vulnerability, would you like to upgrade to 
> this new version with that vuln fixed?

There already exists a plugin covering a lot of this, using the CVE 
databases:

   https://github.com/jeremylong/DependencyCheck

This comes with a CLI, Jenkins, Maven, and Ant tasks for checking your 
dependencies/jars against CVE vulnerabilities.

Does this cover all the things you're working on?  Maybe join forces?


Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Maven, Dependencies and Vulnerabilities

Posted by David Dillard <dd...@symantec.com>.
A couple of potential problems with that:

1. If an existing CPE doesn't follow whatever convention is decided upon or worse the convention creates a CPE for one project that's already in use by a different project (admittedly that's unlikely)

2. When names change (e.g. the artifact ID) that would likely change the CPE, but you probably don't want the CPE to change otherwise you'll have two (or more CPEs) referring to the same project.




-----Original Message-----
From: Bernd [mailto:ecki@zusammenkunft.net] 
Sent: Monday, October 13, 2014 12:48 PM
To: Maven Users List
Subject: Re: Maven, Dependencies and Vulnerabilities

Hello,

instead of requiring everybody to come up with a CPE and add it to the POM, I would prefer if Maven Central publishes an approved (and registered) naming scheme to form CPEs which point to well known maven artifacts.

cpe:/a:org.maven.central:groupid,artifactid[,classifier]:version
(or similiar, maybe ask the CPE team about it. alternative would be to have a common maven-style repo vendor and include the repoid in the "product")

This would allow incidents and CVEs to unambigously refer to libraries and other artifacts.

The Java eco system is really missing good reports based on open source components. If you are lucky you find an alert based on a product and can guess what underlying open source component was vulnerable. This makes (as you know) the life of a scanner pretty hard.

Gruss
Bernd



2014-09-30 21:53 GMT+02:00 Jeremy Long <je...@gmail.com>:

> There are commercial solutions (sonatype, contrast, blackduck, 
> palamida,
> etc.) and FOSS solutions (dependency-check, victims, retire.js, etc.) 
> to identify and report on known vulnerabilities. I would recommend 
> looking at these solutions (note, I am the main contributed to dependency-check).
>
> A better solution for the POM modification would be to add a CPE 
> identifier. This would also be a great entry for a jar file's 
> manifest. CPE identifiers can be requested even if there are no known 
> CVEs, but the CPE can be used to lookup the related CVEs.
>
> -jeremy
> @ctxt
> On Sep 30, 2014 2:45 PM, "David Dillard" <dd...@symantec.com> wrote:
>
> > Hi,
> >
> > I've been working on an internal presentation on how letting Maven's 
> > dependency mediation feature select versions of transitive 
> > dependencies
> can
> > introduce vulnerabilities into a product and how to deal with that 
> > problem.  Unfortunately, it's a very manual process and I was 
> > thinking
> that
> > perhaps changes could be made to Maven that would provide better 
> > automation.  To that end I'm wondering if the team has ever 
> > considered adding a section to the POM that would list significant 
> > changes in that release.  This would include a list of vulnerabilities fixed (e.g.
> > CVE-XXXX-YYYY) or serious bugs fixed.  Each one could include a 
> > known set of versions affected (ala how CVEs work today) thus 
> > allowing tooling to
> > say: the version of artifact XYZ you're using has a known 
> > vulnerability, would you like to upgrade to this new version with that vuln fixed?
> >
> > On a related note, has a different dependency mediation system ever 
> > been considered (as an option), e.g. latest version or latest 
> > version on a branch?
> >
> >
> > Thanks,
> >
> > David
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org

Re: Maven, Dependencies and Vulnerabilities

Posted by Bernd <ec...@zusammenkunft.net>.
Hello,

instead of requiring everybody to come up with a CPE and add it to the POM,
I would prefer if Maven Central publishes an approved (and registered)
naming scheme to form CPEs which point to well known maven artifacts.

cpe:/a:org.maven.central:groupid,artifactid[,classifier]:version
(or similiar, maybe ask the CPE team about it. alternative would be to have
a common maven-style repo vendor and include the repoid in the "product")

This would allow incidents and CVEs to unambigously refer to libraries and
other artifacts.

The Java eco system is really missing good reports based on open source
components. If you are lucky you find an alert based on a product and can
guess what underlying open source component was vulnerable. This makes (as
you know) the life of a scanner pretty hard.

Gruss
Bernd



2014-09-30 21:53 GMT+02:00 Jeremy Long <je...@gmail.com>:

> There are commercial solutions (sonatype, contrast, blackduck, palamida,
> etc.) and FOSS solutions (dependency-check, victims, retire.js, etc.) to
> identify and report on known vulnerabilities. I would recommend looking at
> these solutions (note, I am the main contributed to dependency-check).
>
> A better solution for the POM modification would be to add a CPE
> identifier. This would also be a great entry for a jar file's manifest. CPE
> identifiers can be requested even if there are no known CVEs, but the CPE
> can be used to lookup the related CVEs.
>
> -jeremy
> @ctxt
> On Sep 30, 2014 2:45 PM, "David Dillard" <dd...@symantec.com> wrote:
>
> > Hi,
> >
> > I've been working on an internal presentation on how letting Maven's
> > dependency mediation feature select versions of transitive dependencies
> can
> > introduce vulnerabilities into a product and how to deal with that
> > problem.  Unfortunately, it's a very manual process and I was thinking
> that
> > perhaps changes could be made to Maven that would provide better
> > automation.  To that end I'm wondering if the team has ever considered
> > adding a section to the POM that would list significant changes in that
> > release.  This would include a list of vulnerabilities fixed (e.g.
> > CVE-XXXX-YYYY) or serious bugs fixed.  Each one could include a known set
> > of versions affected (ala how CVEs work today) thus allowing tooling to
> > say: the version of artifact XYZ you're using has a known vulnerability,
> > would you like to upgrade to this new version with that vuln fixed?
> >
> > On a related note, has a different dependency mediation system ever been
> > considered (as an option), e.g. latest version or latest version on a
> > branch?
> >
> >
> > Thanks,
> >
> > David
> >
> >
>

Re: Maven, Dependencies and Vulnerabilities

Posted by Ron Wheeler <rw...@artifact-software.com>.
A side note: you can specify version ranges if you want to leave it up 
to Maven to select the latest version.
It makes it harder to have a repeatable build or to determine what 
version was used to build your artifact.

I generally like to pick the versions of dependencies and Eclipse/STS's 
Maven support makes it easy to spot conflicts and exclude transitive 
dependencies that conflict with what you want.


I doubt that adding a section to the POM to record bug fixes would be 
very useful.
No one would keep it up to date and the traffic on the POM source might 
drive a team crazy if they did.

Ron

On 30/09/2014 3:53 PM, Jeremy Long wrote:
> There are commercial solutions (sonatype, contrast, blackduck, palamida,
> etc.) and FOSS solutions (dependency-check, victims, retire.js, etc.) to
> identify and report on known vulnerabilities. I would recommend looking at
> these solutions (note, I am the main contributed to dependency-check).
>
> A better solution for the POM modification would be to add a CPE
> identifier. This would also be a great entry for a jar file's manifest. CPE
> identifiers can be requested even if there are no known CVEs, but the CPE
> can be used to lookup the related CVEs.
>
> -jeremy
> @ctxt
> On Sep 30, 2014 2:45 PM, "David Dillard" <dd...@symantec.com> wrote:
>
>> Hi,
>>
>> I've been working on an internal presentation on how letting Maven's
>> dependency mediation feature select versions of transitive dependencies can
>> introduce vulnerabilities into a product and how to deal with that
>> problem.  Unfortunately, it's a very manual process and I was thinking that
>> perhaps changes could be made to Maven that would provide better
>> automation.  To that end I'm wondering if the team has ever considered
>> adding a section to the POM that would list significant changes in that
>> release.  This would include a list of vulnerabilities fixed (e.g.
>> CVE-XXXX-YYYY) or serious bugs fixed.  Each one could include a known set
>> of versions affected (ala how CVEs work today) thus allowing tooling to
>> say: the version of artifact XYZ you're using has a known vulnerability,
>> would you like to upgrade to this new version with that vuln fixed?
>>
>> On a related note, has a different dependency mediation system ever been
>> considered (as an option), e.g. latest version or latest version on a
>> branch?
>>
>>
>> Thanks,
>>
>> David
>>
>>


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Maven, Dependencies and Vulnerabilities

Posted by David Dillard <dd...@symantec.com>.
I'm familiar with Black Duck and an older version of Palamida.  The problem with them is that you see the vulnerabilities later in the dev cycle (usually).  If done with Maven it could be a part of the build and thus found earlier.

I like the idea of including the CPE in the POM and that would make finding CVEs easy enough.  Only issue there is, as you noted, that projects would have to submit to get their CPE before they have any vulnerabilities.  Has anyone suggested this before?


-----Original Message-----
From: Jeremy Long [mailto:jeremy.long@gmail.com] 
Sent: Tuesday, September 30, 2014 3:53 PM
To: Maven Users List
Subject: Re: Maven, Dependencies and Vulnerabilities

There are commercial solutions (sonatype, contrast, blackduck, palamida,
etc.) and FOSS solutions (dependency-check, victims, retire.js, etc.) to identify and report on known vulnerabilities. I would recommend looking at these solutions (note, I am the main contributed to dependency-check).

A better solution for the POM modification would be to add a CPE identifier. This would also be a great entry for a jar file's manifest. CPE identifiers can be requested even if there are no known CVEs, but the CPE can be used to lookup the related CVEs.

-jeremy
@ctxt
On Sep 30, 2014 2:45 PM, "David Dillard" <dd...@symantec.com> wrote:

> Hi,
>
> I've been working on an internal presentation on how letting Maven's 
> dependency mediation feature select versions of transitive 
> dependencies can introduce vulnerabilities into a product and how to 
> deal with that problem.  Unfortunately, it's a very manual process and 
> I was thinking that perhaps changes could be made to Maven that would 
> provide better automation.  To that end I'm wondering if the team has 
> ever considered adding a section to the POM that would list 
> significant changes in that release.  This would include a list of vulnerabilities fixed (e.g.
> CVE-XXXX-YYYY) or serious bugs fixed.  Each one could include a known 
> set of versions affected (ala how CVEs work today) thus allowing 
> tooling to
> say: the version of artifact XYZ you're using has a known 
> vulnerability, would you like to upgrade to this new version with that vuln fixed?
>
> On a related note, has a different dependency mediation system ever 
> been considered (as an option), e.g. latest version or latest version 
> on a branch?
>
>
> Thanks,
>
> David
>
>

Re: Maven, Dependencies and Vulnerabilities

Posted by Jeremy Long <je...@gmail.com>.
There are commercial solutions (sonatype, contrast, blackduck, palamida,
etc.) and FOSS solutions (dependency-check, victims, retire.js, etc.) to
identify and report on known vulnerabilities. I would recommend looking at
these solutions (note, I am the main contributed to dependency-check).

A better solution for the POM modification would be to add a CPE
identifier. This would also be a great entry for a jar file's manifest. CPE
identifiers can be requested even if there are no known CVEs, but the CPE
can be used to lookup the related CVEs.

-jeremy
@ctxt
On Sep 30, 2014 2:45 PM, "David Dillard" <dd...@symantec.com> wrote:

> Hi,
>
> I've been working on an internal presentation on how letting Maven's
> dependency mediation feature select versions of transitive dependencies can
> introduce vulnerabilities into a product and how to deal with that
> problem.  Unfortunately, it's a very manual process and I was thinking that
> perhaps changes could be made to Maven that would provide better
> automation.  To that end I'm wondering if the team has ever considered
> adding a section to the POM that would list significant changes in that
> release.  This would include a list of vulnerabilities fixed (e.g.
> CVE-XXXX-YYYY) or serious bugs fixed.  Each one could include a known set
> of versions affected (ala how CVEs work today) thus allowing tooling to
> say: the version of artifact XYZ you're using has a known vulnerability,
> would you like to upgrade to this new version with that vuln fixed?
>
> On a related note, has a different dependency mediation system ever been
> considered (as an option), e.g. latest version or latest version on a
> branch?
>
>
> Thanks,
>
> David
>
>