mrjoy-bundler-audit 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +7 -0
  2. data/.document +3 -0
  3. data/.gitignore +6 -0
  4. data/.gitmodules +3 -0
  5. data/.rspec +1 -0
  6. data/.travis.yml +5 -0
  7. data/.yardopts +1 -0
  8. data/COPYING.txt +674 -0
  9. data/ChangeLog.md +79 -0
  10. data/Gemfile +14 -0
  11. data/README.md +105 -0
  12. data/Rakefile +47 -0
  13. data/bin/bundle-audit +10 -0
  14. data/data/ruby-advisory-db/.rspec +1 -0
  15. data/data/ruby-advisory-db/CONTRIBUTING.md +6 -0
  16. data/data/ruby-advisory-db/CONTRIBUTORS.md +13 -0
  17. data/data/ruby-advisory-db/Gemfile +3 -0
  18. data/data/ruby-advisory-db/LICENSE.txt +5 -0
  19. data/data/ruby-advisory-db/README.md +86 -0
  20. data/data/ruby-advisory-db/Rakefile +27 -0
  21. data/data/ruby-advisory-db/gems/actionpack/OSVDB-79727.yml +26 -0
  22. data/data/ruby-advisory-db/gems/actionpack/OSVDB-84243.yml +28 -0
  23. data/data/ruby-advisory-db/gems/actionpack/OSVDB-84513.yml +23 -0
  24. data/data/ruby-advisory-db/gems/actionpack/OSVDB-84515.yml +26 -0
  25. data/data/ruby-advisory-db/gems/actionpack/OSVDB-89026.yml +24 -0
  26. data/data/ruby-advisory-db/gems/actionpack/OSVDB-91452.yml +20 -0
  27. data/data/ruby-advisory-db/gems/actionpack/OSVDB-91454.yml +23 -0
  28. data/data/ruby-advisory-db/gems/activerecord/OSVDB-82403.yml +25 -0
  29. data/data/ruby-advisory-db/gems/activerecord/OSVDB-82610.yml +24 -0
  30. data/data/ruby-advisory-db/gems/activerecord/OSVDB-89025.yml +24 -0
  31. data/data/ruby-advisory-db/gems/activerecord/OSVDB-90072.yml +21 -0
  32. data/data/ruby-advisory-db/gems/activerecord/OSVDB-90073.yml +23 -0
  33. data/data/ruby-advisory-db/gems/activerecord/OSVDB-91453.yml +26 -0
  34. data/data/ruby-advisory-db/gems/activesupport/OSVDB-79726.yml +26 -0
  35. data/data/ruby-advisory-db/gems/activesupport/OSVDB-84516.yml +23 -0
  36. data/data/ruby-advisory-db/gems/activesupport/OSVDB-89594.yml +25 -0
  37. data/data/ruby-advisory-db/gems/activesupport/OSVDB-91451.yml +28 -0
  38. data/data/ruby-advisory-db/gems/command_wrap/OSVDB-91450.yml +10 -0
  39. data/data/ruby-advisory-db/gems/crack/OSVDB-90742.yml +17 -0
  40. data/data/ruby-advisory-db/gems/cremefraiche/OSVDB-93395.yml +11 -0
  41. data/data/ruby-advisory-db/gems/curl/OSVDB-91230.yml +12 -0
  42. data/data/ruby-advisory-db/gems/devise/OSVDB-89642.yml +20 -0
  43. data/data/ruby-advisory-db/gems/dragonfly/OSVDB-90647.yml +19 -0
  44. data/data/ruby-advisory-db/gems/enum_column3/OSVDB-94679.yml +9 -0
  45. data/data/ruby-advisory-db/gems/extlib/OSVDB-90740.yml +18 -0
  46. data/data/ruby-advisory-db/gems/fastreader/OSVDB-91232.yml +12 -0
  47. data/data/ruby-advisory-db/gems/fileutils/OSVDB-90715.yml +10 -0
  48. data/data/ruby-advisory-db/gems/fileutils/OSVDB-90716.yml +10 -0
  49. data/data/ruby-advisory-db/gems/fileutils/OSVDB-90717.yml +10 -0
  50. data/data/ruby-advisory-db/gems/flash_tool/OSVDB-90829.yml +9 -0
  51. data/data/ruby-advisory-db/gems/ftpd/OSVDB-90784.yml +18 -0
  52. data/data/ruby-advisory-db/gems/gtk2/OSVDB-40774.yml +20 -0
  53. data/data/ruby-advisory-db/gems/httparty/OSVDB-90741.yml +19 -0
  54. data/data/ruby-advisory-db/gems/json/OSVDB-90074.yml +23 -0
  55. data/data/ruby-advisory-db/gems/karteek-docsplit/OSVDB-92117.yml +10 -0
  56. data/data/ruby-advisory-db/gems/kelredd-pruview/OSVDB-92228.yml +10 -0
  57. data/data/ruby-advisory-db/gems/ldoce/OSVDB-91870.yml +10 -0
  58. data/data/ruby-advisory-db/gems/loofah/OSVDB-90945.yml +21 -0
  59. data/data/ruby-advisory-db/gems/mail/OSVDB-70667.yml +21 -0
  60. data/data/ruby-advisory-db/gems/mail/OSVDB-81631.yml +14 -0
  61. data/data/ruby-advisory-db/gems/mail/OSVDB-81632.yml +16 -0
  62. data/data/ruby-advisory-db/gems/md2pdf/OSVDB-92290.yml +10 -0
  63. data/data/ruby-advisory-db/gems/mini_magick/OSVDB-91231.yml +15 -0
  64. data/data/ruby-advisory-db/gems/multi_xml/OSVDB-89148.yml +16 -0
  65. data/data/ruby-advisory-db/gems/newrelic_rpm/OSVDB-90189.yml +17 -0
  66. data/data/ruby-advisory-db/gems/nori/OSVDB-90196.yml +19 -0
  67. data/data/ruby-advisory-db/gems/omniauth-oauth2/OSVDB-90264.yml +16 -0
  68. data/data/ruby-advisory-db/gems/pdfkit/OSVDB-90867.yml +11 -0
  69. data/data/ruby-advisory-db/gems/rack-cache/OSVDB-83077.yml +18 -0
  70. data/data/ruby-advisory-db/gems/rack/OSVDB-89939.yml +23 -0
  71. data/data/ruby-advisory-db/gems/rdoc/OSVDB-90004.yml +27 -0
  72. data/data/ruby-advisory-db/gems/rgpg/OSVDB-95948.yml +13 -0
  73. data/data/ruby-advisory-db/gems/ruby_parser/OSVDB-90561.yml +11 -0
  74. data/data/ruby-advisory-db/gems/spree/OSVDB-91216.yml +10 -0
  75. data/data/ruby-advisory-db/gems/spree/OSVDB-91217.yml +10 -0
  76. data/data/ruby-advisory-db/gems/spree/OSVDB-91218.yml +10 -0
  77. data/data/ruby-advisory-db/gems/spree/OSVDB-91219.yml +10 -0
  78. data/data/ruby-advisory-db/gems/thumbshooter/OSVDB-91839.yml +10 -0
  79. data/data/ruby-advisory-db/lib/scrape.rb +87 -0
  80. data/data/ruby-advisory-db/spec/advisory_example.rb +165 -0
  81. data/data/ruby-advisory-db/spec/gems_spec.rb +8 -0
  82. data/data/ruby-advisory-db/spec/spec_helper.rb +1 -0
  83. data/gemspec.yml +16 -0
  84. data/lib/bundler/audit.rb +21 -0
  85. data/lib/bundler/audit/advisory.rb +142 -0
  86. data/lib/bundler/audit/cli.rb +124 -0
  87. data/lib/bundler/audit/database.rb +187 -0
  88. data/lib/bundler/audit/scanner.rb +97 -0
  89. data/lib/bundler/audit/version.rb +25 -0
  90. data/mrjoy-bundler-audit.gemspec +66 -0
  91. data/spec/advisory_spec.rb +145 -0
  92. data/spec/audit_spec.rb +8 -0
  93. data/spec/bundle/insecure_sources/Gemfile +39 -0
  94. data/spec/bundle/secure/Gemfile +38 -0
  95. data/spec/bundle/unpatched_gems/Gemfile +38 -0
  96. data/spec/database_spec.rb +81 -0
  97. data/spec/integration_spec.rb +81 -0
  98. data/spec/scanner_spec.rb +74 -0
  99. data/spec/spec_helper.rb +21 -0
  100. metadata +162 -0
