Coder Social home page Coder Social logo

rubysec / ruby-advisory-db Goto Github PK

View Code? Open in Web Editor NEW
989.0 97.0 216.0 1.81 MB

A database of vulnerable Ruby Gems

Home Page: https://rubysec.com

License: Other

Ruby 98.24% Shell 1.20% Python 0.56%
rubysec advisory-files yaml security-advisories metadata hacktoberfest

ruby-advisory-db's People

Contributors

ankane avatar dependabot[bot] avatar dwradcliffe avatar eoinkelly avatar errm avatar f3ndot avatar flavorjones avatar greysteil avatar gui avatar jasnow avatar jeremyolliver avatar joergschiller avatar jrusnack avatar koenrh avatar konradr avatar lcashdol avatar mveytsman avatar ooooooo-q avatar peterkeen avatar phillmv avatar postmodern avatar rafaelfranca avatar reedloden avatar rschultheis avatar sho-h avatar skipkayhil avatar skorth avatar transoceanic2000 avatar vanessahenderson avatar ylecuyer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ruby-advisory-db's Issues

Add non affected versions?

Should a non_affected_versions attribute be added?

For example 2012-2661.yml doesn't affect Rails v2.3. This would allow an automated tool to look over a Gemfile and work out whether any advisories affect your gems.

Update rubysec.github.io on every commit

Should use Travis CI / Circle CI to automagically update the rubysec.github.io repository and push changes live as new advisories are added to the ruby-advisory-db repository.

Right now, http://rubysec.com is woefully out of date. :(

Happy to help here if I can...

Support tracking vulnerabilities in rubygems itself

Similar to #20, would be great if vulnerabilities in rubygems could be tracked as part of this project. Right now, there isn't a good way to track that, and stuff gets missed. People rarely remember to upgrade rubygems.

Export a feed

We were talking about automating the process of generating a feed from this data automatically.

@phillmv you were saying we can use github-pages for this?

Add an API for the ruby-advisory-db

Add an API for interacting with the database.

  • Searching for advisories by CVE or gem.
  • Testing if a Gem::Version is vulnerable.
  • Downloading and updating a copy of the database.

Add workarounds section

We should add a workarounds: text section, for when there is no upgrade or the developers cannot upgrade.

Make (PGP signed) tags when adding a new advisory to the DB

To counter people's fears of malicious YAML somehow getting into the DB (an attacker compromises our GitHub account or ssh keys), we should consider adding PGP signed tags for when a new advisory is added to the DB. This would allow consumers of the DB to update to the latest tag and verify it (git tag -v $TAG).

Add date to advisories

Thought: Would it be beneficial to have a date of first known disclosure associated with advisories? This may be different from an OSVDB date, right?

Add LICENSE information

It would be good to include a LICENSE file clarifying the intended license for the data in the repo. I had someone ask me today about contributing, but wanted to ensure they would be contributing to a properly licensed OSS project so their contributions would always be able to be re-used.

MIT?

Rails vulnerabilities actually affect its components

Some of the rails vulnerabilities actually affect rails components that can be used outside of rails. For instance, CVE-2013-0156 is a vulnerability with action_pack which can be used with any Rack application, not just rails.

What's the best way to re-categorize these?

A suitable way to consume this DB

Hi there, I really want to move dawnscanner to consume this, but I'm puzzled on to do this in an elegant way since it's a very dynamic archive.

My need is that dawnscanner has to check if this archive is updated, download signatures (the YAML files) and than consume them in a review.

How do you suggest me to act? Make a clone each scan can be very bandwith consuming. Having a copy offline and pulling from the scanner sometime it requires me to understand how much updated is the copy.

What do you think packing up the db in a gem or as alternative having an archive version number stored and updated somewhere?

New url policy?

Hey folks,

So last few days I've noticed that we often offer more information than the equivalent OSVDB links we point to.

We don't want to duplicate ID efforts; clearly we should stick to OSVDB and CVE values. But given the choice between a github issue/an advisory published by the author(s)/maintainers and a sparse OSVDB, it seems like it would make more sense and be more informative to point to the original upstream announcement.

Given the OSVDB, one can always regenerate that link. Alternatively, we can modify the schema to add multiple urls in case there are multiple pieces of context.

Does anyone have any thoughts or objections on this?

Vulnerabilities without CVE IDs

Some vulnerabilities don't have a CVE associated with them

