bundler-leak 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +3 -0
- data/.gitignore +11 -0
- data/.gitmodules +3 -0
- data/.rspec +1 -0
- data/.travis.yml +13 -0
- data/.yardopts +1 -0
- data/COPYING.txt +674 -0
- data/ChangeLog.md +125 -0
- data/Gemfile +15 -0
- data/README.md +118 -0
- data/Rakefile +57 -0
- data/bin/bundle-leak +10 -0
- data/bin/bundler-leak +3 -0
- data/bundler-leak.gemspec +67 -0
- data/data/ruby-mem-advisory-db.ts +1 -0
- data/data/ruby-mem-advisory-db/.gitignore +1 -0
- data/data/ruby-mem-advisory-db/.rspec +1 -0
- data/data/ruby-mem-advisory-db/.travis.yml +12 -0
- data/data/ruby-mem-advisory-db/CONTRIBUTING.md +69 -0
- data/data/ruby-mem-advisory-db/CONTRIBUTORS.md +40 -0
- data/data/ruby-mem-advisory-db/Gemfile +9 -0
- data/data/ruby-mem-advisory-db/LICENSE.txt +5 -0
- data/data/ruby-mem-advisory-db/README.md +72 -0
- data/data/ruby-mem-advisory-db/Rakefile +26 -0
- data/data/ruby-mem-advisory-db/gems/celluloid/670.yml +10 -0
- data/data/ruby-mem-advisory-db/gems/grape/301.yml +9 -0
- data/data/ruby-mem-advisory-db/gems/oj/229.yml +9 -0
- data/data/ruby-mem-advisory-db/gems/redcarpet/516.yml +12 -0
- data/data/ruby-mem-advisory-db/gems/redis/612.yml +9 -0
- data/data/ruby-mem-advisory-db/gems/sidekiq-statistic/73.yml +9 -0
- data/data/ruby-mem-advisory-db/gems/sidekiq/2598.yml +9 -0
- data/data/ruby-mem-advisory-db/gems/therubyracer/336.yml +13 -0
- data/data/ruby-mem-advisory-db/gems/zipruby/PRE-SA-2012-02.yml +9 -0
- data/data/ruby-mem-advisory-db/scripts/post-advisories.sh +18 -0
- data/data/ruby-mem-advisory-db/spec/advisories_spec.rb +23 -0
- data/data/ruby-mem-advisory-db/spec/advisory_example.rb +209 -0
- data/data/ruby-mem-advisory-db/spec/gem_example.rb +37 -0
- data/data/ruby-mem-advisory-db/spec/library_example.rb +21 -0
- data/data/ruby-mem-advisory-db/spec/ruby_example.rb +22 -0
- data/data/ruby-mem-advisory-db/spec/spec_helper.rb +1 -0
- data/gemspec.yml +14 -0
- data/lib/bundler/plumber.rb +20 -0
- data/lib/bundler/plumber/advisory.rb +119 -0
- data/lib/bundler/plumber/cli.rb +135 -0
- data/lib/bundler/plumber/database.rb +249 -0
- data/lib/bundler/plumber/scanner.rb +133 -0
- data/lib/bundler/plumber/task.rb +49 -0
- data/lib/bundler/plumber/version.rb +24 -0
- data/spec/advisory_spec.rb +155 -0
- data/spec/audit_spec.rb +8 -0
- data/spec/bundle/insecure_sources/Gemfile +39 -0
- data/spec/bundle/secure/Gemfile +38 -0
- data/spec/bundle/unpatched_gems/Gemfile +39 -0
- data/spec/cli_spec.rb +99 -0
- data/spec/database_spec.rb +138 -0
- data/spec/fixtures/not_a_hash.yml +2 -0
- data/spec/integration_spec.rb +68 -0
- data/spec/scanner_spec.rb +61 -0
- data/spec/spec_helper.rb +62 -0
- metadata +141 -0
data/ChangeLog.md
ADDED
@@ -0,0 +1,125 @@
|
|
1
|
+
### 0.6.0 / 2017-07-18
|
2
|
+
|
3
|
+
* Added `--quiet` option to `check` and `update` commands (@jaredbeck).
|
4
|
+
* Added `bin/bundler-audit` which will be executed when `bundle audit` is ran
|
5
|
+
(@vassilevsky).
|
6
|
+
|
7
|
+
### 0.5.0 / 2016-02-28
|
8
|
+
|
9
|
+
* Added {Bundler::Audit::Task}.
|
10
|
+
* Added {Bundler::Audit::Advisory#date}.
|
11
|
+
* Added {Bundler::Audit::Advisory#cve_id}.
|
12
|
+
* Added {Bundler::Audit::Advisory#osvdb_id}.
|
13
|
+
* Allow insecure gem sources (`http://` and `git://`), if they are hosted on a
|
14
|
+
private network.
|
15
|
+
|
16
|
+
#### CLI
|
17
|
+
|
18
|
+
* Added the `--update` option to `bundle-audit check`.
|
19
|
+
* `bundle-audit update` now returns a non-zero exit status on error.
|
20
|
+
* `bundle-audit update` only updates `~/.local/share/ruby-advisory-db`, if it is a git
|
21
|
+
repository.
|
22
|
+
|
23
|
+
### 0.4.0 / 2015-06-30
|
24
|
+
|
25
|
+
* Require ruby >= 1.9.3 due to i18n gem deprecating < 1.9.3.
|
26
|
+
* Added {Bundler::Audit::Advisory#osvdb}.
|
27
|
+
* Resolve the IP addresses of gem sources and ignore intranet gem sources.
|
28
|
+
(PR #90)
|
29
|
+
* Use ISO8601 date format when querying the git timestamp of ruby-advisory-db.
|
30
|
+
(PR #92)
|
31
|
+
|
32
|
+
#### CLI
|
33
|
+
|
34
|
+
* Print the CVE or OSVDB id.
|
35
|
+
* No longer print "Unpatched versions found!" when an insecure gem source
|
36
|
+
is detected. (PR #84)
|
37
|
+
|
38
|
+
### 0.3.1 / 2014-04-20
|
39
|
+
|
40
|
+
* Added thor ~> 0.18 as a dependency.
|
41
|
+
* No longer rely on the vendored version of thor within bundler.
|
42
|
+
* Store the timestamp of when `data/ruby-advisory-db` was last updated in
|
43
|
+
`data/ruby-advisory-db.ts`.
|
44
|
+
* Use `data/ruby-advisory-db.ts` instead of the creation time of the
|
45
|
+
`dataruby-advisory-db` directory, which is always the install time
|
46
|
+
of the rubygem.
|
47
|
+
|
48
|
+
### 0.3.0 / 2013-10-31
|
49
|
+
|
50
|
+
* Added {Bundler::Audit::Database.update!} which uses `git` to download
|
51
|
+
[ruby-advisory-db] to `~/.local/share/ruby-advisory-db`.
|
52
|
+
* {Bundler::Audit::Database.path} now returns the path to either
|
53
|
+
`~/.local/share/ruby-advisory-db` or the vendored copy, depending on which
|
54
|
+
is more recent.
|
55
|
+
|
56
|
+
#### CLI
|
57
|
+
|
58
|
+
* Added the `bundle-audit update` sub-command.
|
59
|
+
|
60
|
+
### 0.2.0 / 2013-03-05
|
61
|
+
|
62
|
+
* Require RubyGems >= 1.8.0. Prior versions of RubyGems could not correctly
|
63
|
+
parse approximate version requirements (`~> 1.2.3`).
|
64
|
+
* Updated the [ruby-advisory-db].
|
65
|
+
* Added {Bundler::Audit::Advisory#unaffected_versions}.
|
66
|
+
* Added {Bundler::Audit::Advisory#unaffected?}.
|
67
|
+
* Added {Bundler::Audit::Advisory#patched?}.
|
68
|
+
* Renamed `Advisory#cve` to {Bundler::Audit::Advisory#id}.
|
69
|
+
|
70
|
+
### 0.1.2 / 2013-02-17
|
71
|
+
|
72
|
+
* Require [bundler] ~> 1.2.
|
73
|
+
* Vendor a full copy of the [ruby-advisory-db].
|
74
|
+
* Added {Bundler::Audit::Advisory#path} for debugging purposes.
|
75
|
+
* Added {Bundler::Audit::Advisory#to_s} for debugging purposes.
|
76
|
+
|
77
|
+
#### CLI
|
78
|
+
|
79
|
+
* Simply parse the `Gemfile.lock` instead of loading the bundle (@grosser).
|
80
|
+
* Exit with non-zero status on failure (@grosser).
|
81
|
+
|
82
|
+
### 0.1.1 / 2013-02-12
|
83
|
+
|
84
|
+
* Fixed a Ruby 1.8 syntax error.
|
85
|
+
|
86
|
+
### Advisories
|
87
|
+
|
88
|
+
* Imported advisories from the [Ruby Advisory DB][ruby-advisory-db].
|
89
|
+
* [CVE-2011-0739](http://www.osvdb.org/show/osvdb/70667)
|
90
|
+
* [CVE-2012-2139](http://www.osvdb.org/show/osvdb/81631)
|
91
|
+
* [CVE-2012-2140](http://www.osvdb.org/show/osvdb/81632)
|
92
|
+
* [CVE-2012-267](http://osvdb.org/83077)
|
93
|
+
* [CVE-2012-1098](http://osvdb.org/79726)
|
94
|
+
* [CVE-2012-1099](http://www.osvdb.org/show/osvdb/79727)
|
95
|
+
* [CVE-2012-2660](http://www.osvdb.org/show/osvdb/82610)
|
96
|
+
* [CVE-2012-2661](http://www.osvdb.org/show/osvdb/82403)
|
97
|
+
* [CVE-2012-3424](http://www.osvdb.org/show/osvdb/84243)
|
98
|
+
* [CVE-2012-3463](http://osvdb.org/84515)
|
99
|
+
* [CVE-2012-3464](http://www.osvdb.org/show/osvdb/84516)
|
100
|
+
* [CVE-2012-3465](http://www.osvdb.org/show/osvdb/84513)
|
101
|
+
|
102
|
+
### CLI
|
103
|
+
|
104
|
+
* If the advisory has no `patched_versions`, recommend removing or disabling
|
105
|
+
the gem until a patch is made available.
|
106
|
+
|
107
|
+
### 0.1.0 / 2013-02-11
|
108
|
+
|
109
|
+
* Initial release:
|
110
|
+
* Checks for vulnerable versions of gems in `Gemfile.lock`.
|
111
|
+
* Prints advisory information.
|
112
|
+
* Does not require a network connection.
|
113
|
+
|
114
|
+
#### Advisories
|
115
|
+
|
116
|
+
* [CVE-2013-0269](http://direct.osvdb.org/show/osvdb/90074)
|
117
|
+
* [CVE-2013-0263](http://osvdb.org/show/osvdb/89939)
|
118
|
+
* [CVE-2013-0155](http://osvdb.org/show/osvdb/89025)
|
119
|
+
* [CVE-2013-0156](http://osvdb.org/show/osvdb/89026)
|
120
|
+
* [CVE-2013-0276](http://direct.osvdb.org/show/osvdb/90072)
|
121
|
+
* [CVE-2013-0277](http://direct.osvdb.org/show/osvdb/90073)
|
122
|
+
* [CVE-2013-0333](http://osvdb.org/show/osvdb/89594)
|
123
|
+
|
124
|
+
[bundler]: http://gembundler.com/
|
125
|
+
[ruby-advisory-db]: https://github.com/rubysec/ruby-advisory-db#readme
|
data/Gemfile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
source 'https://rubygems.org/'
|
2
|
+
|
3
|
+
gemspec
|
4
|
+
|
5
|
+
group :development do
|
6
|
+
gem 'rake'
|
7
|
+
gem 'kramdown', '~> 0.14'
|
8
|
+
|
9
|
+
gem 'rubygems-tasks', '~> 0.2'
|
10
|
+
gem 'rspec', '~> 3.0'
|
11
|
+
gem 'yard', '~> 0.9'
|
12
|
+
gem 'simplecov', '~> 0.7', :require => false
|
13
|
+
end
|
14
|
+
|
15
|
+
gem "byebug", "~> 11.0", :groups => [:development, :test]
|
data/README.md
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
# bundler-leak
|
2
|
+
|
3
|
+
* [Homepage](https://github.com/rubymem/bundler-leak#readme)
|
4
|
+
* [Issues](https://github.com/rubymem/bundler-leak/issues)
|
5
|
+
* [Documentation](http://rubydoc.info/gems/bundler-leak/frames)
|
6
|
+
* [Email](mailto:hello at ombulabs.com)
|
7
|
+
* [![Build Status](https://travis-ci.org/rubymem/bundler-leak.svg?branch=master)](https://travis-ci.org/rubymem/bundler-leak)
|
8
|
+
* [![Code Climate](https://codeclimate.com/github/rubymem/bundler-leak.svg)](https://codeclimate.com/github/rubymem/bundler-leak)
|
9
|
+
|
10
|
+
## Description
|
11
|
+
|
12
|
+
Patch-level verification for [bundler].
|
13
|
+
|
14
|
+
## Features
|
15
|
+
|
16
|
+
* Checks for memory leaks of gems in `Gemfile.lock`.
|
17
|
+
* Prints memory leak information.
|
18
|
+
* Does not require a network connection.
|
19
|
+
|
20
|
+
## Synopsis
|
21
|
+
|
22
|
+
Audit a project's `Gemfile.lock`:
|
23
|
+
|
24
|
+
```shell
|
25
|
+
$ bundle leak
|
26
|
+
|
27
|
+
Name: celluloid
|
28
|
+
Version: 0.17.0
|
29
|
+
URL: https://github.com/celluloid/celluloid/issues/670
|
30
|
+
Title: Memory Leak using Celluloid::Future
|
31
|
+
Solution: remove or disable this gem until a patch is available!
|
32
|
+
|
33
|
+
Name: therubyracer
|
34
|
+
Version: 0.12.1
|
35
|
+
URL: https://github.com/cowboyd/therubyracer/pull/336
|
36
|
+
Title: Memory leak in WeakValueMap
|
37
|
+
Solution: upgrade to ~> 0.12.3
|
38
|
+
|
39
|
+
Unpatched versions found!
|
40
|
+
```
|
41
|
+
|
42
|
+
Update the [ruby-mem-advisory-db] that `bundle leak` uses:
|
43
|
+
|
44
|
+
```shell
|
45
|
+
$ bundle leak update
|
46
|
+
|
47
|
+
cd data/ruby-mem-advisory-db
|
48
|
+
git pull origin master
|
49
|
+
remote: Enumerating objects: 14, done.
|
50
|
+
remote: Counting objects: 100% (14/14), done.
|
51
|
+
remote: Compressing objects: 100% (4/4), done.
|
52
|
+
remote: Total 9 (delta 5), reused 7 (delta 4), pack-reused 0
|
53
|
+
Unpacking objects: 100% (9/9), done.
|
54
|
+
From github.com:rubymem/ruby-mem-advisory-db
|
55
|
+
* branch master -> FETCH_HEAD
|
56
|
+
3254525..c4fc78e master -> origin/master
|
57
|
+
Updating 3254525..c4fc78e
|
58
|
+
Fast-forward
|
59
|
+
README.md | 68 ++++++++++++++++++++------------------------------------------------
|
60
|
+
gems/therubyracer/336.yml | 4 ++++
|
61
|
+
2 files changed, 24 insertions(+), 48 deletions(-)
|
62
|
+
```
|
63
|
+
|
64
|
+
Update the [ruby-mem-advisory-db] and check `Gemfile.lock` (useful for CI runs):
|
65
|
+
|
66
|
+
$ bundle leak check --update
|
67
|
+
|
68
|
+
Rake task:
|
69
|
+
|
70
|
+
```ruby
|
71
|
+
require 'bundler/plumber/task'
|
72
|
+
Bundler::Plumber::Task.new
|
73
|
+
|
74
|
+
task default: 'bundle:leak'
|
75
|
+
```
|
76
|
+
|
77
|
+
## Requirements
|
78
|
+
|
79
|
+
* [ruby] >= 1.9.3
|
80
|
+
* [rubygems] >= 1.8
|
81
|
+
* [thor] ~> 0.18
|
82
|
+
* [bundler] ~> 1.2
|
83
|
+
|
84
|
+
## Install
|
85
|
+
|
86
|
+
$ gem install bundler-leak
|
87
|
+
|
88
|
+
## Contributing
|
89
|
+
|
90
|
+
1. Clone the repo
|
91
|
+
1. `git submodule update --init` # To populate data dir.
|
92
|
+
1. `bundle exec rake`
|
93
|
+
|
94
|
+
## License
|
95
|
+
|
96
|
+
Copyright (c) 2019 Ombulabs (hello at ombulabs.com)
|
97
|
+
|
98
|
+
Copyright (c) 2013-2016 Hal Brodigan (postmodern.mod3 at gmail.com)
|
99
|
+
|
100
|
+
bundler-leak is free software: you can redistribute it and/or modify
|
101
|
+
it under the terms of the GNU General Public License as published by
|
102
|
+
the Free Software Foundation, either version 3 of the License, or
|
103
|
+
(at your option) any later version.
|
104
|
+
|
105
|
+
bundler-leak is distributed in the hope that it will be useful,
|
106
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
107
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
108
|
+
GNU General Public License for more details.
|
109
|
+
|
110
|
+
You should have received a copy of the GNU General Public License
|
111
|
+
along with bundler-leak. If not, see <http://www.gnu.org/licenses/>.
|
112
|
+
|
113
|
+
[ruby]: https://ruby-lang.org
|
114
|
+
[rubygems]: https://rubygems.org
|
115
|
+
[thor]: http://whatisthor.com/
|
116
|
+
[bundler]: https://github.com/carlhuda/bundler#readme
|
117
|
+
|
118
|
+
[ruby-mem-advisory-db]: https://github.com/rubymem/ruby-mem-advisory-db
|
data/Rakefile
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
|
5
|
+
begin
|
6
|
+
require 'bundler/setup'
|
7
|
+
rescue LoadError => e
|
8
|
+
abort e.message
|
9
|
+
end
|
10
|
+
|
11
|
+
require 'rake'
|
12
|
+
require 'time'
|
13
|
+
|
14
|
+
require 'rubygems/tasks'
|
15
|
+
Gem::Tasks.new
|
16
|
+
|
17
|
+
namespace :db do
|
18
|
+
desc 'Updates data/ruby-mem-advisory-db'
|
19
|
+
task :update do
|
20
|
+
timestamp = nil
|
21
|
+
|
22
|
+
chdir 'data/ruby-mem-advisory-db' do
|
23
|
+
sh 'git', 'pull', 'origin', 'master'
|
24
|
+
|
25
|
+
File.open('../ruby-mem-advisory-db.ts','w') do |file|
|
26
|
+
file.write Time.parse(`git log --pretty="%cd" -1`).utc
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
sh 'git', 'commit', 'data/ruby-mem-advisory-db',
|
31
|
+
'data/ruby-mem-advisory-db.ts',
|
32
|
+
'-m', 'Updated ruby-mem-advisory-db'
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
require 'rspec/core/rake_task'
|
37
|
+
RSpec::Core::RakeTask.new
|
38
|
+
|
39
|
+
namespace :spec do
|
40
|
+
task :bundle do
|
41
|
+
root = 'spec/bundle'
|
42
|
+
|
43
|
+
%w[secure unpatched_gems insecure_sources].each do |bundle|
|
44
|
+
chdir(File.join(root,bundle)) do
|
45
|
+
sh 'unset BUNDLE_BIN_PATH BUNDLE_GEMFILE RUBYOPT && bundle install --path ../../../vendor/bundle'
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
task :spec => 'spec:bundle'
|
51
|
+
|
52
|
+
task :test => :spec
|
53
|
+
task :default => :spec
|
54
|
+
|
55
|
+
require 'yard'
|
56
|
+
YARD::Rake::YardocTask.new
|
57
|
+
task :doc => :yard
|
data/bin/bundle-leak
ADDED
data/bin/bundler-leak
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'yaml'
|
4
|
+
|
5
|
+
Gem::Specification.new do |gem|
|
6
|
+
gemspec = YAML.load_file('gemspec.yml')
|
7
|
+
|
8
|
+
gem.name = gemspec.fetch('name')
|
9
|
+
gem.version = gemspec.fetch('version') do
|
10
|
+
lib_dir = File.join(File.dirname(__FILE__),'lib')
|
11
|
+
$LOAD_PATH << lib_dir unless $LOAD_PATH.include?(lib_dir)
|
12
|
+
|
13
|
+
require 'bundler/plumber/version'
|
14
|
+
Bundler::Plumber::VERSION
|
15
|
+
end
|
16
|
+
|
17
|
+
gem.summary = gemspec['summary']
|
18
|
+
gem.description = gemspec['description']
|
19
|
+
gem.licenses = Array(gemspec['license'])
|
20
|
+
gem.authors = Array(gemspec['authors'])
|
21
|
+
gem.email = gemspec['email']
|
22
|
+
gem.homepage = gemspec['homepage']
|
23
|
+
|
24
|
+
glob = lambda { |patterns| gem.files & Dir[*patterns] }
|
25
|
+
|
26
|
+
gem.files = `git ls-files`.split($/)
|
27
|
+
gem.files = glob[gemspec['files']] if gemspec['files']
|
28
|
+
|
29
|
+
# add paths from data/ruby-mem-advisory-db/
|
30
|
+
gem.files += Dir.chdir('data/ruby-mem-advisory-db') do
|
31
|
+
`git ls-files`.split($/).map do |sub_path|
|
32
|
+
File.join('data','ruby-mem-advisory-db',sub_path)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
gem.executables = gemspec.fetch('executables') do
|
37
|
+
glob['bin/*'].map { |path| File.basename(path) }
|
38
|
+
end
|
39
|
+
gem.default_executable = gem.executables.first if Gem::VERSION < '1.7.'
|
40
|
+
|
41
|
+
gem.extensions = glob[gemspec['extensions'] || 'ext/**/extconf.rb']
|
42
|
+
gem.test_files = glob[gemspec['test_files'] || '{test/{**/}*_test.rb']
|
43
|
+
gem.extra_rdoc_files = glob[gemspec['extra_doc_files'] || '*.{txt,md}']
|
44
|
+
|
45
|
+
gem.require_paths = Array(gemspec.fetch('require_paths') {
|
46
|
+
%w[ext lib].select { |dir| File.directory?(dir) }
|
47
|
+
})
|
48
|
+
|
49
|
+
gem.requirements = gemspec['requirements']
|
50
|
+
gem.required_ruby_version = gemspec['required_ruby_version']
|
51
|
+
gem.required_rubygems_version = gemspec['required_rubygems_version']
|
52
|
+
gem.post_install_message = gemspec['post_install_message']
|
53
|
+
|
54
|
+
split = lambda { |string| string.split(/,\s*/) }
|
55
|
+
|
56
|
+
if gemspec['dependencies']
|
57
|
+
gemspec['dependencies'].each do |name,versions|
|
58
|
+
gem.add_dependency(name,split[versions])
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
if gemspec['development_dependencies']
|
63
|
+
gemspec['development_dependencies'].each do |name,versions|
|
64
|
+
gem.add_development_dependency(name,split[versions])
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
2019-08-08 21:11:00 UTC
|
@@ -0,0 +1 @@
|
|
1
|
+
_site
|
@@ -0,0 +1 @@
|
|
1
|
+
--colour
|
@@ -0,0 +1,12 @@
|
|
1
|
+
language: ruby
|
2
|
+
|
3
|
+
sudo: false
|
4
|
+
|
5
|
+
cache: bundler
|
6
|
+
|
7
|
+
notifications:
|
8
|
+
irc: chat.freenode.net#rubysec
|
9
|
+
|
10
|
+
env:
|
11
|
+
global:
|
12
|
+
- secure: ZXwsZdbCej15IcIazEIjy12o5v5EI8/Hle/VP1EabfbHsA5Mw+lrliMAV80C8Iy+p4mI66WIO/3Ovm64L1nGDBGs3dKUjtDvNPCKHlK2xK7AhvkcJnzbjWTAzWZY17STJO45DUdr/vuVbvQZ8llLosSOBs+grGsszCSEIOibqjU=
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# Contributing Guidelines
|
2
|
+
|
3
|
+
* All text must be within 80 columns.
|
4
|
+
* YAML must be indented by 2 spaces.
|
5
|
+
* Have any questions? Feel free to open an issue.
|
6
|
+
* Prior to submitting a pull request, run the tests:
|
7
|
+
|
8
|
+
```
|
9
|
+
bundle install
|
10
|
+
bundle exec rspec
|
11
|
+
```
|
12
|
+
|
13
|
+
* Follow the schema. Here is an example advisory:
|
14
|
+
|
15
|
+
```yaml
|
16
|
+
---
|
17
|
+
gem: examplegem
|
18
|
+
cve: 2013-0156
|
19
|
+
url: https://github.com/rubysec/ruby-advisory-db/issues/123456
|
20
|
+
title: |
|
21
|
+
Ruby on Rails params_parser.rb Action Pack Type Casting Parameter Parsing
|
22
|
+
Remote Code Execution
|
23
|
+
|
24
|
+
description: |
|
25
|
+
Ruby on Rails contains a flaw in params_parser.rb of the Action Pack.
|
26
|
+
The issue is triggered when a type casting error occurs during the parsing
|
27
|
+
of parameters. This may allow a remote attacker to potentially execute
|
28
|
+
arbitrary code.
|
29
|
+
|
30
|
+
cvss_v2: 10.0
|
31
|
+
|
32
|
+
patched_versions:
|
33
|
+
- ~> 2.3.15
|
34
|
+
- ~> 3.0.19
|
35
|
+
- ~> 3.1.10
|
36
|
+
- ">= 3.2.11"
|
37
|
+
unaffected_versions:
|
38
|
+
- ~> 2.4.3
|
39
|
+
|
40
|
+
related:
|
41
|
+
cve:
|
42
|
+
- 2013-1234567
|
43
|
+
- 2013-1234568
|
44
|
+
url:
|
45
|
+
- https://github.com/rubysec/ruby-advisory-db/issues/123457
|
46
|
+
|
47
|
+
```
|
48
|
+
### Schema
|
49
|
+
|
50
|
+
* `gem` \[String\]: Name of the affected gem.
|
51
|
+
* `framework` \[String\] (optional): Name of framework gem belongs to.
|
52
|
+
* `platform` \[String\] (optional): If this vulnerability is platform-specific, name of platform this vulnerability affects (e.g. JRuby)
|
53
|
+
* `cve` \[String\]: CVE id.
|
54
|
+
* `osvdb` \[Integer\]: OSVDB id.
|
55
|
+
* `url` \[String\]: The URL to the full advisory.
|
56
|
+
* `title` \[String\]: The title of the advisory.
|
57
|
+
* `date` \[Date\]: Disclosure date of the advisory.
|
58
|
+
* `description` \[String\]: Multi-paragraph description of the vulnerability.
|
59
|
+
* `cvss_v2` \[Float\]: The [CVSSv2] score for the vulnerability.
|
60
|
+
* `cvss_v3` \[Float\]: The [CVSSv3] score for the vulnerability.
|
61
|
+
* `unaffected_versions` \[Array\<String\>\] (optional): The version requirements for the
|
62
|
+
unaffected versions of the Ruby library.
|
63
|
+
* `patched_versions` \[Array\<String\>\]: The version requirements for the
|
64
|
+
patched versions of the Ruby library.
|
65
|
+
* `related` \[Hash\<Array\<String\>\>\]: Sometimes an advisory references many urls and cves. Supported keys: `cve` and `url`
|
66
|
+
|
67
|
+
|
68
|
+
[CVSSv2]: https://www.first.org/cvss/v2/guide
|
69
|
+
[CVSSv3]: https://www.first.org/cvss/user-guide
|