data/ChangeLog.md ADDED
@@ -0,0 +1,79 @@
1
+ ### 0.1.4 / 2013-08-15
2
+
3
+ * RVM compartmentalization for the project (only relevant to people hacking on
4
+ it).
5
+ * Adding Ruby 2.0.0 to Travis config.
6
+ * Updated the [ruby-advisory-db] from [ffce5a2](https://github.com/rubysec/ruby-advisory-db/commit/ffce5a27f239191e22bd47bb62c5a3121952b8d0)
7
+ to [ee2ff0b](https://github.com/rubysec/ruby-advisory-db/commit/ee2ff0b6c971d0eb295595dc1cd48a777d8829bb).
8
+ * Update `Advisory` class to compensate for change in naming convention in
9
+ [ruby-advisory-db].
10
+ * Make some tests less brittle, and get them passing again after the
11
+ [ruby-advisory-db] update.
12
+ * Add ability for individual spec files to be called individually.
13
+ * Rename gem so this can be installed via Rubygems.
14
+
15
+ ### 0.1.3 / 2013-03-05
16
+
17
+ * Require RubyGems >= 1.8.0. Prior versions of RubyGems could not correctly
18
+ parse approximate version requirements (`~> 1.2.3`).
19
+ * Updated the [ruby-advisory-db].
20
+ * Added {Bundle::Audit::Advisory#unaffected_versions}.
21
+ * Added {Bundle::Audit::Advisory#unaffected?}.
22
+ * Added {Bundle::Audit::Advisory#patched?}.
23
+
24
+ ### 0.1.2 / 2013-02-17
25
+
26
+ * Require [bundler] ~> 1.2.
27
+ * Vendor a full copy of the [ruby-advisory-db].
28
+ * Added {Bundler::Audit::Advisory#path} for debugging purposes.
29
+ * Added {Bundler::Audit::Advisory#to_s} for debugging purposes.
30
+
31
+ #### CLI
32
+
33
+ * Simply parse the `Gemfile.lock` instead of loading the bundle (@grosser).
34
+ * Exit with non-zero status on failure (@grosser).
35
+
36
+ ### 0.1.1 / 2013-02-12
37
+
38
+ * Fixed a Ruby 1.8 syntax error.
39
+
40
+ ### Advisories
41
+
42
+ * Imported advisories from the [Ruby Advisory DB][ruby-advisory-db].
43
+ * [CVE-2011-0739](http://www.osvdb.org/show/osvdb/70667)
44
+ * [CVE-2012-2139](http://www.osvdb.org/show/osvdb/81631)
45
+ * [CVE-2012-2140](http://www.osvdb.org/show/osvdb/81632)
46
+ * [CVE-2012-267](http://osvdb.org/83077)
47
+ * [CVE-2012-1098](http://osvdb.org/79726)
48
+ * [CVE-2012-1099](http://www.osvdb.org/show/osvdb/79727)
49
+ * [CVE-2012-2660](http://www.osvdb.org/show/osvdb/82610)
50
+ * [CVE-2012-2661](http://www.osvdb.org/show/osvdb/82403)
51
+ * [CVE-2012-3424](http://www.osvdb.org/show/osvdb/84243)
52
+ * [CVE-2012-3463](http://osvdb.org/84515)
53
+ * [CVE-2012-3464](http://www.osvdb.org/show/osvdb/84516)
54
+ * [CVE-2012-3465](http://www.osvdb.org/show/osvdb/84513)
55
+
56
+ ### CLI
57
+
58
+ * If the advisory has no `patched_versions`, recommend removing or disabling
59
+ the gem until a patch is made available.
60
+
61
+ ### 0.1.0 / 2013-02-11
62
+
63
+ * Initial release:
64
+ * Checks for vulnerable versions of gems in `Gemfile.lock`.
65
+ * Prints advisory information.
66
+ * Does not require a network connection.
67
+
68
+ #### Advisories
69
+
70
+ * [CVE-2013-0269](http://direct.osvdb.org/show/osvdb/90074)
71
+ * [CVE-2013-0263](http://osvdb.org/show/osvdb/89939)
72
+ * [CVE-2013-0155](http://osvdb.org/show/osvdb/89025)
73
+ * [CVE-2013-0156](http://osvdb.org/show/osvdb/89026)
74
+ * [CVE-2013-0276](http://direct.osvdb.org/show/osvdb/90072)
75
+ * [CVE-2013-0277](http://direct.osvdb.org/show/osvdb/90073)
76
+ * [CVE-2013-0333](http://osvdb.org/show/osvdb/89594)
77
+
78
+ [bundler]: http://gembundler.com/
79
+ [ruby-advisory-db]: https://github.com/rubysec/ruby-advisory-db#readme
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ #ruby=ruby-2.0.0-p195
2
+ #ruby-gemset=bundler-audit
3
+ source 'https://rubygems.org/'
4
+
5
+ gemspec
6
+
7
+ group :development do
8
+ gem 'rake', '~> 10.0'
9
+ gem 'kramdown', '~> 0.14'
10
+
11
+ gem 'rubygems-tasks', '~> 0.2'
12
+ gem 'rspec', '~> 2.4'
13
+ gem 'yard', '~> 0.8'
14
+ end
data/README.md ADDED
@@ -0,0 +1,105 @@
1
+ # mrjoy-bundler-audit
2
+
3
+ * [Homepage](https://github.com/MrJoy/mrjoy-bundler-audit#readme)
4
+ * [Issues](https://github.com/MrJoy/mrjoy-bundler-audit/issues)
5
+ * [Email](mailto:jfrisby@mrjoy.com)
6
+ * [![Build Status](https://travis-ci.org/MrJoy/mrjoy-bundler-audit.png)](https://travis-ci.org/MrJoy/mrjoy-bundler-audit)
7
+ * [![Code Climate](https://codeclimate.com/github/MrJoy/mrjoy-bundler-audit.png)](https://codeclimate.com/github/MrJoy/mrjoy-bundler-audit)
8
+
9
+ ## Description
10
+
11
+ Patch-level verification for [Bundler][bundler].
12
+
13
+ ## Features
14
+
15
+ * Checks for vulnerable versions of gems in `Gemfile.lock`.
16
+ * Prints advisory information.
17
+ * Does not require a network connection.
18
+
19
+ ## Synopsis
20
+
21
+ Audit a projects `Gemfile.lock`:
22
+
23
+ $ bundle-audit
24
+ Name: rack
25
+ Version: 1.4.4
26
+ CVE: 2013-0263
27
+ Criticality: High
28
+ URL: http://osvdb.org/show/osvdb/89939
29
+ Title: Rack Rack::Session::Cookie Function Timing Attack Remote Code Execution
30
+ Patched Versions: ~> 1.1.6, ~> 1.2.8, ~> 1.3.10, ~> 1.4.5, >= 1.5.2
31
+
32
+ Name: json
33
+ Version: 1.7.6
34
+ CVE: 2013-0269
35
+ Criticality: High
36
+ URL: http://direct.osvdb.org/show/osvdb/90074
37
+ Title: Ruby on Rails JSON Gem Arbitrary Symbol Creation Remote DoS
38
+ Patched Versions: ~> 1.5.4, ~> 1.6.7, >= 1.7.7
39
+
40
+ Name: rails
41
+ Version: 3.2.10
42
+ CVE: 2013-0155
43
+ Criticality: High
44
+ URL: http://osvdb.org/show/osvdb/89025
45
+ Title: Ruby on Rails Active Record JSON Parameter Parsing Query Bypass
46
+ Patched Versions: ~> 3.0.19, ~> 3.1.10, >= 3.2.11
47
+
48
+ Name: rails
49
+ Version: 3.2.10
50
+ CVE: 2013-0156
51
+ Criticality: High
52
+ URL: http://osvdb.org/show/osvdb/89026
53
+ Title: Ruby on Rails params_parser.rb Action Pack Type Casting Parameter Parsing
54
+ Remote Code Execution
55
+ Patched Versions: ~> 2.3.15, ~> 3.0.19, ~> 3.1.10, >= 3.2.11
56
+
57
+ Name: rails
58
+ Version: 3.2.10
59
+ CVE: 2013-0276
60
+ Criticality: Medium
61
+ URL: http://direct.osvdb.org/show/osvdb/90072
62
+ Title: Ruby on Rails Active Record attr_protected Method Bypass
63
+ Patched Versions: ~> 2.3.17, ~> 3.1.11, >= 3.2.12
64
+
65
+ Unpatched versions found!
66
+
67
+ ## Requirements
68
+
69
+ * [bundler] ~> 1.2
70
+ * [RubyGems] >= 1.8
71
+
72
+ ## Install
73
+
74
+ $ gem install mrjoy-bundler-audit
75
+
76
+ Or in your Gemfile:
77
+
78
+ ```ruby
79
+ gem 'mrjoy-bundler-audit', :require => nil
80
+ ```
81
+
82
+ ## License
83
+
84
+ Copyright (c) 2013 Hal Brodigan (postmodern.mod3 at gmail.com)
85
+ Modifications Copyright (c) 2013 Jon Frisby (jfrisby@mrjoy.com), or their
86
+ respective authors.
87
+
88
+ mrjoy-bundler-audit is free software: you can redistribute it and/or modify
89
+ it under the terms of the GNU General Public License as published by
90
+ the Free Software Foundation, either version 3 of the License, or
91
+ (at your option) any later version.
92
+
93
+ mrjoy-bundler-audit is distributed in the hope that it will be useful,
94
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
95
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
96
+ GNU General Public License for more details.
97
+
98
+ You should have received a copy of the GNU General Public License
99
+ along with mrjoy-bundler-audit. If not, see <http://www.gnu.org/licenses/>.
100
+
101
+ [bundler]: https://github.com/carlhuda/bundler#readme
102
+
103
+ [OSVDB]: http://osvdb.org/
104
+
105
+ [RubyGems]: https://rubygems.org
data/Rakefile ADDED
@@ -0,0 +1,47 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+
5
+ begin
6
+ require 'bundler'
7
+ rescue LoadError => e
8
+ warn e.message
9
+ warn "Run `gem install bundler` to install Bundler."
10
+ exit -1
11
+ end
12
+
13
+ begin
14
+ Bundler.setup(:development)
15
+ rescue Bundler::BundlerError => e
16
+ warn e.message
17
+ warn "Run `bundle install` to install missing gems."
18
+ exit e.status_code
19
+ end
20
+
21
+ require 'rake'
22
+
23
+ require 'rubygems/tasks'
24
+ Gem::Tasks.new
25
+
26
+ require 'rspec/core/rake_task'
27
+ RSpec::Core::RakeTask.new
28
+
29
+ namespace :spec do
30
+ task :bundle do
31
+ root = 'spec/bundle'
32
+
33
+ %w[secure unpatched_gems insecure_sources].each do |bundle|
34
+ chdir(File.join(root,bundle)) do
35
+ sh 'BUNDLE_BIN_PATH="" BUNDLE_GEMFILE="" RUBYOPT="" bundle install --path ../../../vendor/bundle'
36
+ end
37
+ end
38
+ end
39
+ end
40
+ task :spec => 'spec:bundle'
41
+
42
+ task :test => :spec
43
+ task :default => :spec
44
+
45
+ require 'yard'
46
+ YARD::Rake::YardocTask.new
47
+ task :doc => :yard
data/bin/bundle-audit ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+
5
+ lib_dir = File.expand_path(File.join(File.dirname(__FILE__),'..','lib'))
6
+ $LOAD_PATH << lib_dir unless $LOAD_PATH.include?(lib_dir)
7
+
8
+ require 'bundler/audit/cli'
9
+
10
+ Bundler::Audit::CLI.start
@@ -0,0 +1 @@
1
+ --colour
@@ -0,0 +1,6 @@
1
+ # Contributing Guidelines
2
+
3
+ ## Style
4
+
5
+ 1. All text must be within 80 columns.
6
+ 2. YAML must be indented by 2 spaces.
@@ -0,0 +1,13 @@
1
+ ### Acknowledgements
2
+
3
+ This database would not be possible without volunteers willing to submit pull requests.
4
+
5
+ Thanks,
6
+ * [Postmodern](https://github.com/postmodern/)
7
+ * [Max Veytsman](https://twitter.com/mveytsman)
8
+ * [Pietro Monteiro](https://github.com/pietro)
9
+ * [Eric Hodel](https://github.com/drbrain)
10
+ * [Brendon Murphy](https://github.com/bemurphy)
11
+ * [Oliver Legg](https://github.com/olly)
12
+ * [Larry W. Cashdollar](http://vapid.dhs.org/)
13
+ * [Michael Grosser](https://github.com/grosser)
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+ gem 'pry'
3
+ gem 'mechanize'
@@ -0,0 +1,5 @@
1
+ If you submit code or data to the ruby-advisory-db that is copyrighted by yourself, upon submission you hereby agree to release it into the public domain.
2
+
3
+ However, not all of the ruby-advisory-db can be considered public domain. The ruby-advisory-db may contain some information copyrighted by the Open Source Vulnerability Database (http://osvdb.org). If you use ruby-advisory-db data to build a product or a service, it is your responsibility to familiarize yourself with the terms of their license: http://www.osvdb.org/osvdb_license
4
+
5
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,86 @@
1
+ # Ruby Advisory Database
2
+
3
+ The Ruby Advisory Database aims to compile all advisories that are relevant to Ruby libraries.
4
+
5
+ ## Goals
6
+
7
+ 1. Provide advisory **metadata** in a **simple** yet **structured** [YAML]
8
+ schema for automated tools to consume.
9
+ 2. Avoid reinventing [CVE]s.
10
+ 3. Avoid duplicating the efforts of the [OSVDB].
11
+
12
+ ## Directory Structure
13
+
14
+ The database is a list of directories that match the names of Ruby libraries on
15
+ [rubygems.org]. Within each directory are one or more advisory files
16
+ for the Ruby library. These advisory files are typically named using
17
+ the advisories [CVE] identifier number.
18
+
19
+ gems/:
20
+ actionpack/:
21
+ CVE-2012-1099.yml CVE-2012-3463.yml CVE-2013-0156.yml
22
+ CVE-2013-1857.yml CVE-2012-3424.yml CVE-2012-3465.yml
23
+ CVE-2013-1855.yml
24
+
25
+ If an advisory does not yet have a [CVE], [requesting a CVE][1] is easy.
26
+
27
+ ## Format
28
+
29
+ Each advisory file contains the advisory information in [YAML] format:
30
+
31
+ ---
32
+ gem: actionpack
33
+ framework: rails
34
+ cve: 2013-0156
35
+ osvdb: 89026
36
+ url: http://osvdb.org/show/osvdb/89026
37
+ title: |
38
+ Ruby on Rails params_parser.rb Action Pack Type Casting Parameter Parsing
39
+ Remote Code Execution
40
+
41
+ description: |
42
+ Ruby on Rails contains a flaw in params_parser.rb of the Action Pack.
43
+ The issue is triggered when a type casting error occurs during the parsing
44
+ of parameters. This may allow a remote attacker to potentially execute
45
+ arbitrary code.
46
+
47
+ cvss_v2: 10.0
48
+
49
+ patched_versions:
50
+ - ~> 2.3.15
51
+ - ~> 3.0.19
52
+ - ~> 3.1.10
53
+ - ">= 3.2.11"
54
+
55
+ ### Schema
56
+
57
+ * `gem` \[String\]: Name of the affected gem.
58
+ * `framework` \[String\] (optional): Name of framework gem belongs to.
59
+ * `platform` \[String\] (optional): If this vulnerability is platform-specific, name of platform this vulnerability affects (e.g. JRuby)
60
+ * `cve` \[String\]: CVE id.
61
+ * `osvdb` \[Fixnum\]: OSVDB id.
62
+ * `url` \[String\]: The URL to the full advisory.
63
+ * `title` \[String\]: The title of the advisory.
64
+ * `date` \[Date\]: Disclosure date of the advisory.
65
+ * `description` \[String\]: Multi-paragraph description of the vulnerability.
66
+ * `cvss_v2` \[Float\]: The [CVSSv2] score for the vulnerability.
67
+ * `unaffected_versions` \[Array\<String\>\] (optional): The version requirements for the
68
+ unaffected versions of the Ruby library.
69
+ * `patched_versions` \[Array\<String\>\]: The version requirements for the
70
+ patched versions of the Ruby library.
71
+
72
+ ## Credits
73
+
74
+ Please see [CONTRIBUTORS.md].
75
+
76
+ This database also includes data from the [Open Source Vulnerability Database][OSVDB]
77
+ developed by the Open Security Foundation (OSF) and its contributors.
78
+
79
+ [rubygems.org]: https://rubygems.org/
80
+ [CVE]: http://cve.mitre.org/
81
+ [CVSSv2]: http://www.first.org/cvss/cvss-guide.html
82
+ [OSVDB]: http://www.osvdb.org/
83
+ [YAML]: http://www.yaml.org/
84
+ [CONTRIBUTORS.md]: https://github.com/rubysec/ruby-advisory-db/blob/master/CONTRIBUTORS.md
85
+
86
+ [1]: http://people.redhat.com/kseifrie/CVE-OpenSource-Request-HOWTO.html
@@ -0,0 +1,27 @@
1
+ require 'yaml'
2
+
3
+ namespace :lint do
4
+ begin
5
+ gem 'rspec', '~> 2.4'
6
+ require 'rspec/core/rake_task'
7
+
8
+ RSpec::Core::RakeTask.new(:yaml)
9
+ rescue LoadError => e
10
+ task :spec do
11
+ abort "Please run `gem install rspec` to install RSpec."
12
+ end
13
+ end
14
+
15
+ task :cve do
16
+ Dir.glob('gems/*/*.yml') do |path|
17
+ advisory = YAML.load_file(path)
18
+
19
+ unless advisory['cve']
20
+ puts "Missing CVE: #{path}"
21
+ end
22
+ end
23
+ end
24
+ end
25
+
26
+ task :lint => ['lint:yaml', 'lint:cve']
27
+ task :default => :lint
@@ -0,0 +1,26 @@
1
+ ---
2
+ gem: actionpack
3
+ framework: rails
4
+ cve: 2012-1099
5
+ osvdb: 79727
6
+ url: http://www.osvdb.org/show/osvdb/79727
7
+ title:
8
+ Ruby on Rails actionpack/lib/action_view/helpers/form_options_helper.rb
9
+ Manually Generated Select Tag Options XSS
10
+ date: 2012-03-01
11
+
12
+ description: |
13
+ Ruby on Rails contains a flaw that allows a remote cross-site scripting (XSS)
14
+ attack. This flaw exists because the application does not validate manually
15
+ generated 'select tag options' upon submission to
16
+ actionpack/lib/action_view/helpers/form_options_helper.rb. This may allow a
17
+ user to create a specially crafted request that would execute arbitrary
18
+ script code in a user's browser within the trust relationship between their
19
+ browser and the server.
20
+
21
+ cvss_v2: 4.3
22
+
23
+ patched_versions:
24
+ - ~> 3.0.12
25
+ - ~> 3.1.4
26
+ - ">= 3.2.2"
@@ -0,0 +1,28 @@
1
+ ---
2
+ gem: actionpack
3
+ framework: rails
4
+ cve: 2012-3424
5
+ osvdb: 84243
6
+ url: http://www.osvdb.org/show/osvdb/84243
7
+ title:
8
+ Ruby on Rails actionpack/lib/action_controller/metal/http_authentication.rb
9
+ with_http_digest Helper Method Remote DoS
10
+ date: 2012-07-26
11
+
12
+ description: |
13
+ Ruby on Rails contains a flaw that may allow a remote denial of service.
14
+ The issue is triggered when an error occurs in
15
+ actionpack/lib/action_controller/metal/http_authentication.rb when the
16
+ with_http_digest helper method is being used. This may allow a remote
17
+ attacker to cause a loss of availability for the program.
18
+
19
+ cvss_v2: 4.3
20
+
21
+ unaffected_versions:
22
+ - ">= 2.3.5, <= 2.3.14"
23
+
24
+ patched_versions:
25
+ - ~> 3.0.16
26
+ - ~> 3.1.7
27
+ - ">= 3.2.7"
28
+