I rather disagree for the following reasons:
- it is weird to have to read data from a latter version (the
composer.json in the vulnerable tags won't contain vulnerability data)
to figure out if an earlier version is vulnerable
- vulnerable packages that are already installed would not trigger a
warning as they don't get reinstalled. Unless we start checking for the
latest version of vulnerabilities whenever composer does something, but
that breaks some assumptions in the workflow IMO.
- external service or packagist, some people will ignore it, some people
will get educated. It's always the same. That's why the FIG
standardizing on a security document and way of handling things is a
good thing. It makes education easier.
- maybe the current advisories db tool could have a nice command to help
creating/sending a pull request or something when you have a new
advisory to send as a package developer.
I would much prefer if this is kept as a third party tool, then
eventually we could integrate it in the composer workflow if we find a
way that makes sense, or users can do it themselves using
post-install-cmd hooks for example.
Maybe the info could remain in the original repo though as a SECURITY
file or whatever that lists everything, that could be crawled by an
external service just like packagist does it really. Down the line if
this gets used widely we can always think of ways to integrate things
tighter to make it easier to use / more universal.
Cheers
On 12/11/2014 19:09, Dracony wrote:
> I have discussed this in another thread, and since I feel I'm hijaking
> it I decided to make a separate one.
>
> there is a PHP Security Advisories Database
> (
https://github.com/FriendsOfPHP/security-advisories ) one of the
> features of which is to check your composer files for vulnerabilities.
> It works great but here are the problems with it:
>
> * It requires an external service to store vulnerability data
> * Package developers may not know about the service and not submit the
> data there
> * Reporting vulnerabilities there is an additional step for a developer
> * Users still can install a vulnerable version with composer and are
> not warned about it
>
> My idea is to instead store vulnerability information in the
> composer.json file. We already store a lot of metadata in it anyway
> (license, developers, description, etc).
> This gives us the opportunity to:
>
> * *Warn users automatically that they are installing a vulnerable
> version of a package when they run composer install*
> * *Users can easily check composer.json to see vulnerability information*
> * Doesn't rely on an external service
> * information can be easily read from the json format
> * It's easier for developers to update that information in their
> composer.json than submit it somewhere
>
> For example the format could be:
> |
> vulnerabilities:{
> '<=1.10.12':['
http://myawesomepackage.com/new-bug-discover.html']
> }
> |
>
> Basically it would specify an affected version and a link to a webpage
> explaining the vulnerability. this is the simplest approach, but
> obviously we could store a lot more data there (like date etc).
>
> What would be your thoughts?
>
> --
> You received this message because you are subscribed to the Google
> Groups "PHP Framework Interoperability Group" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
php-fig+u...@googlegroups.com
> <mailto:
php-fig+u...@googlegroups.com>.
> <mailto:
php...@googlegroups.com>.
> <
https://groups.google.com/d/msgid/php-fig/0d6db392-3f1c-4913-9acb-92d0f3652e7f%40googlegroups.com?utm_medium=email&utm_source=footer>.
Jordi Boggiano
@seldaek -
http://nelm.io/jordi