bundler-audit 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.document +1 -1
- data/.gitignore +3 -0
- data/.gitmodules +3 -0
- data/.travis.yml +4 -0
- data/ChangeLog.md +50 -0
- data/Gemfile +12 -0
- data/README.md +51 -69
- data/Rakefile +37 -21
- data/bin/bundle-audit +2 -12
- data/bundler-audit.gemspec +7 -0
- data/data/ruby-advisory-db/.rspec +1 -0
- data/data/ruby-advisory-db/CONTRIBUTING.md +6 -0
- data/data/ruby-advisory-db/CONTRIBUTORS.md +13 -0
- data/data/ruby-advisory-db/Gemfile +3 -0
- data/data/ruby-advisory-db/LICENSE.txt +5 -0
- data/data/ruby-advisory-db/README.md +86 -0
- data/data/ruby-advisory-db/Rakefile +27 -0
- data/data/ruby-advisory-db/gems/actionpack/OSVDB-79727.yml +26 -0
- data/data/ruby-advisory-db/gems/actionpack/OSVDB-84243.yml +28 -0
- data/data/ruby-advisory-db/gems/actionpack/OSVDB-84513.yml +23 -0
- data/data/ruby-advisory-db/gems/actionpack/OSVDB-84515.yml +26 -0
- data/data/{bundler/audit/rails/2013-0156.yml → ruby-advisory-db/gems/actionpack/OSVDB-89026.yml} +8 -3
- data/data/ruby-advisory-db/gems/actionpack/OSVDB-91452.yml +20 -0
- data/data/ruby-advisory-db/gems/actionpack/OSVDB-91454.yml +23 -0
- data/data/ruby-advisory-db/gems/activerecord/OSVDB-82403.yml +25 -0
- data/data/ruby-advisory-db/gems/activerecord/OSVDB-82610.yml +24 -0
- data/data/{bundler/audit/rails/2013-0155.yml → ruby-advisory-db/gems/activerecord/OSVDB-89025.yml} +9 -4
- data/data/{bundler/audit/rails/2013-0276.yml → ruby-advisory-db/gems/activerecord/OSVDB-90072.yml} +8 -3
- data/data/{bundler/audit/rails/2013-0277.yml → ruby-advisory-db/gems/activerecord/OSVDB-90073.yml} +8 -3
- data/data/ruby-advisory-db/gems/activerecord/OSVDB-91453.yml +26 -0
- data/data/ruby-advisory-db/gems/activesupport/OSVDB-79726.yml +26 -0
- data/data/ruby-advisory-db/gems/activesupport/OSVDB-84516.yml +23 -0
- data/data/{bundler/audit/rails/2013-0333.yml → ruby-advisory-db/gems/activesupport/OSVDB-89594.yml} +8 -3
- data/data/ruby-advisory-db/gems/activesupport/OSVDB-91451.yml +28 -0
- data/data/ruby-advisory-db/gems/command_wrap/OSVDB-91450.yml +10 -0
- data/data/ruby-advisory-db/gems/crack/OSVDB-90742.yml +17 -0
- data/data/ruby-advisory-db/gems/cremefraiche/OSVDB-93395.yml +11 -0
- data/data/ruby-advisory-db/gems/curl/OSVDB-91230.yml +12 -0
- data/data/ruby-advisory-db/gems/devise/OSVDB-89642.yml +20 -0
- data/data/ruby-advisory-db/gems/dragonfly/OSVDB-90647.yml +19 -0
- data/data/ruby-advisory-db/gems/enum_column3/OSVDB-94679.yml +9 -0
- data/data/ruby-advisory-db/gems/extlib/OSVDB-90740.yml +18 -0
- data/data/ruby-advisory-db/gems/fastreader/OSVDB-91232.yml +12 -0
- data/data/ruby-advisory-db/gems/fileutils/OSVDB-90715.yml +10 -0
- data/data/ruby-advisory-db/gems/fileutils/OSVDB-90716.yml +10 -0
- data/data/ruby-advisory-db/gems/fileutils/OSVDB-90717.yml +10 -0
- data/data/ruby-advisory-db/gems/flash_tool/OSVDB-90829.yml +9 -0
- data/data/ruby-advisory-db/gems/ftpd/OSVDB-90784.yml +18 -0
- data/data/ruby-advisory-db/gems/gtk2/OSVDB-40774.yml +20 -0
- data/data/ruby-advisory-db/gems/httparty/OSVDB-90741.yml +19 -0
- data/data/{bundler/audit/json/2013-0269.yml → ruby-advisory-db/gems/json/OSVDB-90074.yml} +8 -4
- data/data/ruby-advisory-db/gems/karteek-docsplit/OSVDB-92117.yml +10 -0
- data/data/ruby-advisory-db/gems/kelredd-pruview/OSVDB-92228.yml +10 -0
- data/data/ruby-advisory-db/gems/ldoce/OSVDB-91870.yml +10 -0
- data/data/ruby-advisory-db/gems/loofah/OSVDB-90945.yml +21 -0
- data/data/ruby-advisory-db/gems/mail/OSVDB-70667.yml +21 -0
- data/data/ruby-advisory-db/gems/mail/OSVDB-81631.yml +14 -0
- data/data/ruby-advisory-db/gems/mail/OSVDB-81632.yml +16 -0
- data/data/ruby-advisory-db/gems/md2pdf/OSVDB-92290.yml +10 -0
- data/data/ruby-advisory-db/gems/mini_magick/OSVDB-91231.yml +15 -0
- data/data/ruby-advisory-db/gems/multi_xml/OSVDB-89148.yml +16 -0
- data/data/ruby-advisory-db/gems/newrelic_rpm/OSVDB-90189.yml +17 -0
- data/data/ruby-advisory-db/gems/nori/OSVDB-90196.yml +19 -0
- data/data/ruby-advisory-db/gems/omniauth-oauth2/OSVDB-90264.yml +16 -0
- data/data/ruby-advisory-db/gems/pdfkit/OSVDB-90867.yml +11 -0
- data/data/{bundler/audit/rack/2013-0263.yml → ruby-advisory-db/gems/rack/OSVDB-89939.yml} +11 -8
- data/data/ruby-advisory-db/gems/rack-cache/OSVDB-83077.yml +18 -0
- data/data/ruby-advisory-db/gems/rdoc/OSVDB-90004.yml +27 -0
- data/data/ruby-advisory-db/gems/rgpg/OSVDB-95948.yml +13 -0
- data/data/ruby-advisory-db/gems/ruby_parser/OSVDB-90561.yml +11 -0
- data/data/ruby-advisory-db/gems/spree/OSVDB-91216.yml +10 -0
- data/data/ruby-advisory-db/gems/spree/OSVDB-91217.yml +10 -0
- data/data/ruby-advisory-db/gems/spree/OSVDB-91218.yml +10 -0
- data/data/ruby-advisory-db/gems/spree/OSVDB-91219.yml +10 -0
- data/data/ruby-advisory-db/gems/thumbshooter/OSVDB-91839.yml +10 -0
- data/data/ruby-advisory-db/lib/scrape.rb +87 -0
- data/data/ruby-advisory-db/spec/advisory_example.rb +165 -0
- data/data/ruby-advisory-db/spec/gems_spec.rb +8 -0
- data/data/ruby-advisory-db/spec/spec_helper.rb +1 -0
- data/gemspec.yml +4 -7
- data/lib/bundler/audit/advisory.rb +51 -9
- data/lib/bundler/audit/cli.rb +33 -12
- data/lib/bundler/audit/database.rb +1 -30
- data/lib/bundler/audit/scanner.rb +97 -0
- data/lib/bundler/audit/version.rb +1 -1
- data/spec/advisory_spec.rb +67 -7
- data/spec/bundle/insecure_sources/Gemfile +39 -0
- data/spec/bundle/secure/Gemfile +38 -0
- data/spec/database_spec.rb +1 -32
- data/spec/integration_spec.rb +132 -0
- data/spec/scanner_spec.rb +74 -0
- data/spec/spec_helper.rb +14 -1
- metadata +89 -74
- data/LICENSE.txt +0 -20
- data/spec/bundle/Gemfile.lock +0 -92
- /data/spec/bundle/{Gemfile → unpatched_gems/Gemfile} +0 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 0a34b6a79c055b51422c7c3225428947ca6b587e
|
|
4
|
+
data.tar.gz: 724414726507e87d679a561759e9dcbdd90aecfc
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: b3c59aadb9c0f2ed1b8d3a91bf6866e54295ed78105531ff1362c5ef65f264ac02699c53d3e8e3d08f025ebc9e38ef5917de4fa9906b66e2e209131a14665e42
|
|
7
|
+
data.tar.gz: f82127fe64b6bb856483ee82f5ab642fee371d4c84695e05beef44414857e4c95dd7f5a1e27244af9b2c81e9364a16027bb333ab123a547ab1a9bf6654a5f3df
|
data/.document
CHANGED
data/.gitignore
CHANGED
data/.gitmodules
ADDED
data/.travis.yml
ADDED
data/ChangeLog.md
CHANGED
|
@@ -1,3 +1,50 @@
|
|
|
1
|
+
### 0.2.0 / 2013-03-05
|
|
2
|
+
|
|
3
|
+
* Require RubyGems >= 1.8.0. Prior versions of RubyGems could not correctly
|
|
4
|
+
parse approximate version requirements (`~> 1.2.3`).
|
|
5
|
+
* Updated the [ruby-advisory-db].
|
|
6
|
+
* Added {Bundle::Audit::Advisory#unaffected_versions}.
|
|
7
|
+
* Added {Bundle::Audit::Advisory#unaffected?}.
|
|
8
|
+
* Added {Bundle::Audit::Advisory#patched?}.
|
|
9
|
+
* Renamed `Advisory#cve` to {Bundle::Audit::Advisory#id}.
|
|
10
|
+
|
|
11
|
+
### 0.1.2 / 2013-02-17
|
|
12
|
+
|
|
13
|
+
* Require [bundler] ~> 1.2.
|
|
14
|
+
* Vendor a full copy of the [ruby-advisory-db].
|
|
15
|
+
* Added {Bundler::Audit::Advisory#path} for debugging purposes.
|
|
16
|
+
* Added {Bundler::Audit::Advisory#to_s} for debugging purposes.
|
|
17
|
+
|
|
18
|
+
#### CLI
|
|
19
|
+
|
|
20
|
+
* Simply parse the `Gemfile.lock` instead of loading the bundle (@grosser).
|
|
21
|
+
* Exit with non-zero status on failure (@grosser).
|
|
22
|
+
|
|
23
|
+
### 0.1.1 / 2013-02-12
|
|
24
|
+
|
|
25
|
+
* Fixed a Ruby 1.8 syntax error.
|
|
26
|
+
|
|
27
|
+
### Advisories
|
|
28
|
+
|
|
29
|
+
* Imported advisories from the [Ruby Advisory DB][ruby-advisory-db].
|
|
30
|
+
* [CVE-2011-0739](http://www.osvdb.org/show/osvdb/70667)
|
|
31
|
+
* [CVE-2012-2139](http://www.osvdb.org/show/osvdb/81631)
|
|
32
|
+
* [CVE-2012-2140](http://www.osvdb.org/show/osvdb/81632)
|
|
33
|
+
* [CVE-2012-267](http://osvdb.org/83077)
|
|
34
|
+
* [CVE-2012-1098](http://osvdb.org/79726)
|
|
35
|
+
* [CVE-2012-1099](http://www.osvdb.org/show/osvdb/79727)
|
|
36
|
+
* [CVE-2012-2660](http://www.osvdb.org/show/osvdb/82610)
|
|
37
|
+
* [CVE-2012-2661](http://www.osvdb.org/show/osvdb/82403)
|
|
38
|
+
* [CVE-2012-3424](http://www.osvdb.org/show/osvdb/84243)
|
|
39
|
+
* [CVE-2012-3463](http://osvdb.org/84515)
|
|
40
|
+
* [CVE-2012-3464](http://www.osvdb.org/show/osvdb/84516)
|
|
41
|
+
* [CVE-2012-3465](http://www.osvdb.org/show/osvdb/84513)
|
|
42
|
+
|
|
43
|
+
### CLI
|
|
44
|
+
|
|
45
|
+
* If the advisory has no `patched_versions`, recommend removing or disabling
|
|
46
|
+
the gem until a patch is made available.
|
|
47
|
+
|
|
1
48
|
### 0.1.0 / 2013-02-11
|
|
2
49
|
|
|
3
50
|
* Initial release:
|
|
@@ -14,3 +61,6 @@
|
|
|
14
61
|
* [CVE-2013-0276](http://direct.osvdb.org/show/osvdb/90072)
|
|
15
62
|
* [CVE-2013-0277](http://direct.osvdb.org/show/osvdb/90073)
|
|
16
63
|
* [CVE-2013-0333](http://osvdb.org/show/osvdb/89594)
|
|
64
|
+
|
|
65
|
+
[bundler]: http://gembundler.com/
|
|
66
|
+
[ruby-advisory-db]: https://github.com/rubysec/ruby-advisory-db#readme
|
data/Gemfile
ADDED
data/README.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# bundler-audit
|
|
2
2
|
|
|
3
|
-
* [Homepage](https://github.com/
|
|
4
|
-
* [Issues](https://github.com/
|
|
3
|
+
* [Homepage](https://github.com/rubysec/bundler-audit#readme)
|
|
4
|
+
* [Issues](https://github.com/rubysec/bundler-audit/issues)
|
|
5
5
|
* [Documentation](http://rubydoc.info/gems/bundler-audit/frames)
|
|
6
|
-
* [Email](mailto:
|
|
6
|
+
* [Email](mailto:rubysec.mod3 at gmail.com)
|
|
7
|
+
* [](https://travis-ci.org/rubysec/bundler-audit)
|
|
8
|
+
* [](https://codeclimate.com/github/rubysec/bundler-audit)
|
|
7
9
|
|
|
8
10
|
## Description
|
|
9
11
|
|
|
@@ -12,6 +14,8 @@ Patch-level verification for [Bundler][bundler].
|
|
|
12
14
|
## Features
|
|
13
15
|
|
|
14
16
|
* Checks for vulnerable versions of gems in `Gemfile.lock`.
|
|
17
|
+
* Checks for insecure gem sources (`http://`).
|
|
18
|
+
* Allows ignoring certain advisories that have been manually worked around.
|
|
15
19
|
* Prints advisory information.
|
|
16
20
|
* Does not require a network connection.
|
|
17
21
|
|
|
@@ -19,94 +23,72 @@ Patch-level verification for [Bundler][bundler].
|
|
|
19
23
|
|
|
20
24
|
Audit a projects `Gemfile.lock`:
|
|
21
25
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
Patched Versions: ~> 1.1.6, ~> 1.2.8, ~> 1.3.10, ~> 1.4.5, >= 1.5.2
|
|
26
|
+
Name: actionpack
|
|
27
|
+
Version: 3.2.10
|
|
28
|
+
Advisory: OSVDB-91452
|
|
29
|
+
Criticality: Medium
|
|
30
|
+
URL: http://www.osvdb.org/show/osvdb/91452
|
|
31
|
+
Title: XSS vulnerability in sanitize_css in Action Pack
|
|
32
|
+
Solution: upgrade to ~> 2.3.18, ~> 3.1.12, >= 3.2.13
|
|
30
33
|
|
|
31
|
-
Name:
|
|
32
|
-
Version:
|
|
33
|
-
|
|
34
|
-
Criticality:
|
|
35
|
-
URL: http://
|
|
36
|
-
Title:
|
|
37
|
-
|
|
34
|
+
Name: actionpack
|
|
35
|
+
Version: 3.2.10
|
|
36
|
+
Advisory: OSVDB-91454
|
|
37
|
+
Criticality: Medium
|
|
38
|
+
URL: http://osvdb.org/show/osvdb/91454
|
|
39
|
+
Title: XSS Vulnerability in the `sanitize` helper of Ruby on Rails
|
|
40
|
+
Solution: upgrade to ~> 2.3.18, ~> 3.1.12, >= 3.2.13
|
|
38
41
|
|
|
39
|
-
Name:
|
|
42
|
+
Name: actionpack
|
|
40
43
|
Version: 3.2.10
|
|
41
|
-
|
|
44
|
+
Advisory: OSVDB-89026
|
|
42
45
|
Criticality: High
|
|
43
|
-
URL: http://osvdb.org/show/osvdb/
|
|
44
|
-
Title: Ruby on Rails
|
|
45
|
-
|
|
46
|
+
URL: http://osvdb.org/show/osvdb/89026
|
|
47
|
+
Title: Ruby on Rails params_parser.rb Action Pack Type Casting Parameter Parsing Remote Code Execution
|
|
48
|
+
Solution: upgrade to ~> 2.3.15, ~> 3.0.19, ~> 3.1.10, >= 3.2.11
|
|
46
49
|
|
|
47
|
-
Name:
|
|
50
|
+
Name: activerecord
|
|
48
51
|
Version: 3.2.10
|
|
49
|
-
|
|
52
|
+
Advisory: OSVDB-91453
|
|
50
53
|
Criticality: High
|
|
51
|
-
URL: http://osvdb.org/show/osvdb/
|
|
52
|
-
Title:
|
|
53
|
-
|
|
54
|
-
Patched Versions: ~> 2.3.15, ~> 3.0.19, ~> 3.1.10, >= 3.2.11
|
|
54
|
+
URL: http://osvdb.org/show/osvdb/91453
|
|
55
|
+
Title: Symbol DoS vulnerability in Active Record
|
|
56
|
+
Solution: upgrade to ~> 2.3.18, ~> 3.1.12, >= 3.2.13
|
|
55
57
|
|
|
56
|
-
Name:
|
|
58
|
+
Name: activerecord
|
|
57
59
|
Version: 3.2.10
|
|
58
|
-
|
|
60
|
+
Advisory: OSVDB-90072
|
|
59
61
|
Criticality: Medium
|
|
60
62
|
URL: http://direct.osvdb.org/show/osvdb/90072
|
|
61
63
|
Title: Ruby on Rails Active Record attr_protected Method Bypass
|
|
62
|
-
|
|
64
|
+
Solution: upgrade to ~> 2.3.17, ~> 3.1.11, >= 3.2.12
|
|
65
|
+
|
|
66
|
+
Name: activerecord
|
|
67
|
+
Version: 3.2.10
|
|
68
|
+
Advisory: OSVDB-89025
|
|
69
|
+
Criticality: High
|
|
70
|
+
URL: http://osvdb.org/show/osvdb/89025
|
|
71
|
+
Title: Ruby on Rails Active Record JSON Parameter Parsing Query Bypass
|
|
72
|
+
Solution: upgrade to ~> 2.3.16, ~> 3.0.19, ~> 3.1.10, >= 3.2.11
|
|
73
|
+
|
|
74
|
+
Name: activesupport
|
|
75
|
+
Version: 3.2.10
|
|
76
|
+
Advisory: OSVDB-91451
|
|
77
|
+
Criticality: High
|
|
78
|
+
URL: http://www.osvdb.org/show/osvdb/91451
|
|
79
|
+
Title: XML Parsing Vulnerability affecting JRuby users
|
|
80
|
+
Solution: upgrade to ~> 3.1.12, >= 3.2.13
|
|
63
81
|
|
|
64
82
|
Unpatched versions found!
|
|
65
83
|
|
|
66
84
|
## Requirements
|
|
67
85
|
|
|
68
|
-
* [bundler] ~> 1.
|
|
86
|
+
* [bundler] ~> 1.2
|
|
69
87
|
|
|
70
88
|
## Install
|
|
71
89
|
|
|
72
90
|
$ gem install bundler-audit
|
|
73
91
|
|
|
74
|
-
## Contributing Advisories
|
|
75
|
-
|
|
76
|
-
For an advisory to be added to the Database, it must match the following
|
|
77
|
-
format:
|
|
78
|
-
|
|
79
|
-
* Must be a YAML file.
|
|
80
|
-
* Must be placed in the `data/bundler/audit/$gem/` directory.
|
|
81
|
-
* Must be named after the CVE number (`2013-0156.yml`):
|
|
82
|
-
* Must contain a URL to the [OSVDB] advisory.
|
|
83
|
-
* Must contain the `title` and `description`.
|
|
84
|
-
* Must contain the `title` and `description`.
|
|
85
|
-
* Must contain the CVSSv2 Score.
|
|
86
|
-
* Must contain the patched versions ranges.
|
|
87
|
-
|
|
88
|
-
### Example
|
|
89
|
-
|
|
90
|
-
---
|
|
91
|
-
url: http://osvdb.org/show/osvdb/89026
|
|
92
|
-
title: |
|
|
93
|
-
Ruby on Rails params_parser.rb Action Pack Type Casting Parameter Parsing
|
|
94
|
-
Remote Code Execution
|
|
95
|
-
|
|
96
|
-
description: |
|
|
97
|
-
Ruby on Rails contains a flaw in params_parser.rb of the Action Pack.
|
|
98
|
-
The issue is triggered when a type casting error occurs during the parsing
|
|
99
|
-
of parameters. This may allow a remote attacker to potentially execute
|
|
100
|
-
arbitrary code.
|
|
101
|
-
|
|
102
|
-
cvss_v2: 10.0
|
|
103
|
-
|
|
104
|
-
patched_versions:
|
|
105
|
-
- "~> 2.3.15"
|
|
106
|
-
- "~> 3.0.19"
|
|
107
|
-
- "~> 3.1.10"
|
|
108
|
-
- ">= 3.2.11"
|
|
109
|
-
|
|
110
92
|
## License
|
|
111
93
|
|
|
112
94
|
Copyright (c) 2013 Hal Brodigan (postmodern.mod3 at gmail.com)
|
data/Rakefile
CHANGED
|
@@ -1,40 +1,56 @@
|
|
|
1
1
|
# encoding: utf-8
|
|
2
2
|
|
|
3
3
|
require 'rubygems'
|
|
4
|
-
require 'rake'
|
|
5
4
|
|
|
6
5
|
begin
|
|
7
|
-
|
|
8
|
-
require 'rubygems/tasks'
|
|
9
|
-
|
|
10
|
-
Gem::Tasks.new
|
|
6
|
+
require 'bundler'
|
|
11
7
|
rescue LoadError => e
|
|
12
8
|
warn e.message
|
|
13
|
-
warn "Run `gem install
|
|
9
|
+
warn "Run `gem install bundler` to install Bundler."
|
|
10
|
+
exit -1
|
|
14
11
|
end
|
|
15
12
|
|
|
16
13
|
begin
|
|
17
|
-
|
|
18
|
-
|
|
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
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
require 'rake'
|
|
22
|
+
|
|
23
|
+
require 'rubygems/tasks'
|
|
24
|
+
Gem::Tasks.new
|
|
25
|
+
|
|
26
|
+
desc 'Updates data/ruby-advisory-db'
|
|
27
|
+
task :update do
|
|
28
|
+
chdir 'data/ruby-advisory-db' do
|
|
29
|
+
sh 'git', 'pull', 'origin', 'master'
|
|
24
30
|
end
|
|
31
|
+
|
|
32
|
+
sh 'git', 'commit', 'data/ruby-advisory-db', '-m', 'Updated ruby-advisory-db'
|
|
25
33
|
end
|
|
26
34
|
|
|
27
|
-
|
|
28
|
-
|
|
35
|
+
require 'rspec/core/rake_task'
|
|
36
|
+
RSpec::Core::RakeTask.new
|
|
29
37
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
38
|
+
namespace :spec do
|
|
39
|
+
task :bundle do
|
|
40
|
+
root = 'spec/bundle'
|
|
33
41
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
42
|
+
%w[secure unpatched_gems insecure_sources].each do |bundle|
|
|
43
|
+
chdir(File.join(root,bundle)) do
|
|
44
|
+
sh 'BUNDLE_BIN_PATH="" BUNDLE_GEMFILE="" RUBYOPT="" bundle install --path ../../../vendor/bundle'
|
|
45
|
+
end
|
|
46
|
+
end
|
|
38
47
|
end
|
|
39
48
|
end
|
|
49
|
+
task :spec => 'spec:bundle'
|
|
50
|
+
|
|
51
|
+
task :test => :spec
|
|
52
|
+
task :default => :spec
|
|
53
|
+
|
|
54
|
+
require 'yard'
|
|
55
|
+
YARD::Rake::YardocTask.new
|
|
40
56
|
task :doc => :yard
|
data/bin/bundle-audit
CHANGED
|
@@ -2,18 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
require 'rubygems'
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Dir.chdir(root) do
|
|
8
|
-
begin
|
|
9
|
-
require 'bundler/setup'
|
|
10
|
-
rescue LoadError => e
|
|
11
|
-
warn e.message
|
|
12
|
-
warn "Run `gem install bundler` to install Bundler"
|
|
13
|
-
exit -1
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
5
|
+
lib_dir = File.expand_path(File.join(File.dirname(__FILE__),'..','lib'))
|
|
6
|
+
$LOAD_PATH << lib_dir unless $LOAD_PATH.include?(lib_dir)
|
|
17
7
|
|
|
18
8
|
require 'bundler/audit/cli'
|
|
19
9
|
|
data/bundler-audit.gemspec
CHANGED
|
@@ -26,6 +26,13 @@ Gem::Specification.new do |gem|
|
|
|
26
26
|
gem.files = `git ls-files`.split($/)
|
|
27
27
|
gem.files = glob[gemspec['files']] if gemspec['files']
|
|
28
28
|
|
|
29
|
+
# add paths from data/ruby-advisory-db/
|
|
30
|
+
gem.files += Dir.chdir('data/ruby-advisory-db') do
|
|
31
|
+
`git ls-files`.split($/).map do |sub_path|
|
|
32
|
+
File.join('data','ruby-advisory-db',sub_path)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
29
36
|
gem.executables = gemspec.fetch('executables') do
|
|
30
37
|
glob['bin/*'].map { |path| File.basename(path) }
|
|
31
38
|
end
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
--colour
|
|
@@ -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,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
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
gem: actionpack
|
|
3
|
+
framework: rails
|
|
4
|
+
cve: 2012-3465
|
|
5
|
+
osvdb: 84513
|
|
6
|
+
url: http://www.osvdb.org/show/osvdb/84513
|
|
7
|
+
title: Ruby on Rails strip_tags Helper Method XSS
|
|
8
|
+
date: 2012-08-09
|
|
9
|
+
|
|
10
|
+
description: |
|
|
11
|
+
Ruby on Rails contains a flaw that allows a remote cross-site scripting (XSS)
|
|
12
|
+
attack. This flaw exists because the application does not validate input
|
|
13
|
+
passed via the 'strip_tags' helper method before returning it to the user.
|
|
14
|
+
This may allow a user to create a specially crafted request that would
|
|
15
|
+
execute arbitrary script code in a user's browser within the trust
|
|
16
|
+
relationship between their browser and the server.
|
|
17
|
+
|
|
18
|
+
cvss_v2: 4.3
|
|
19
|
+
|
|
20
|
+
patched_versions:
|
|
21
|
+
- ~> 3.0.17
|
|
22
|
+
- ~> 3.1.8
|
|
23
|
+
- ">= 3.2.8"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
gem: actionpack
|
|
3
|
+
framework: rails
|
|
4
|
+
cve: 2012-3463
|
|
5
|
+
osvdb: 84515
|
|
6
|
+
url: http://osvdb.org/84515
|
|
7
|
+
title: Ruby on Rails select_tag Helper Method prompt Value XSS
|
|
8
|
+
date: 2012-08-09
|
|
9
|
+
|
|
10
|
+
description: |
|
|
11
|
+
Ruby on Rails contains a flaw that allows a remote cross-site scripting (XSS)
|
|
12
|
+
attack. This flaw exists because input passed via the prompt value is not
|
|
13
|
+
properly sanitized by the select_tag helper method before returning it to
|
|
14
|
+
the user. This may allow a user to create a specially crafted request that
|
|
15
|
+
would execute arbitrary script code in a user's browser within the trust
|
|
16
|
+
relationship between their browser and the server.
|
|
17
|
+
|
|
18
|
+
cvss_v2: 4.3
|
|
19
|
+
|
|
20
|
+
unaffected_versions:
|
|
21
|
+
- ~> 2.3.0
|
|
22
|
+
|
|
23
|
+
patched_versions:
|
|
24
|
+
- ~> 3.0.17
|
|
25
|
+
- ~> 3.1.8
|
|
26
|
+
- ">= 3.2.8"
|
data/data/{bundler/audit/rails/2013-0156.yml → ruby-advisory-db/gems/actionpack/OSVDB-89026.yml}
RENAMED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
---
|
|
1
|
+
---
|
|
2
|
+
gem: actionpack
|
|
3
|
+
framework: rails
|
|
4
|
+
cve: 2013-0156
|
|
5
|
+
osvdb: 89026
|
|
2
6
|
url: http://osvdb.org/show/osvdb/89026
|
|
3
|
-
title:
|
|
7
|
+
title:
|
|
4
8
|
Ruby on Rails params_parser.rb Action Pack Type Casting Parameter Parsing
|
|
5
9
|
Remote Code Execution
|
|
10
|
+
date: 2013-01-08
|
|
6
11
|
|
|
7
12
|
description: |
|
|
8
13
|
Ruby on Rails contains a flaw in params_parser.rb of the Action Pack.
|
|
@@ -12,7 +17,7 @@ description: |
|
|
|
12
17
|
|
|
13
18
|
cvss_v2: 10.0
|
|
14
19
|
|
|
15
|
-
patched_versions:
|
|
20
|
+
patched_versions:
|
|
16
21
|
- ~> 2.3.15
|
|
17
22
|
- ~> 3.0.19
|
|
18
23
|
- ~> 3.1.10
|