So,

  1. We should get some CVEs issued for these, and get them up on OSVDB
  2. To me, this is a good reason to reconsider CVE ID's as filenames, especially if as in the case of nori, the same CVE appears multiple times in our DB (I can create a separate issue about this).

Add classification information

It would be nice if we imported some (maybe not all) of the classification information for advisories. This would provide the user with a more detailed breakdown of the advisory, than say CVSSv2 score.

Example

classification:
  location: remote
  attack_type: input_manipulation
  impact: loss_of_integrity

Add common_dependency_of field

We moved all the rails vulns to the respective gems (actionpack, activerecord, etc), but from the user's perspective it would be nice if our tools detect that they have rails and tell them that rails is what they should upgrade.

We could add a field to communicate that.

Switch away from CVE-ID as primary id.

I've updated all the advisodies with OSVDB IDs. We now have one advisory in the database (loofah/OSVDB-90945.yml) and several vulnerabilities in the queue that have OSVDB IDs but not CVE IDs. Based on Jericho's comments in the mailing list that is going to continue to be the case.

Would it make sense to switch to OSVDB as the canonical ID?

Alternatively we can implement a RUBYSEC-XXXX ID scheme. The only downside would be with conflicts when multiple people submit the same vulnerability, but I think this is actually non-issue since we have only a few people with commit-rights, we can just quickly resolve RUBYSEC-XXXX ID conflicts over github.

Thoughts?

Dealing with unfixed vulnerabilities in gems

What's the best way to handle OSVDB entries / CVE assignments for ruby gems with unfixed vulnerabilities? Specifically, maybe a gem is obsolete / unmaintained and won't ever have a new fixed version, but we want to let people know they are using a vulnerable gem. Another case is when a gem takes too long to fix an issue, but we want to warn users so they are aware (maybe not cause a failure, but at least a warning in those cases).

replace cve with advisories

Replace cve: with advisories:, containing fully qualified advisory IDs. This allows us to list multiple advisory IDs per advisory. By switching to Fully Qualified Advisory IDs, we prevent people from mistakenly importing cve: 2013-0123 as 2013-0123 into some Database.

Example

advisories:
 - CVE-2013-0123
 - OSVDB 1234

Incorrect vulnerable versions for passenger vuln

This vulnerability
https://github.com/rubysec/ruby-advisory-db/blob/master/gems/passenger/OSVDB-90738.yml
affects versions 4.0.0.beta1 and 4.0.0.beta2 ( see http://old.blog.phusion.nl/2013/03/05/phusion-passenger-4-0-beta-1-and-2-arbitrary-file-deletion-vulnerability/)

The current patched_versions and unaffected_versions don't cover that.

Is it possible to write the conditions that will capture this vuln using only patched_versions and unaffected_versions, or do we need to add a vulnerable_versions field?

(cc @postmodern I ran some test cases with bundler_audit and it fails as well).

include advisory IDs?

The advisory files may be copied or renamed. Perhaps we should include CVE / OSVDB IDs in the YAML? This could also be used to derive CVE / OSVDB URLs.

More detailed recording of affected versions of gems

Does the database need to have a more detailed recording of affected version numbers.

for example the CVE-2013-0284 for newrelic_rpm gem has the configuration:

patched_versions: 
  - ">= 3.5.3.25"

However the vulnerability only affects versions 3.2.0 -> 3.5.2.
Someone with a newrelic_rpm gem version prior to 3.2.0 is not affected by the vulnerability.

Perhaps as well as the patched_versions it is necessary to record the affected versions? This may be handy in the cases when no patched_version is available yet.

e.g

affected_versions: 
  - ["< 3.5.3.25",">= 3.2.0"]

In the example above a gem version would need to be true for any conditions to be considered affected. if the condition is an array (like above) then it must be true for each condition in the array to be considered to have met the overall conditions.

another example say for active-record CVE-2013-0155
e.g

affected_versions: 
  - [">= 3.0.0","< 3.0.19"]
  - [">= 3.1.0","< 3.1.10"]
  - [">= 3.2.0","< 3.2.11"]

If no affected_versions are recorded I guess one can assume all version not matching patched_versions are affeceted.

This issue is very similar to issue #4 , but implemented differently

Rename to ruby-vuln-db

Rename to ruby-vuln-db, to avoid confusing this Database with a place to report Advisories. Thoughts?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.