vulndb / data

User, contributor and developer friendly vulnerability database
Other
129 stars 29 forks source link

php sdk #33

Open robocoder opened 9 years ago

robocoder commented 9 years ago
  1. I looked at the Ruby and Go implementations and whipped up a php sdk. Let me know if it's ok to transfer this repo to this organization.

    https://github.com/vipsoft/vulndb-php

  2. I didn't embed the vulndb/data as it seems to couple the sdk to the database (i.e., release an updated sdk each time the vulndb changes). But if embedding is the preference, let me know, so I can rectify.
andresriancho commented 9 years ago

Ruby and Go implementations

We have a Ruby lib? Where? Maybe you're confused with the python one?

I didn't embed the vulndb/data as it seems to couple the sdk to the database (i.e., release an updated sdk each time the vulndb changes). But if embedding is the preference, let me know, so I can rectify.

It all depends on how developers on different languages are used to install/get/use their libs. I wrote the python implementation and included the DB just because it was easier for the end user (developer)

andresriancho commented 9 years ago

Give me 10min to review the PHP code

andresriancho commented 9 years ago

Review

git clone this repository.

Usually you put the name of the repo, so the users can copy+paste from the README.md file into a shell

https://github.com/vipsoft/vulndb-php/blob/master/composer.lock

Is this file really needed? If so, why do we have things like symphony in there? Is that a real requirement for the php-vulndb?

"name": "vipsoft/vulndb-php",

When migrating to the vulndb organization please change these

https://github.com/vipsoft/vulndb-php/blob/master/src/Service/ReferenceService.php#L55-L105

Seems that all the libs that consume the vulndb will have to implement something like that; maybe it's a good idea to have that data inside the vulndb repository to avoid duplication? @robocoder If you agree please create an issue so we can work on this later

Excellent

Your code looks amazing, very ordered, with tests, easy to read (even for a non-php dev like me). I would love to have this code as part of vulndb in github so people are able to easily find it.

TODO

(once the above is done)

robocoder commented 9 years ago

Sorry, I meant python lib. Too much ruby sass on the brain lately.

Thanks for the quick feedback. I've made the requested changes. The badges will fix themselves after the move.

andresriancho commented 9 years ago

Ping @m0sth8

m0sth8 commented 9 years ago

:+1: The code seems cool for me =) Thank you @robocoder

andresriancho commented 9 years ago

@robocoder feel free to migrate your repository to https://github.com/vulndb/php-sdk and complete the steps I've outlined in my previous comment.

Once again, thanks for the contributions!

robocoder commented 9 years ago

Pushed.

Please register your username on packagist.org and travis-ci.org to get respective tokens. Then under "Settings" | "Webhooks and Services", add "Packagist" and "Travis CI" services. Thanks.

andresriancho commented 9 years ago

@robocoder yesterday I received an email from github about permissions for travis CI, I've approved it.

screenshot from 2015-08-05 08 29 08

Not sure how to make the same process for packagist, it's the first time I'm using github for an organization instead of personal use, some things change.

If I receive a message from packagist.org (like I did for travis), I'll gladly accept/authorize access.

andresriancho commented 9 years ago

Also noted that there are No builds for this repository at travis?