bundler-audit 0.7.0.1 → 0.8.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (597) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +28 -0
  3. data/.gitignore +1 -0
  4. data/.rspec +1 -1
  5. data/ChangeLog.md +57 -0
  6. data/Gemfile +1 -1
  7. data/README.md +61 -4
  8. data/Rakefile +0 -23
  9. data/bundler-audit.gemspec +0 -7
  10. data/lib/bundler/audit/advisory.rb +12 -1
  11. data/lib/bundler/audit/cli.rb +86 -80
  12. data/lib/bundler/audit/cli/formats.rb +144 -0
  13. data/lib/bundler/audit/cli/formats/json.rb +51 -0
  14. data/lib/bundler/audit/cli/formats/text.rb +116 -0
  15. data/lib/bundler/audit/configuration.rb +101 -0
  16. data/lib/bundler/audit/database.rb +135 -28
  17. data/lib/bundler/audit/report.rb +149 -0
  18. data/lib/bundler/audit/results.rb +19 -0
  19. data/lib/bundler/audit/results/insecure_source.rb +75 -0
  20. data/lib/bundler/audit/results/result.rb +21 -0
  21. data/lib/bundler/audit/results/unpatched_gem.rb +94 -0
  22. data/lib/bundler/audit/scanner.rb +95 -22
  23. data/lib/bundler/audit/task.rb +2 -4
  24. data/lib/bundler/audit/version.rb +1 -1
  25. data/spec/advisory_spec.rb +34 -15
  26. data/spec/bundle/unpatched_gems_with_dot_configuration/.bundler-audit.yml +3 -0
  27. data/spec/bundle/unpatched_gems_with_dot_configuration/Gemfile +3 -0
  28. data/spec/cli/formats/json_spec.rb +113 -0
  29. data/spec/cli/formats/text_spec.rb +179 -0
  30. data/spec/cli/formats_spec.rb +86 -0
  31. data/spec/cli_spec.rb +29 -17
  32. data/spec/configuration_spec.rb +70 -0
  33. data/spec/database_spec.rb +248 -51
  34. data/spec/fixtures/advisory/CVE-2020-1234.yml +19 -0
  35. data/spec/fixtures/{not_a_hash.yml → advisory/not_a_hash.yml} +0 -0
  36. data/spec/fixtures/config/bad/ignore_contains_a_non_string.yml +4 -0
  37. data/spec/fixtures/config/bad/ignore_is_not_an_array.yml +3 -0
  38. data/spec/fixtures/config/valid.yml +4 -0
  39. data/spec/fixtures/lib/bundler/audit/cli/formats/bad.rb +19 -0
  40. data/spec/fixtures/lib/bundler/audit/cli/formats/good.rb +19 -0
  41. data/spec/integration_spec.rb +18 -4
  42. data/spec/report_spec.rb +98 -0
  43. data/spec/results/insecure_source_spec.rb +47 -0
  44. data/spec/results/result_spec.rb +10 -0
  45. data/spec/results/unpatched_gem_spec.rb +123 -0
  46. data/spec/scanner_spec.rb +66 -35
  47. data/spec/spec_helper.rb +38 -25
  48. metadata +31 -554
  49. data/.gitmodules +0 -3
  50. data/.travis.yml +0 -14
  51. data/data/ruby-advisory-db.ts +0 -1
  52. data/data/ruby-advisory-db/.gitignore +0 -1
  53. data/data/ruby-advisory-db/.rspec +0 -1
  54. data/data/ruby-advisory-db/.travis.yml +0 -12
  55. data/data/ruby-advisory-db/CONTRIBUTING.md +0 -71
  56. data/data/ruby-advisory-db/CONTRIBUTORS.md +0 -41
  57. data/data/ruby-advisory-db/Gemfile +0 -11
  58. data/data/ruby-advisory-db/LICENSE.txt +0 -5
  59. data/data/ruby-advisory-db/README.md +0 -133
  60. data/data/ruby-advisory-db/Rakefile +0 -22
  61. data/data/ruby-advisory-db/gems/Arabic-Prawn/CVE-2014-2322.yml +0 -12
  62. data/data/ruby-advisory-db/gems/RedCloth/CVE-2012-6684.yml +0 -21
  63. data/data/ruby-advisory-db/gems/VladTheEnterprising/CVE-2014-4995.yml +0 -13
  64. data/data/ruby-advisory-db/gems/VladTheEnterprising/CVE-2014-4996.yml +0 -13
  65. data/data/ruby-advisory-db/gems/actionmailer/CVE-2013-4389.yml +0 -17
  66. data/data/ruby-advisory-db/gems/actionpack-page_caching/CVE-2020-8159.yml +0 -40
  67. data/data/ruby-advisory-db/gems/actionpack/CVE-2012-1099.yml +0 -26
  68. data/data/ruby-advisory-db/gems/actionpack/CVE-2012-3424.yml +0 -28
  69. data/data/ruby-advisory-db/gems/actionpack/CVE-2012-3463.yml +0 -26
  70. data/data/ruby-advisory-db/gems/actionpack/CVE-2012-3465.yml +0 -23
  71. data/data/ruby-advisory-db/gems/actionpack/CVE-2013-0156.yml +0 -24
  72. data/data/ruby-advisory-db/gems/actionpack/CVE-2013-1855.yml +0 -20
  73. data/data/ruby-advisory-db/gems/actionpack/CVE-2013-1857.yml +0 -23
  74. data/data/ruby-advisory-db/gems/actionpack/CVE-2014-0081.yml +0 -24
  75. data/data/ruby-advisory-db/gems/actionpack/CVE-2014-0082.yml +0 -22
  76. data/data/ruby-advisory-db/gems/actionpack/CVE-2014-0130.yml +0 -23
  77. data/data/ruby-advisory-db/gems/actionpack/CVE-2014-7818.yml +0 -24
  78. data/data/ruby-advisory-db/gems/actionpack/CVE-2014-7829.yml +0 -26
  79. data/data/ruby-advisory-db/gems/actionpack/CVE-2015-7576.yml +0 -119
  80. data/data/ruby-advisory-db/gems/actionpack/CVE-2015-7581.yml +0 -55
  81. data/data/ruby-advisory-db/gems/actionpack/CVE-2016-0751.yml +0 -74
  82. data/data/ruby-advisory-db/gems/actionpack/CVE-2016-0752.yml +0 -96
  83. data/data/ruby-advisory-db/gems/actionpack/CVE-2016-2097.yml +0 -91
  84. data/data/ruby-advisory-db/gems/actionpack/CVE-2016-2098.yml +0 -89
  85. data/data/ruby-advisory-db/gems/actionpack/CVE-2016-6316.yml +0 -57
  86. data/data/ruby-advisory-db/gems/actionpack/CVE-2020-8164.yml +0 -49
  87. data/data/ruby-advisory-db/gems/actionpack/CVE-2020-8166.yml +0 -31
  88. data/data/ruby-advisory-db/gems/actionpack/OSVDB-100524.yml +0 -20
  89. data/data/ruby-advisory-db/gems/actionpack/OSVDB-100525.yml +0 -21
  90. data/data/ruby-advisory-db/gems/actionpack/OSVDB-100526.yml +0 -27
  91. data/data/ruby-advisory-db/gems/actionpack/OSVDB-100527.yml +0 -24
  92. data/data/ruby-advisory-db/gems/actionpack/OSVDB-100528.yml +0 -22
  93. data/data/ruby-advisory-db/gems/actionpack/OSVDB-74616.yml +0 -18
  94. data/data/ruby-advisory-db/gems/actionpack/OSVDB-77199.yml +0 -23
  95. data/data/ruby-advisory-db/gems/actionview/CVE-2016-0752.yml +0 -95
  96. data/data/ruby-advisory-db/gems/actionview/CVE-2016-2097.yml +0 -89
  97. data/data/ruby-advisory-db/gems/actionview/CVE-2016-6316.yml +0 -56
  98. data/data/ruby-advisory-db/gems/actionview/CVE-2019-5418.yml +0 -98
  99. data/data/ruby-advisory-db/gems/actionview/CVE-2019-5419.yml +0 -95
  100. data/data/ruby-advisory-db/gems/actionview/CVE-2020-5267.yml +0 -69
  101. data/data/ruby-advisory-db/gems/actionview/CVE-2020-8163.yml +0 -29
  102. data/data/ruby-advisory-db/gems/actionview/CVE-2020-8167.yml +0 -45
  103. data/data/ruby-advisory-db/gems/active-support/CVE-2018-3779.yml +0 -17
  104. data/data/ruby-advisory-db/gems/activejob/CVE-2018-16476.yml +0 -36
  105. data/data/ruby-advisory-db/gems/activemodel/CVE-2016-0753.yml +0 -95
  106. data/data/ruby-advisory-db/gems/activerecord-jdbc-adapter/OSVDB-114854.yml +0 -20
  107. data/data/ruby-advisory-db/gems/activerecord-oracle_enhanced-adapter/OSVDB-95376.yml +0 -15
  108. data/data/ruby-advisory-db/gems/activerecord/CVE-2012-2660.yml +0 -24
  109. data/data/ruby-advisory-db/gems/activerecord/CVE-2012-2661.yml +0 -25
  110. data/data/ruby-advisory-db/gems/activerecord/CVE-2013-0155.yml +0 -24
  111. data/data/ruby-advisory-db/gems/activerecord/CVE-2013-0276.yml +0 -21
  112. data/data/ruby-advisory-db/gems/activerecord/CVE-2013-0277.yml +0 -23
  113. data/data/ruby-advisory-db/gems/activerecord/CVE-2013-1854.yml +0 -26
  114. data/data/ruby-advisory-db/gems/activerecord/CVE-2014-0080.yml +0 -23
  115. data/data/ruby-advisory-db/gems/activerecord/CVE-2014-3482.yml +0 -23
  116. data/data/ruby-advisory-db/gems/activerecord/CVE-2014-3483.yml +0 -24
  117. data/data/ruby-advisory-db/gems/activerecord/CVE-2014-3514.yml +0 -23
  118. data/data/ruby-advisory-db/gems/activerecord/CVE-2015-7577.yml +0 -110
  119. data/data/ruby-advisory-db/gems/activerecord/CVE-2016-6317.yml +0 -73
  120. data/data/ruby-advisory-db/gems/activerecord/OSVDB-88661.yml +0 -20
  121. data/data/ruby-advisory-db/gems/activeresource/CVE-2020-8151.yml +0 -48
  122. data/data/ruby-advisory-db/gems/activeresource/OSVDB-95749.yml +0 -15
  123. data/data/ruby-advisory-db/gems/activestorage/CVE-2018-16477.yml +0 -43
  124. data/data/ruby-advisory-db/gems/activestorage/CVE-2020-8162.yml +0 -31
  125. data/data/ruby-advisory-db/gems/activesupport/CVE-2012-1098.yml +0 -26
  126. data/data/ruby-advisory-db/gems/activesupport/CVE-2012-3464.yml +0 -23
  127. data/data/ruby-advisory-db/gems/activesupport/CVE-2013-0333.yml +0 -25
  128. data/data/ruby-advisory-db/gems/activesupport/CVE-2013-1856.yml +0 -28
  129. data/data/ruby-advisory-db/gems/activesupport/CVE-2015-3226.yml +0 -55
  130. data/data/ruby-advisory-db/gems/activesupport/CVE-2015-3227.yml +0 -33
  131. data/data/ruby-advisory-db/gems/activesupport/CVE-2020-8165.yml +0 -41
  132. data/data/ruby-advisory-db/gems/administrate/CVE-2016-3098.yml +0 -14
  133. data/data/ruby-advisory-db/gems/administrate/CVE-2020-5257.yml +0 -24
  134. data/data/ruby-advisory-db/gems/aescrypt/CVE-2013-7463.yml +0 -10
  135. data/data/ruby-advisory-db/gems/airbrake-ruby/CVE-2019-16060.yml +0 -18
  136. data/data/ruby-advisory-db/gems/archive-tar-minitar/CVE-2016-10173.yml +0 -16
  137. data/data/ruby-advisory-db/gems/as/OSVDB-112683.yml +0 -10
  138. data/data/ruby-advisory-db/gems/authlogic/CVE-2012-6497.yml +0 -15
  139. data/data/ruby-advisory-db/gems/auto_awesomplete/OSVDB-132800.yml +0 -11
  140. data/data/ruby-advisory-db/gems/auto_select2/OSVDB-132800.yml +0 -13
  141. data/data/ruby-advisory-db/gems/awesome-bot/CVE-2019-15224.yml +0 -19
  142. data/data/ruby-advisory-db/gems/awesome_spawn/CVE-2014-0156.yml +0 -19
  143. data/data/ruby-advisory-db/gems/backup-agoddard/CVE-2014-4993.yml +0 -8
  144. data/data/ruby-advisory-db/gems/backup_checksum/CVE-2014-4993.yml +0 -12
  145. data/data/ruby-advisory-db/gems/backup_checksum/OSVDB-108570.yml +0 -10
  146. data/data/ruby-advisory-db/gems/bcrypt-ruby/OSVDB-62067.yml +0 -19
  147. data/data/ruby-advisory-db/gems/bcrypt/OSVDB-62067.yml +0 -17
  148. data/data/ruby-advisory-db/gems/bibtex-ruby/CVE-2019-10780.yml +0 -16
  149. data/data/ruby-advisory-db/gems/bio-basespace-sdk/CVE-2013-7111.yml +0 -8
  150. data/data/ruby-advisory-db/gems/bitcoin_vanity/CVE-2019-15224.yml +0 -18
  151. data/data/ruby-advisory-db/gems/blockchain_wallet/CVE-2019-15224.yml +0 -19
  152. data/data/ruby-advisory-db/gems/bootstrap-sass/CVE-2016-10735.yml +0 -20
  153. data/data/ruby-advisory-db/gems/bootstrap-sass/CVE-2019-10842.yml +0 -25
  154. data/data/ruby-advisory-db/gems/bootstrap-sass/CVE-2019-8331.yml +0 -20
  155. data/data/ruby-advisory-db/gems/bootstrap/CVE-2016-10735.yml +0 -20
  156. data/data/ruby-advisory-db/gems/bootstrap/CVE-2018-14040.yml +0 -24
  157. data/data/ruby-advisory-db/gems/bootstrap/CVE-2019-8331.yml +0 -20
  158. data/data/ruby-advisory-db/gems/brakeman/CVE-2019-18409.yml +0 -26
  159. data/data/ruby-advisory-db/gems/brbackup/CVE-2014-5004.yml +0 -11
  160. data/data/ruby-advisory-db/gems/brbackup/OSVDB-108899.yml +0 -12
  161. data/data/ruby-advisory-db/gems/brbackup/OSVDB-108900.yml +0 -11
  162. data/data/ruby-advisory-db/gems/bson/CVE-2015-4411.yml +0 -21
  163. data/data/ruby-advisory-db/gems/bson/CVE-2015-4412.yml +0 -18
  164. data/data/ruby-advisory-db/gems/builder/OSVDB-95668.yml +0 -13
  165. data/data/ruby-advisory-db/gems/bundler/CVE-2013-0334.yml +0 -15
  166. data/data/ruby-advisory-db/gems/bundler/OSVDB-115090.yml +0 -13
  167. data/data/ruby-advisory-db/gems/bundler/OSVDB-115091.yml +0 -12
  168. data/data/ruby-advisory-db/gems/bundler/OSVDB-115917.yml +0 -12
  169. data/data/ruby-advisory-db/gems/cairo/CVE-2017-7475.yml +0 -15
  170. data/data/ruby-advisory-db/gems/cap-strap/CVE-2014-4992.yml +0 -8
  171. data/data/ruby-advisory-db/gems/cap-strap/OSVDB-108575.yml +0 -7
  172. data/data/ruby-advisory-db/gems/capistrano-colors/CVE-2019-15224.yml +0 -19
  173. data/data/ruby-advisory-db/gems/chartkick/CVE-2019-12732.yml +0 -21
  174. data/data/ruby-advisory-db/gems/chartkick/CVE-2019-18841.yml +0 -13
  175. data/data/ruby-advisory-db/gems/chloride/CVE-2018-6517.yml +0 -17
  176. data/data/ruby-advisory-db/gems/ciborg/CVE-2014-5003.yml +0 -8
  177. data/data/ruby-advisory-db/gems/cocaine/CVE-2013-4457.yml +0 -15
  178. data/data/ruby-advisory-db/gems/codders-dataset/CVE-2014-4991.yml +0 -8
  179. data/data/ruby-advisory-db/gems/coin_base/CVE-2019-15224.yml +0 -18
  180. data/data/ruby-advisory-db/gems/colorscore/CVE-2015-7541.yml +0 -21
  181. data/data/ruby-advisory-db/gems/coming-soon/CVE-2019-15224.yml +0 -18
  182. data/data/ruby-advisory-db/gems/command_wrap/CVE-2013-1875.yml +0 -9
  183. data/data/ruby-advisory-db/gems/consul/CVE-2019-16377.yml +0 -15
  184. data/data/ruby-advisory-db/gems/crack/CVE-2013-1800.yml +0 -17
  185. data/data/ruby-advisory-db/gems/cremefraiche/CVE-2013-2090.yml +0 -11
  186. data/data/ruby-advisory-db/gems/cron_parser/CVE-2019-15224.yml +0 -20
  187. data/data/ruby-advisory-db/gems/curb/OSVDB-114600.yml +0 -12
  188. data/data/ruby-advisory-db/gems/curl/CVE-2013-2617.yml +0 -13
  189. data/data/ruby-advisory-db/gems/datagrid/CVE-2019-14281.yml +0 -14
  190. data/data/ruby-advisory-db/gems/delayed_job_web/CVE-2017-12097.yml +0 -17
  191. data/data/ruby-advisory-db/gems/devise-two-factor/CVE-2015-7225.yml +0 -22
  192. data/data/ruby-advisory-db/gems/devise/CVE-2013-0233.yml +0 -20
  193. data/data/ruby-advisory-db/gems/devise/CVE-2015-8314.yml +0 -14
  194. data/data/ruby-advisory-db/gems/devise/CVE-2019-16109.yml +0 -13
  195. data/data/ruby-advisory-db/gems/devise/CVE-2019-5421.yml +0 -16
  196. data/data/ruby-advisory-db/gems/devise/OSVDB-114435.yml +0 -17
  197. data/data/ruby-advisory-db/gems/doge-coin/CVE-2019-15224.yml +0 -19
  198. data/data/ruby-advisory-db/gems/doorkeeper-openid_connect/CVE-2019-9837.yml +0 -16
  199. data/data/ruby-advisory-db/gems/doorkeeper/CVE-2014-8144.yml +0 -26
  200. data/data/ruby-advisory-db/gems/doorkeeper/CVE-2016-6582.yml +0 -43
  201. data/data/ruby-advisory-db/gems/doorkeeper/CVE-2018-1000088.yml +0 -39
  202. data/data/ruby-advisory-db/gems/doorkeeper/CVE-2018-1000211.yml +0 -39
  203. data/data/ruby-advisory-db/gems/doorkeeper/CVE-2020-10187.yml +0 -34
  204. data/data/ruby-advisory-db/gems/doorkeeper/OSVDB-118830.yml +0 -17
  205. data/data/ruby-advisory-db/gems/dragonfly/CVE-2013-1756.yml +0 -16
  206. data/data/ruby-advisory-db/gems/dragonfly/CVE-2013-5671.yml +0 -14
  207. data/data/ruby-advisory-db/gems/dragonfly/OSVDB-110439.yml +0 -13
  208. data/data/ruby-advisory-db/gems/dragonfly/OSVDB-97854.yml +0 -12
  209. data/data/ruby-advisory-db/gems/easymon/CVE-2018-1000855.yml +0 -16
  210. data/data/ruby-advisory-db/gems/echor/CVE-2014-1834.yml +0 -12
  211. data/data/ruby-advisory-db/gems/echor/CVE-2014-1835.yml +0 -11
  212. data/data/ruby-advisory-db/gems/ember-source/CVE-2013-4170.yml +0 -25
  213. data/data/ruby-advisory-db/gems/ember-source/CVE-2014-0013.yml +0 -33
  214. data/data/ruby-advisory-db/gems/ember-source/CVE-2014-0014.yml +0 -30
  215. data/data/ruby-advisory-db/gems/ember-source/CVE-2014-0046.yml +0 -26
  216. data/data/ruby-advisory-db/gems/ember-source/CVE-2015-1866.yml +0 -26
  217. data/data/ruby-advisory-db/gems/ember-source/CVE-2015-7565.yml +0 -30
  218. data/data/ruby-advisory-db/gems/enum_column3/OSVDB-94679.yml +0 -9
  219. data/data/ruby-advisory-db/gems/espeak-ruby/CVE-2016-10193.yml +0 -15
  220. data/data/ruby-advisory-db/gems/excon/CVE-2019-16779.yml +0 -23
  221. data/data/ruby-advisory-db/gems/extlib/CVE-2013-1802.yml +0 -18
  222. data/data/ruby-advisory-db/gems/fastreader/CVE-2013-2615.yml +0 -13
  223. data/data/ruby-advisory-db/gems/fat_free_crm/CVE-2013-7222.yml +0 -17
  224. data/data/ruby-advisory-db/gems/fat_free_crm/CVE-2013-7223.yml +0 -19
  225. data/data/ruby-advisory-db/gems/fat_free_crm/CVE-2013-7224.yml +0 -17
  226. data/data/ruby-advisory-db/gems/fat_free_crm/CVE-2013-7225.yml +0 -19
  227. data/data/ruby-advisory-db/gems/fat_free_crm/CVE-2013-7249.yml +0 -16
  228. data/data/ruby-advisory-db/gems/fat_free_crm/CVE-2014-5441.yml +0 -19
  229. data/data/ruby-advisory-db/gems/fat_free_crm/CVE-2015-1585.yml +0 -17
  230. data/data/ruby-advisory-db/gems/fat_free_crm/CVE-2018-1000842.yml +0 -23
  231. data/data/ruby-advisory-db/gems/fat_free_crm/CVE-2018-20975.yml +0 -12
  232. data/data/ruby-advisory-db/gems/faye/CVE-2020-11020.yml +0 -91
  233. data/data/ruby-advisory-db/gems/features/CVE-2013-4318.yml +0 -8
  234. data/data/ruby-advisory-db/gems/festivaltts4r/CVE-2016-10194.yml +0 -12
  235. data/data/ruby-advisory-db/gems/ffi/CVE-2018-1000201.yml +0 -22
  236. data/data/ruby-advisory-db/gems/field_test/CVE-2019-13146.yml +0 -20
  237. data/data/ruby-advisory-db/gems/fileutils/CVE-2013-2516.yml +0 -11
  238. data/data/ruby-advisory-db/gems/fileutils/OSVDB-90715.yml +0 -7
  239. data/data/ruby-advisory-db/gems/fileutils/OSVDB-90716.yml +0 -7
  240. data/data/ruby-advisory-db/gems/fileutils/OSVDB-90718.yml +0 -7
  241. data/data/ruby-advisory-db/gems/flash_tool/CVE-2013-2513.yml +0 -8
  242. data/data/ruby-advisory-db/gems/flavour_saver/OSVDB-110796.yml +0 -14
  243. data/data/ruby-advisory-db/gems/flukso4r/OSVDB-101577.yml +0 -7
  244. data/data/ruby-advisory-db/gems/fog-dragonfly/CVE-2013-1756.yml +0 -18
  245. data/data/ruby-advisory-db/gems/fog-dragonfly/CVE-2013-5671.yml +0 -16
  246. data/data/ruby-advisory-db/gems/fog-dragonfly/OSVDB-110439.yml +0 -15
  247. data/data/ruby-advisory-db/gems/fog-dragonfly/OSVDB-97854.yml +0 -12
  248. data/data/ruby-advisory-db/gems/ftpd/CVE-2013-2512.yml +0 -18
  249. data/data/ruby-advisory-db/gems/geminabox/CVE-2017-16792.yml +0 -21
  250. data/data/ruby-advisory-db/gems/gemirro/CVE-2017-16833.yml +0 -22
  251. data/data/ruby-advisory-db/gems/git-fastclone/CVE-2015-8968.yml +0 -21
  252. data/data/ruby-advisory-db/gems/git-fastclone/CVE-2015-8969.yml +0 -13
  253. data/data/ruby-advisory-db/gems/gitlab-grit/CVE-2013-4489.yml +0 -14
  254. data/data/ruby-advisory-db/gems/gnms/OSVDB-108594.yml +0 -7
  255. data/data/ruby-advisory-db/gems/gollum-grit_adapter/CVE-2014-9489.yml +0 -23
  256. data/data/ruby-advisory-db/gems/gollum/CVE-2015-7314.yml +0 -13
  257. data/data/ruby-advisory-db/gems/grape/CVE-2018-3769.yml +0 -20
  258. data/data/ruby-advisory-db/gems/gtk2/CVE-2007-6183.yml +0 -20
  259. data/data/ruby-advisory-db/gems/gyazo/CVE-2014-4994.yml +0 -10
  260. data/data/ruby-advisory-db/gems/haml/CVE-2017-1002201.yml +0 -19
  261. data/data/ruby-advisory-db/gems/handlebars-source/OSVDB-131671.yml +0 -17
  262. data/data/ruby-advisory-db/gems/http/CVE-2015-1828.yml +0 -14
  263. data/data/ruby-advisory-db/gems/httparty/CVE-2013-1801.yml +0 -14
  264. data/data/ruby-advisory-db/gems/i18n/CVE-2014-10077.yml +0 -18
  265. data/data/ruby-advisory-db/gems/i18n/OSVDB-100528.yml +0 -17
  266. data/data/ruby-advisory-db/gems/iodine/GHSA-85rf-xh54-whp3.yml +0 -21
  267. data/data/ruby-advisory-db/gems/jekyll/CVE-2018-17567.yml +0 -14
  268. data/data/ruby-advisory-db/gems/jquery-rails/CVE-2015-1840.yml +0 -36
  269. data/data/ruby-advisory-db/gems/jquery-rails/CVE-2019-11358.yml +0 -24
  270. data/data/ruby-advisory-db/gems/jquery-ui-rails/CVE-2016-7103.yml +0 -23
  271. data/data/ruby-advisory-db/gems/jquery-ujs/CVE-2015-1840.yml +0 -35
  272. data/data/ruby-advisory-db/gems/jruby-openssl/CVE-2009-4123.yml +0 -16
  273. data/data/ruby-advisory-db/gems/jruby-sandbox/OSVDB-106279.yml +0 -12
  274. data/data/ruby-advisory-db/gems/json-jwt/CVE-2018-1000539.yml +0 -21
  275. data/data/ruby-advisory-db/gems/json-jwt/CVE-2019-18848.yml +0 -15
  276. data/data/ruby-advisory-db/gems/json/CVE-2013-0269.yml +0 -20
  277. data/data/ruby-advisory-db/gems/json/CVE-2020-10663.yml +0 -35
  278. data/data/ruby-advisory-db/gems/json/OSVDB-101157.yml +0 -14
  279. data/data/ruby-advisory-db/gems/kafo/CVE-2014-0135.yml +0 -15
  280. data/data/ruby-advisory-db/gems/kajam/CVE-2014-4999.yml +0 -12
  281. data/data/ruby-advisory-db/gems/kajam/OSVDB-108530.yml +0 -11
  282. data/data/ruby-advisory-db/gems/kaminari/CVE-2020-11082.yml +0 -34
  283. data/data/ruby-advisory-db/gems/karo/OSVDB-108573.yml +0 -10
  284. data/data/ruby-advisory-db/gems/karteek-docsplit/CVE-2013-1933.yml +0 -9
  285. data/data/ruby-advisory-db/gems/kcapifony/CVE-2014-5001.yml +0 -8
  286. data/data/ruby-advisory-db/gems/kcapifony/OSVDB-108572.yml +0 -7
  287. data/data/ruby-advisory-db/gems/kelredd-pruview/CVE-2013-1947.yml +0 -9
  288. data/data/ruby-advisory-db/gems/kompanee-recipes/OSVDB-108593.yml +0 -12
  289. data/data/ruby-advisory-db/gems/lawn-login/CVE-2014-5000.yml +0 -8
  290. data/data/ruby-advisory-db/gems/ldap_fluff/CVE-2012-5604.yml +0 -15
  291. data/data/ruby-advisory-db/gems/ldoce/CVE-2013-1911.yml +0 -9
  292. data/data/ruby-advisory-db/gems/lean-ruport/CVE-2014-4998.yml +0 -8
  293. data/data/ruby-advisory-db/gems/lingq/OSVDB-108585.yml +0 -7
  294. data/data/ruby-advisory-db/gems/lita_coin/CVE-2019-15224.yml +0 -18
  295. data/data/ruby-advisory-db/gems/loofah/CVE-2018-16468.yml +0 -16
  296. data/data/ruby-advisory-db/gems/loofah/CVE-2018-8048.yml +0 -11
  297. data/data/ruby-advisory-db/gems/loofah/CVE-2019-15587.yml +0 -13
  298. data/data/ruby-advisory-db/gems/loofah/OSVDB-90945.yml +0 -21
  299. data/data/ruby-advisory-db/gems/lynx/CVE-2014-5002.yml +0 -11
  300. data/data/ruby-advisory-db/gems/lynx/OSVDB-108579.yml +0 -7
  301. data/data/ruby-advisory-db/gems/mail/CVE-2011-0739.yml +0 -21
  302. data/data/ruby-advisory-db/gems/mail/CVE-2012-2139.yml +0 -14
  303. data/data/ruby-advisory-db/gems/mail/CVE-2012-2140.yml +0 -16
  304. data/data/ruby-advisory-db/gems/mail/CVE-2015-9097.yml +0 -26
  305. data/data/ruby-advisory-db/gems/mapbox-rails/OSVDB-129854.yml +0 -25
  306. data/data/ruby-advisory-db/gems/mapbox-rails/OSVDB-132871.yml +0 -26
  307. data/data/ruby-advisory-db/gems/marginalia/CVE-2019-1010191.yml +0 -17
  308. data/data/ruby-advisory-db/gems/matestack-ui-core/CVE-2020-5241.yml +0 -18
  309. data/data/ruby-advisory-db/gems/md2pdf/CVE-2013-1948.yml +0 -9
  310. data/data/ruby-advisory-db/gems/mini_magick/CVE-2013-2616.yml +0 -15
  311. data/data/ruby-advisory-db/gems/mini_magick/CVE-2019-13574.yml +0 -14
  312. data/data/ruby-advisory-db/gems/minitar/CVE-2016-10173.yml +0 -20
  313. data/data/ruby-advisory-db/gems/moped/CVE-2015-4410.yml +0 -17
  314. data/data/ruby-advisory-db/gems/multi_xml/CVE-2013-0175.yml +0 -16
  315. data/data/ruby-advisory-db/gems/mustache-js-rails/OSVDB-131671.yml +0 -17
  316. data/data/ruby-advisory-db/gems/mysql-binuuid-rails/CVE-2018-18476.yml +0 -21
  317. data/data/ruby-advisory-db/gems/net-ldap/CVE-2014-0083.yml +0 -14
  318. data/data/ruby-advisory-db/gems/net-ldap/CVE-2017-17718.yml +0 -17
  319. data/data/ruby-advisory-db/gems/netaddr/CVE-2019-17383.yml +0 -13
  320. data/data/ruby-advisory-db/gems/newrelic_rpm/CVE-2013-0284.yml +0 -17
  321. data/data/ruby-advisory-db/gems/nokogiri/CVE-2012-6685.yml +0 -15
  322. data/data/ruby-advisory-db/gems/nokogiri/CVE-2013-6460.yml +0 -18
  323. data/data/ruby-advisory-db/gems/nokogiri/CVE-2013-6461.yml +0 -15
  324. data/data/ruby-advisory-db/gems/nokogiri/CVE-2015-1819.yml +0 -52
  325. data/data/ruby-advisory-db/gems/nokogiri/CVE-2015-5312.yml +0 -92
  326. data/data/ruby-advisory-db/gems/nokogiri/CVE-2015-7499.yml +0 -37
  327. data/data/ruby-advisory-db/gems/nokogiri/CVE-2015-8806.yml +0 -42
  328. data/data/ruby-advisory-db/gems/nokogiri/CVE-2016-4658.yml +0 -33
  329. data/data/ruby-advisory-db/gems/nokogiri/CVE-2017-15412.yml +0 -23
  330. data/data/ruby-advisory-db/gems/nokogiri/CVE-2017-16932.yml +0 -21
  331. data/data/ruby-advisory-db/gems/nokogiri/CVE-2017-5029.yml +0 -44
  332. data/data/ruby-advisory-db/gems/nokogiri/CVE-2017-9050.yml +0 -60
  333. data/data/ruby-advisory-db/gems/nokogiri/CVE-2018-14404.yml +0 -69
  334. data/data/ruby-advisory-db/gems/nokogiri/CVE-2018-8048.yml +0 -36
  335. data/data/ruby-advisory-db/gems/nokogiri/CVE-2019-11068.yml +0 -49
  336. data/data/ruby-advisory-db/gems/nokogiri/CVE-2019-13117.yml +0 -80
  337. data/data/ruby-advisory-db/gems/nokogiri/CVE-2019-5477.yml +0 -31
  338. data/data/ruby-advisory-db/gems/nokogiri/CVE-2020-7595.yml +0 -20
  339. data/data/ruby-advisory-db/gems/nokogiri/OSVDB-118481.yml +0 -15
  340. data/data/ruby-advisory-db/gems/nori/CVE-2013-0285.yml +0 -19
  341. data/data/ruby-advisory-db/gems/omniauth-facebook/CVE-2013-4562.yml +0 -22
  342. data/data/ruby-advisory-db/gems/omniauth-facebook/CVE-2013-4593.yml +0 -17
  343. data/data/ruby-advisory-db/gems/omniauth-oauth2/CVE-2012-6134.yml +0 -16
  344. data/data/ruby-advisory-db/gems/omniauth-saml/CVE-2017-11430.yml +0 -17
  345. data/data/ruby-advisory-db/gems/omniauth/CVE-2015-9284.yml +0 -25
  346. data/data/ruby-advisory-db/gems/omniauth/CVE-2017-18076.yml +0 -18
  347. data/data/ruby-advisory-db/gems/omniauth_amazon/CVE-2019-15224.yml +0 -19
  348. data/data/ruby-advisory-db/gems/open-uri-cached/OSVDB-121701.yml +0 -13
  349. data/data/ruby-advisory-db/gems/openssl/CVE-2016-7798.yml +0 -16
  350. data/data/ruby-advisory-db/gems/ox/CVE-2017-15928.yml +0 -16
  351. data/data/ruby-advisory-db/gems/ox/CVE-2017-16229.yml +0 -16
  352. data/data/ruby-advisory-db/gems/padrino-contrib/CVE-2019-16145.yml +0 -11
  353. data/data/ruby-advisory-db/gems/paperclip/CVE-2015-2963.yml +0 -16
  354. data/data/ruby-advisory-db/gems/paperclip/CVE-2017-0889.yml +0 -23
  355. data/data/ruby-advisory-db/gems/paperclip/OSVDB-103151.yml +0 -13
  356. data/data/ruby-advisory-db/gems/paranoid2/CVE-2019-13589.yml +0 -16
  357. data/data/ruby-advisory-db/gems/paratrooper-newrelic/CVE-2014-1234.yml +0 -13
  358. data/data/ruby-advisory-db/gems/paratrooper-pingdom/CVE-2014-1233.yml +0 -13
  359. data/data/ruby-advisory-db/gems/passenger/CVE-2013-2119.yml +0 -15
  360. data/data/ruby-advisory-db/gems/passenger/CVE-2013-4136.yml +0 -14
  361. data/data/ruby-advisory-db/gems/passenger/CVE-2014-1831.yml +0 -13
  362. data/data/ruby-advisory-db/gems/passenger/CVE-2014-1832.yml +0 -13
  363. data/data/ruby-advisory-db/gems/passenger/CVE-2015-7519.yml +0 -17
  364. data/data/ruby-advisory-db/gems/passenger/CVE-2016-10345.yml +0 -17
  365. data/data/ruby-advisory-db/gems/passenger/OSVDB-90738.yml +0 -16
  366. data/data/ruby-advisory-db/gems/pdfkit/CVE-2013-1607.yml +0 -11
  367. data/data/ruby-advisory-db/gems/point-cli/CVE-2014-4997.yml +0 -8
  368. data/data/ruby-advisory-db/gems/private_address_check/CVE-2017-0904.yml +0 -17
  369. data/data/ruby-advisory-db/gems/private_address_check/CVE-2017-0909.yml +0 -15
  370. data/data/ruby-advisory-db/gems/private_address_check/CVE-2018-3759.yml +0 -14
  371. data/data/ruby-advisory-db/gems/puma/CVE-2019-16770.yml +0 -21
  372. data/data/ruby-advisory-db/gems/puma/CVE-2020-11076.yml +0 -22
  373. data/data/ruby-advisory-db/gems/puma/CVE-2020-11077.yml +0 -31
  374. data/data/ruby-advisory-db/gems/puma/CVE-2020-5247.yml +0 -25
  375. data/data/ruby-advisory-db/gems/puma/CVE-2020-5249.yml +0 -36
  376. data/data/ruby-advisory-db/gems/quick_magick/OSVDB-106954.yml +0 -7
  377. data/data/ruby-advisory-db/gems/rack-attack/OSVDB-132234.yml +0 -26
  378. data/data/ruby-advisory-db/gems/rack-cache/CVE-2012-2671.yml +0 -18
  379. data/data/ruby-advisory-db/gems/rack-cors/CVE-2017-11173.yml +0 -21
  380. data/data/ruby-advisory-db/gems/rack-cors/CVE-2019-18978.yml +0 -13
  381. data/data/ruby-advisory-db/gems/rack-mini-profiler/CVE-2016-4442.yml +0 -17
  382. data/data/ruby-advisory-db/gems/rack-protection/CVE-2018-1000119.yml +0 -18
  383. data/data/ruby-advisory-db/gems/rack-protection/CVE-2018-7212.yml +0 -12
  384. data/data/ruby-advisory-db/gems/rack-ssl/CVE-2014-2538.yml +0 -11
  385. data/data/ruby-advisory-db/gems/rack/CVE-2011-5036.yml +0 -21
  386. data/data/ruby-advisory-db/gems/rack/CVE-2012-6109.yml +0 -21
  387. data/data/ruby-advisory-db/gems/rack/CVE-2013-0183.yml +0 -19
  388. data/data/ruby-advisory-db/gems/rack/CVE-2013-0184.yml +0 -20
  389. data/data/ruby-advisory-db/gems/rack/CVE-2013-0262.yml +0 -18
  390. data/data/ruby-advisory-db/gems/rack/CVE-2013-0263.yml +0 -23
  391. data/data/ruby-advisory-db/gems/rack/CVE-2015-3225.yml +0 -18
  392. data/data/ruby-advisory-db/gems/rack/CVE-2018-16470.yml +0 -56
  393. data/data/ruby-advisory-db/gems/rack/CVE-2018-16471.yml +0 -80
  394. data/data/ruby-advisory-db/gems/rack/CVE-2019-16782.yml +0 -32
  395. data/data/ruby-advisory-db/gems/rack/CVE-2020-8161.yml +0 -32
  396. data/data/ruby-advisory-db/gems/radiant/CVE-2018-5216.yml +0 -12
  397. data/data/ruby-advisory-db/gems/radiant/CVE-2018-7261.yml +0 -13
  398. data/data/ruby-advisory-db/gems/rails-html-sanitizer/CVE-2015-7578.yml +0 -47
  399. data/data/ruby-advisory-db/gems/rails-html-sanitizer/CVE-2015-7579.yml +0 -75
  400. data/data/ruby-advisory-db/gems/rails-html-sanitizer/CVE-2015-7580.yml +0 -70
  401. data/data/ruby-advisory-db/gems/rails-html-sanitizer/CVE-2018-3741.yml +0 -20
  402. data/data/ruby-advisory-db/gems/rails_admin/CVE-2016-10522.yml +0 -21
  403. data/data/ruby-advisory-db/gems/rails_admin/CVE-2017-12098.yml +0 -22
  404. data/data/ruby-advisory-db/gems/railties/CVE-2019-5420.yml +0 -49
  405. data/data/ruby-advisory-db/gems/rake/CVE-2020-8130.yml +0 -18
  406. data/data/ruby-advisory-db/gems/rbovirt/CVE-2014-0036.yml +0 -20
  407. data/data/ruby-advisory-db/gems/rdoc/CVE-2013-0256.yml +0 -27
  408. data/data/ruby-advisory-db/gems/recurly/CVE-2017-0905.yml +0 -35
  409. data/data/ruby-advisory-db/gems/redcarpet/CVE-2015-5147.yml +0 -17
  410. data/data/ruby-advisory-db/gems/redcarpet/OSVDB-120415.yml +0 -16
  411. data/data/ruby-advisory-db/gems/redis-namespace/OSVDB-96425.yml +0 -15
  412. data/data/ruby-advisory-db/gems/redis-store/CVE-2017-1000248.yml +0 -17
  413. data/data/ruby-advisory-db/gems/refile/OSVDB-120857.yml +0 -16
  414. data/data/ruby-advisory-db/gems/rest-client/CVE-2015-1820.yml +0 -23
  415. data/data/ruby-advisory-db/gems/rest-client/CVE-2015-3448.yml +0 -15
  416. data/data/ruby-advisory-db/gems/rest-client/CVE-2019-15224.yml +0 -13
  417. data/data/ruby-advisory-db/gems/restforce/CVE-2018-3777.yml +0 -36
  418. data/data/ruby-advisory-db/gems/rexical/CVE-2019-5477.yml +0 -21
  419. data/data/ruby-advisory-db/gems/rgpg/CVE-2013-4203.yml +0 -15
  420. data/data/ruby-advisory-db/gems/rubocop/CVE-2017-8418.yml +0 -20
  421. data/data/ruby-advisory-db/gems/ruby-openid/CVE-2019-11027.yml +0 -16
  422. data/data/ruby-advisory-db/gems/ruby-saml/CVE-2016-5697.yml +0 -20
  423. data/data/ruby-advisory-db/gems/ruby-saml/CVE-2017-11428.yml +0 -27
  424. data/data/ruby-advisory-db/gems/ruby-saml/OSVDB-117903.yml +0 -13
  425. data/data/ruby-advisory-db/gems/ruby-saml/OSVDB-124383.yml +0 -11
  426. data/data/ruby-advisory-db/gems/ruby-saml/OSVDB-124991.yml +0 -13
  427. data/data/ruby-advisory-db/gems/ruby_parser-legacy/CVE-2019-18409.yml +0 -16
  428. data/data/ruby-advisory-db/gems/ruby_parser/CVE-2013-0162.yml +0 -11
  429. data/data/ruby-advisory-db/gems/rubygems-update/CVE-2007-0469.yml +0 -18
  430. data/data/ruby-advisory-db/gems/rubygems-update/CVE-2012-2125.yml +0 -17
  431. data/data/ruby-advisory-db/gems/rubygems-update/CVE-2012-2126.yml +0 -15
  432. data/data/ruby-advisory-db/gems/rubygems-update/CVE-2013-4287.yml +0 -20
  433. data/data/ruby-advisory-db/gems/rubygems-update/CVE-2013-4363.yml +0 -21
  434. data/data/ruby-advisory-db/gems/rubygems-update/CVE-2015-3900.yml +0 -20
  435. data/data/ruby-advisory-db/gems/rubygems-update/CVE-2015-4020.yml +0 -20
  436. data/data/ruby-advisory-db/gems/rubygems-update/CVE-2017-0899.yml +0 -16
  437. data/data/ruby-advisory-db/gems/rubygems-update/CVE-2017-0900.yml +0 -16
  438. data/data/ruby-advisory-db/gems/rubygems-update/CVE-2017-0901.yml +0 -16
  439. data/data/ruby-advisory-db/gems/rubygems-update/CVE-2017-0902.yml +0 -16
  440. data/data/ruby-advisory-db/gems/rubygems-update/CVE-2017-0903.yml +0 -17
  441. data/data/ruby-advisory-db/gems/rubygems-update/CVE-2019-8320.yml +0 -21
  442. data/data/ruby-advisory-db/gems/rubygems-update/CVE-2019-8321.yml +0 -16
  443. data/data/ruby-advisory-db/gems/rubygems-update/CVE-2019-8322.yml +0 -16
  444. data/data/ruby-advisory-db/gems/rubygems-update/CVE-2019-8323.yml +0 -17
  445. data/data/ruby-advisory-db/gems/rubygems-update/CVE-2019-8324.yml +0 -18
  446. data/data/ruby-advisory-db/gems/rubygems-update/CVE-2019-8325.yml +0 -16
  447. data/data/ruby-advisory-db/gems/rubyzip/CVE-2017-5946.yml +0 -17
  448. data/data/ruby-advisory-db/gems/rubyzip/CVE-2018-1000544.yml +0 -19
  449. data/data/ruby-advisory-db/gems/rubyzip/CVE-2019-16892.yml +0 -13
  450. data/data/ruby-advisory-db/gems/safemode/CVE-2016-3693.yml +0 -13
  451. data/data/ruby-advisory-db/gems/safemode/CVE-2017-7540.yml +0 -16
  452. data/data/ruby-advisory-db/gems/samlr/CVE-2018-20857.yml +0 -16
  453. data/data/ruby-advisory-db/gems/sanitize/CVE-2018-3740.yml +0 -22
  454. data/data/ruby-advisory-db/gems/screen_capture/OSVDB-107783.yml +0 -7
  455. data/data/ruby-advisory-db/gems/secure_headers/CVE-2020-5216.yml +0 -52
  456. data/data/ruby-advisory-db/gems/secure_headers/CVE-2020-5217.yml +0 -42
  457. data/data/ruby-advisory-db/gems/sentry-raven/CVE-2014-9490.yml +0 -14
  458. data/data/ruby-advisory-db/gems/sfpagent/CVE-2014-2888.yml +0 -15
  459. data/data/ruby-advisory-db/gems/show_in_browser/CVE-2013-2105.yml +0 -8
  460. data/data/ruby-advisory-db/gems/sidekiq-pro/OSVDB-126329.yml +0 -12
  461. data/data/ruby-advisory-db/gems/sidekiq-pro/OSVDB-126330.yml +0 -10
  462. data/data/ruby-advisory-db/gems/sidekiq-pro/OSVDB-126331.yml +0 -14
  463. data/data/ruby-advisory-db/gems/sidekiq/OSVDB-125675.yml +0 -9
  464. data/data/ruby-advisory-db/gems/sidekiq/OSVDB-125676.yml +0 -14
  465. data/data/ruby-advisory-db/gems/sidekiq/OSVDB-125678.yml +0 -9
  466. data/data/ruby-advisory-db/gems/simple_captcha2/CVE-2019-14282.yml +0 -13
  467. data/data/ruby-advisory-db/gems/simple_form/CVE-2019-16676.yml +0 -15
  468. data/data/ruby-advisory-db/gems/sinatra/CVE-2018-11627.yml +0 -16
  469. data/data/ruby-advisory-db/gems/sinatra/CVE-2018-7212.yml +0 -19
  470. data/data/ruby-advisory-db/gems/slanger/CVE-2019-1010306.yml +0 -16
  471. data/data/ruby-advisory-db/gems/smart_proxy_dynflow/CVE-2018-14643.yml +0 -18
  472. data/data/ruby-advisory-db/gems/sorcery/CVE-2020-11052.yml +0 -27
  473. data/data/ruby-advisory-db/gems/sounder/CVE-2013-5647.yml +0 -14
  474. data/data/ruby-advisory-db/gems/spina/CVE-2015-4619.yml +0 -16
  475. data/data/ruby-advisory-db/gems/spree/OSVDB-119205.yml +0 -18
  476. data/data/ruby-advisory-db/gems/spree/OSVDB-125699.yml +0 -18
  477. data/data/ruby-advisory-db/gems/spree/OSVDB-125701.yml +0 -17
  478. data/data/ruby-advisory-db/gems/spree/OSVDB-125712.yml +0 -16
  479. data/data/ruby-advisory-db/gems/spree/OSVDB-125713.yml +0 -15
  480. data/data/ruby-advisory-db/gems/spree/OSVDB-69098.yml +0 -19
  481. data/data/ruby-advisory-db/gems/spree/OSVDB-73751.yml +0 -11
  482. data/data/ruby-advisory-db/gems/spree/OSVDB-76011.yml +0 -15
  483. data/data/ruby-advisory-db/gems/spree/OSVDB-81505.yml +0 -14
  484. data/data/ruby-advisory-db/gems/spree/OSVDB-81506.yml +0 -16
  485. data/data/ruby-advisory-db/gems/spree/OSVDB-90865.yml +0 -20
  486. data/data/ruby-advisory-db/gems/spree/OSVDB-91216.yml +0 -17
  487. data/data/ruby-advisory-db/gems/spree/OSVDB-91217.yml +0 -17
  488. data/data/ruby-advisory-db/gems/spree/OSVDB-91218.yml +0 -17
  489. data/data/ruby-advisory-db/gems/spree/OSVDB-91219.yml +0 -17
  490. data/data/ruby-advisory-db/gems/spree_auth/OSVDB-90865.yml +0 -16
  491. data/data/ruby-advisory-db/gems/spree_auth_devise/OSVDB-90865.yml +0 -20
  492. data/data/ruby-advisory-db/gems/sprockets/CVE-2014-7819.yml +0 -27
  493. data/data/ruby-advisory-db/gems/sprockets/CVE-2018-3760.yml +0 -23
  494. data/data/ruby-advisory-db/gems/sprout/CVE-2013-6421.yml +0 -16
  495. data/data/ruby-advisory-db/gems/strong_password/CVE-2019-13354.yml +0 -19
  496. data/data/ruby-advisory-db/gems/sup/CVE-2013-4478.yml +0 -14
  497. data/data/ruby-advisory-db/gems/sup/CVE-2013-4479.yml +0 -14
  498. data/data/ruby-advisory-db/gems/thumbshooter/CVE-2013-1898.yml +0 -9
  499. data/data/ruby-advisory-db/gems/twitter-bootstrap-rails/OSVDB-109206.yml +0 -22
  500. data/data/ruby-advisory-db/gems/uglifier/OSVDB-126747.yml +0 -19
  501. data/data/ruby-advisory-db/gems/user_agent_parser/CVE-2020-5243.yml +0 -28
  502. data/data/ruby-advisory-db/gems/web-console/CVE-2015-3224.yml +0 -22
  503. data/data/ruby-advisory-db/gems/web-console/OSVDB-112346.yml +0 -12
  504. data/data/ruby-advisory-db/gems/webbynode/CVE-2013-7086.yml +0 -12
  505. data/data/ruby-advisory-db/gems/websocket-extensions/CVE-2020-7663.yml +0 -35
  506. data/data/ruby-advisory-db/gems/wicked/CVE-2013-4413.yml +0 -14
  507. data/data/ruby-advisory-db/gems/will_paginate/CVE-2013-6459.yml +0 -15
  508. data/data/ruby-advisory-db/gems/xaviershay-dm-rails/CVE-2015-2179.yml +0 -13
  509. data/data/ruby-advisory-db/gems/yajl-ruby/CVE-2017-16516.yml +0 -19
  510. data/data/ruby-advisory-db/gems/yard/CVE-2017-17042.yml +0 -16
  511. data/data/ruby-advisory-db/gems/yard/CVE-2019-1020001.yml +0 -17
  512. data/data/ruby-advisory-db/gems/yard/GHSA-xfhh-rx56-rxcr.yml +0 -12
  513. data/data/ruby-advisory-db/lib/cf_scrape.py +0 -5
  514. data/data/ruby-advisory-db/lib/github_advisory_sync.rb +0 -296
  515. data/data/ruby-advisory-db/libraries/rubygems +0 -1
  516. data/data/ruby-advisory-db/rubies/jruby/CVE-2010-1330.yml +0 -17
  517. data/data/ruby-advisory-db/rubies/jruby/CVE-2011-4838.yml +0 -15
  518. data/data/ruby-advisory-db/rubies/jruby/CVE-2012-5370.yml +0 -17
  519. data/data/ruby-advisory-db/rubies/jruby/OSVDB-94644.yml +0 -12
  520. data/data/ruby-advisory-db/rubies/rbx/CVE-2012-5372.yml +0 -17
  521. data/data/ruby-advisory-db/rubies/rbx/OSVDB-78119.yml +0 -13
  522. data/data/ruby-advisory-db/rubies/ruby/CVE-2007-5162.yml +0 -16
  523. data/data/ruby-advisory-db/rubies/ruby/CVE-2007-5770.yml +0 -17
  524. data/data/ruby-advisory-db/rubies/ruby/CVE-2008-1447.yml +0 -15
  525. data/data/ruby-advisory-db/rubies/ruby/CVE-2008-1891.yml +0 -21
  526. data/data/ruby-advisory-db/rubies/ruby/CVE-2008-2376.yml +0 -18
  527. data/data/ruby-advisory-db/rubies/ruby/CVE-2008-2662.yml +0 -22
  528. data/data/ruby-advisory-db/rubies/ruby/CVE-2008-2663.yml +0 -21
  529. data/data/ruby-advisory-db/rubies/ruby/CVE-2008-2664.yml +0 -21
  530. data/data/ruby-advisory-db/rubies/ruby/CVE-2008-2725.yml +0 -22
  531. data/data/ruby-advisory-db/rubies/ruby/CVE-2008-2726.yml +0 -18
  532. data/data/ruby-advisory-db/rubies/ruby/CVE-2008-3443.yml +0 -17
  533. data/data/ruby-advisory-db/rubies/ruby/CVE-2008-3655.yml +0 -18
  534. data/data/ruby-advisory-db/rubies/ruby/CVE-2008-3656.yml +0 -19
  535. data/data/ruby-advisory-db/rubies/ruby/CVE-2008-3657.yml +0 -16
  536. data/data/ruby-advisory-db/rubies/ruby/CVE-2008-3790.yml +0 -16
  537. data/data/ruby-advisory-db/rubies/ruby/CVE-2008-3905.yml +0 -17
  538. data/data/ruby-advisory-db/rubies/ruby/CVE-2009-0642.yml +0 -17
  539. data/data/ruby-advisory-db/rubies/ruby/CVE-2009-1904.yml +0 -17
  540. data/data/ruby-advisory-db/rubies/ruby/CVE-2009-4124.yml +0 -17
  541. data/data/ruby-advisory-db/rubies/ruby/CVE-2009-4492.yml +0 -20
  542. data/data/ruby-advisory-db/rubies/ruby/CVE-2009-5147.yml +0 -13
  543. data/data/ruby-advisory-db/rubies/ruby/CVE-2010-0541.yml +0 -17
  544. data/data/ruby-advisory-db/rubies/ruby/CVE-2010-2489.yml +0 -17
  545. data/data/ruby-advisory-db/rubies/ruby/CVE-2011-0188.yml +0 -17
  546. data/data/ruby-advisory-db/rubies/ruby/CVE-2011-1004.yml +0 -20
  547. data/data/ruby-advisory-db/rubies/ruby/CVE-2011-1005.yml +0 -15
  548. data/data/ruby-advisory-db/rubies/ruby/CVE-2011-2686.yml +0 -17
  549. data/data/ruby-advisory-db/rubies/ruby/CVE-2011-2705.yml +0 -16
  550. data/data/ruby-advisory-db/rubies/ruby/CVE-2011-3009.yml +0 -17
  551. data/data/ruby-advisory-db/rubies/ruby/CVE-2011-3389.yml +0 -18
  552. data/data/ruby-advisory-db/rubies/ruby/CVE-2011-4815.yml +0 -14
  553. data/data/ruby-advisory-db/rubies/ruby/CVE-2012-4464.yml +0 -17
  554. data/data/ruby-advisory-db/rubies/ruby/CVE-2012-4466.yml +0 -16
  555. data/data/ruby-advisory-db/rubies/ruby/CVE-2012-4481.yml +0 -15
  556. data/data/ruby-advisory-db/rubies/ruby/CVE-2012-4522.yml +0 -16
  557. data/data/ruby-advisory-db/rubies/ruby/CVE-2012-5371.yml +0 -18
  558. data/data/ruby-advisory-db/rubies/ruby/CVE-2013-1821.yml +0 -16
  559. data/data/ruby-advisory-db/rubies/ruby/CVE-2013-2065.yml +0 -19
  560. data/data/ruby-advisory-db/rubies/ruby/CVE-2013-4073.yml +0 -21
  561. data/data/ruby-advisory-db/rubies/ruby/CVE-2013-4164.yml +0 -17
  562. data/data/ruby-advisory-db/rubies/ruby/CVE-2014-2525.yml +0 -20
  563. data/data/ruby-advisory-db/rubies/ruby/CVE-2014-3916.yml +0 -16
  564. data/data/ruby-advisory-db/rubies/ruby/CVE-2014-4975.yml +0 -17
  565. data/data/ruby-advisory-db/rubies/ruby/CVE-2014-8080.yml +0 -19
  566. data/data/ruby-advisory-db/rubies/ruby/CVE-2014-8090.yml +0 -22
  567. data/data/ruby-advisory-db/rubies/ruby/CVE-2015-1855.yml +0 -17
  568. data/data/ruby-advisory-db/rubies/ruby/CVE-2015-7551.yml +0 -19
  569. data/data/ruby-advisory-db/rubies/ruby/CVE-2015-9096.yml +0 -20
  570. data/data/ruby-advisory-db/rubies/ruby/CVE-2017-0898.yml +0 -19
  571. data/data/ruby-advisory-db/rubies/ruby/CVE-2017-10784.yml +0 -25
  572. data/data/ruby-advisory-db/rubies/ruby/CVE-2017-14033.yml +0 -22
  573. data/data/ruby-advisory-db/rubies/ruby/CVE-2017-14064.yml +0 -20
  574. data/data/ruby-advisory-db/rubies/ruby/CVE-2017-17405.yml +0 -22
  575. data/data/ruby-advisory-db/rubies/ruby/CVE-2017-17742.yml +0 -22
  576. data/data/ruby-advisory-db/rubies/ruby/CVE-2018-16395.yml +0 -36
  577. data/data/ruby-advisory-db/rubies/ruby/CVE-2018-16396.yml +0 -26
  578. data/data/ruby-advisory-db/rubies/ruby/CVE-2018-6914.yml +0 -27
  579. data/data/ruby-advisory-db/rubies/ruby/CVE-2018-8777.yml +0 -21
  580. data/data/ruby-advisory-db/rubies/ruby/CVE-2018-8778.yml +0 -20
  581. data/data/ruby-advisory-db/rubies/ruby/CVE-2018-8779.yml +0 -28
  582. data/data/ruby-advisory-db/rubies/ruby/CVE-2018-8780.yml +0 -22
  583. data/data/ruby-advisory-db/rubies/ruby/CVE-2019-15845.yml +0 -18
  584. data/data/ruby-advisory-db/rubies/ruby/CVE-2019-16201.yml +0 -15
  585. data/data/ruby-advisory-db/rubies/ruby/CVE-2019-16254.yml +0 -19
  586. data/data/ruby-advisory-db/rubies/ruby/CVE-2019-16255.yml +0 -20
  587. data/data/ruby-advisory-db/rubies/ruby/CVE-2020-10663.yml +0 -29
  588. data/data/ruby-advisory-db/rubies/ruby/CVE-2020-10933.yml +0 -25
  589. data/data/ruby-advisory-db/scripts/post-advisories.sh +0 -18
  590. data/data/ruby-advisory-db/spec/advisories_spec.rb +0 -23
  591. data/data/ruby-advisory-db/spec/advisory_example.rb +0 -228
  592. data/data/ruby-advisory-db/spec/gem_example.rb +0 -44
  593. data/data/ruby-advisory-db/spec/library_example.rb +0 -21
  594. data/data/ruby-advisory-db/spec/ruby_example.rb +0 -29
  595. data/data/ruby-advisory-db/spec/schemas/gem.yml +0 -71
  596. data/data/ruby-advisory-db/spec/schemas/ruby.yml +0 -36
  597. data/data/ruby-advisory-db/spec/spec_helper.rb +0 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c1c2ead83ab8d3dac034093a5ac034fbf3235fed7077e47c2f491a9f8fa24d6c
4
- data.tar.gz: c520084f591d25b66f1524a1bfaa900297a6c4517e000f38ce46bc66fbdb812a
3
+ metadata.gz: 94290135207c14256ac6d7251be3f0641619ec1273c562bb9c14a1b8ee8e28d5
4
+ data.tar.gz: 83d1b6b88e88d5c850d7daadde5d3235389c9620ab35414d78f1be13cd54387d
5
5
  SHA512:
6
- metadata.gz: becd1a0bf6735ab08c3db5bd18199ceea5682e240a18ea2da88b8f9ff7c121ca11e5912613b559dc5916ff5db3e8e1d93627ead52e5a5bfc9f89ea574efb867d
7
- data.tar.gz: 8a111e0b5e19eff5777bbe117560cc16f6d70a113fbb3d5059457557647a31ecef80f54956bb4f44d866d970579ed1fe19b0279aceed5355100b95a307a79491
6
+ metadata.gz: 28a461def90014d7d1dea437c17637d342bb8a46a08d1874091effa135a9303b621428ecf57d497867db2a9bda4d76bea032197e447edf8730432558ee1208cd
7
+ data.tar.gz: 400fb39383074b315b5d2d7e9339da907f24554c99a00358bd309ca7d6101443229997bb49cb54d8d473e4d6acf3793b294c795349dcc3d0615683e283fbd17a
@@ -0,0 +1,28 @@
1
+ name: CI
2
+
3
+ on: [ push, pull_request ]
4
+
5
+ jobs:
6
+ tests:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ fail-fast: false
10
+ matrix:
11
+ ruby:
12
+ - 2.4
13
+ - 2.5
14
+ - 2.6
15
+ - 2.7
16
+ - jruby
17
+ - truffleruby
18
+ name: Ruby ${{ matrix.ruby }}
19
+ steps:
20
+ - uses: actions/checkout@v2
21
+ - name: Set up Ruby
22
+ uses: ruby/setup-ruby@v1
23
+ with:
24
+ ruby-version: ${{ matrix.ruby }}
25
+ - name: Install dependencies
26
+ run: bundle install --jobs 4 --retry 3
27
+ - name: Run tests
28
+ run: bundle exec rake test
data/.gitignore CHANGED
@@ -6,5 +6,6 @@ doc/
6
6
  coverage/
7
7
  pkg/
8
8
  spec/bundle/*/.bundle/
9
+ spec/fixtures/database
9
10
  vendor/bundle/
10
11
  tmp/
data/.rspec CHANGED
@@ -1 +1 @@
1
- --colour --format documentation
1
+ --colour --format documentation --exclude-pattern spec/fixtures/**/*_spec.rb
@@ -1,3 +1,59 @@
1
+ ### 0.8.0 / 2020-12-XX
2
+
3
+ * No longer vendor [ruby-advisory-db].
4
+ * Added {Bundler::Audit::Configuration}.
5
+ * Supports loading YAML configuration data from a `.bundler-audit.yml` file.
6
+ * Added {Bundler::Audit::Results}.
7
+ * Added {Bundler::Audit::Report}.
8
+ * Added {Bundler::Audit::CLI::Formats}.
9
+ * Added {Bundler::Audit::CLI::Formats::Text}.
10
+ * Added {Bundler::Audit::CLI::Formats::JSON}.
11
+ * Added {Bundler::Audit::Database::DEFAULT_PATH}.
12
+ * Added {Bundler::Audit::Database.exists?}.
13
+ * Added {Bundler::Audit::Database#git?}.
14
+ * Added {Bundler::Audit::Database#update!}.
15
+ * Will raise a {Bundler::Audit::Database::UpdateFailed UpdateFailed}
16
+ exception, if the `git pull` command fails.
17
+ * Added {Bundler::Audit::Database#last_updated_at}.
18
+ * Added {Bundler::Audit::Scanner#report}.
19
+ * {Bundler::Audit::Database::USER_PATH} is now `Gem.user_home` aware.
20
+ * `Gem.user_home` will try to infer `HOME`, even if it is not set.
21
+ * {Bundler::Audit::Database#download} will now raise a
22
+ {Bundler::Audit::Database::DownloadFailed DownloadFailed} exception, if the
23
+ `git clone` command fails.
24
+ * {Bundler::Audit::Scanner#initialize}:
25
+ * Now accepts an additional `database` and `config_dot_file` arguments.
26
+ * Will now raise a `Bundler::GemfileLockNotFound` exception,
27
+ if the given `Gemfile.lock` file cannot be found.
28
+ * {Bundler::Audit::Scanner#scan_sources} will now ignore any source with a
29
+ `127.0.0.0/8` or `::1/128` IP address.
30
+ * {Bundler::Audit::Scanner#scan_specs} will ignore any advisories listed in
31
+ {Bundler::Audit::Configuration#ignore}, which is loaded from the
32
+ `.bundler-audit.yml` file.
33
+ * Deprecated {Bundler::Audit::Database.update!} in favor of
34
+ {Bundler::Audit::Database#update! #update!}.
35
+ * Removed `Bundler::Audit::Database::VENDORED_PATH`.
36
+ * Removed `Bundler::Audit::Database::VENDORED_TIMESTAMP`.
37
+
38
+ #### CLI
39
+
40
+ * Added `bundle-audit stats`.
41
+ * Added `bundle-audit download`.
42
+ * `bundle-audit check`:
43
+ * Now accepts a optional `DIR` argument for the project directory.
44
+ * `bundle-audit check` will now print an explicit error message and exit,
45
+ if the given `DIR` does not exist.
46
+ * Will now auto-download/auto-update [ruby-advisory-db] to
47
+ ensure the latest advisory information.
48
+ * Now supports a `--database` option for specifying a path
49
+ to an alternative [ruby-advisory-db] copy.
50
+ * Now supports a `--gemfile-lock` option for specifying a
51
+ custom `Gemfile.lock` file within the project directory.
52
+ * Now supports a `--format` option for specifying the
53
+ desired format. `text` and `json` are supported, but other custom formats
54
+ can be loaded. See {Bundler::Audit::CLI::Formats}.
55
+ * Now supports a `--output` option for writing the report output to a file.
56
+
1
57
  ### 0.7.0.1 / 2020-06-12
2
58
 
3
59
  * Forgot to populate `data/ruby-advisory-db`.
@@ -12,6 +68,7 @@
12
68
  * Avoid rebasing the ruby-advisory-db when updating (@nicknovitski).
13
69
  * Fixed issue with Bundler 2.x where source URIs are no longer parsed as
14
70
  `URI::HTTP` objects, but as `Bundler::URI::HTTP` objects. (@milgner)
71
+ * Make it more explicit that git is required for database updates (@fatkodima)
15
72
 
16
73
  ### 0.6.1 / 2019-01-17
17
74
 
data/Gemfile CHANGED
@@ -4,7 +4,7 @@ gemspec
4
4
 
5
5
  group :development do
6
6
  gem 'rake'
7
- gem 'kramdown', '~> 0.14'
7
+ gem 'kramdown', '~> 2.0'
8
8
 
9
9
  gem 'rubygems-tasks', '~> 0.2'
10
10
  gem 'rspec', '~> 3.0'
data/README.md CHANGED
@@ -112,10 +112,26 @@ Update the [ruby-advisory-db] and check `Gemfile.lock` (useful for CI runs):
112
112
 
113
113
  $ bundle-audit check --update
114
114
 
115
+ Checking the `Gemfile.lock` without updating the [ruby-advisory-db]:
116
+
117
+ $ bundle-audit check --no-update
118
+
115
119
  Ignore specific advisories:
116
120
 
117
121
  $ bundle-audit check --ignore OSVDB-108664
118
122
 
123
+ Checking a custom `Gemfile.lock` file:
124
+
125
+ $ bundle-audit check --gemfile Gemfile.custom.lock
126
+
127
+ Output the audit's results in JSON:
128
+
129
+ $ bundle-audit check --format json
130
+
131
+ Output the audit's results in JSON, to a file:
132
+
133
+ $ bundle-audit check --format json --output bundle-audit.json
134
+
119
135
  Rake task:
120
136
 
121
137
  ```ruby
@@ -125,22 +141,61 @@ Bundler::Audit::Task.new
125
141
  task default: 'bundle:audit'
126
142
  ```
127
143
 
144
+ ## Configuration File
145
+
146
+ bundler-audit also supports a per-project configuration file:
147
+
148
+ `.bundler-audit.yml`:
149
+
150
+ ---
151
+ ignore:
152
+ - CVE-YYYY-XXXX
153
+ - ...
154
+
155
+ * `ignore:` \[Array\<String\>\] - A list of advisory IDs to ignore.
156
+
128
157
  ## Requirements
129
158
 
159
+ * [git]
130
160
  * [ruby] >= 1.9.3
131
161
  * [rubygems] >= 1.8
132
162
  * [thor] >= 0.18, < 2
133
- * [bundler] ~> 1.2
163
+ * [bundler] >= 1.2.0, < 3
134
164
 
135
165
  ## Install
136
166
 
137
167
  $ [sudo] gem install bundler-audit
138
168
 
169
+ ### Git
170
+
171
+ * Debian / Ubuntu:
172
+
173
+ $ sudo apt install git
174
+
175
+ * RedHat / Fedora:
176
+
177
+ $ sudo dnf install git
178
+
179
+ * Alpine Linux:
180
+
181
+ $ apk add git
182
+
183
+ * macOS:
184
+
185
+ $ brew install git
186
+
139
187
  ## Contributing
140
188
 
141
- 1. Clone the repo
142
- 2. `git submodule update --init` # To populate data/ruby-advisory-db
143
- 3. `bundle exec rake`
189
+ 1. https://github.com/rubysec/bundler-audit/fork
190
+ 2. `git clone YOUR_FORK_URI`
191
+ 3. `cd bundler-audit/`
192
+ 4. `budle install`
193
+ 5. `bundle exec rake spec`
194
+ 6. `git checkout -b YOUR_FEATURE`
195
+ 7. Make your changes
196
+ 8. `bundle exec rake spec`
197
+ 9. `git commit -a`
198
+ 10. `git push origin YOUR_FEATURE`
144
199
 
145
200
  ## License
146
201
 
@@ -159,10 +214,12 @@ GNU General Public License for more details.
159
214
  You should have received a copy of the GNU General Public License
160
215
  along with bundler-audit. If not, see <http://www.gnu.org/licenses/>.
161
216
 
217
+ [git]: https://git-scm.com
162
218
  [ruby]: https://ruby-lang.org
163
219
  [rubygems]: https://rubygems.org
164
220
  [thor]: http://whatisthor.com/
165
221
  [bundler]: https://github.com/carlhuda/bundler#readme
222
+ [git]: https://github.com/git/git
166
223
 
167
224
  [OSVDB]: http://osvdb.org/
168
225
  [ruby-advisory-db]: https://github.com/rubysec/ruby-advisory-db
data/Rakefile CHANGED
@@ -14,29 +14,6 @@ require 'time'
14
14
  require 'rubygems/tasks'
15
15
  Gem::Tasks.new
16
16
 
17
- directory 'data/ruby-advisory-db' do
18
- sh 'git', 'submodule', 'update', '--init'
19
- end
20
-
21
- namespace :db do
22
- desc 'Updates data/ruby-advisory-db'
23
- task :update => 'data/ruuby-advsisory-db' do
24
- timestamp = nil
25
-
26
- chdir 'data/ruby-advisory-db' do
27
- sh 'git', 'pull', 'origin', 'master'
28
-
29
- File.open('../ruby-advisory-db.ts','w') do |file|
30
- file.write Time.parse(`git log --date=iso8601 --pretty="%cd" -1`).utc
31
- end
32
- end
33
-
34
- sh 'git', 'commit', 'data/ruby-advisory-db',
35
- 'data/ruby-advisory-db.ts',
36
- '-m', 'Updated ruby-advisory-db'
37
- end
38
- end
39
-
40
17
  require 'rspec/core/rake_task'
41
18
  RSpec::Core::RakeTask.new
42
19
 
@@ -26,13 +26,6 @@ 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
-
36
29
  gem.executables = gemspec.fetch('executables') do
37
30
  glob['bin/*'].map { |path| File.basename(path) }
38
31
  end
@@ -121,7 +121,7 @@ module Bundler
121
121
  #
122
122
  # Determines how critical the vulnerability is.
123
123
  #
124
- # @return [:none, :low, :medium, :high, :critical]
124
+ # @return [:none, :low, :medium, :high, :critical, nil]
125
125
  # The criticality of the vulnerability based on the CVSS score.
126
126
  #
127
127
  def criticality
@@ -189,6 +189,17 @@ module Bundler
189
189
  !patched?(version) && !unaffected?(version)
190
190
  end
191
191
 
192
+ #
193
+ # Compares two advisories.
194
+ #
195
+ # @param [Advisory] other
196
+ #
197
+ # @return [Boolean]
198
+ #
199
+ def ==(other)
200
+ id == other.id
201
+ end
202
+
192
203
  alias to_s id
193
204
 
194
205
  end
@@ -17,10 +17,10 @@
17
17
 
18
18
  require 'bundler/audit/scanner'
19
19
  require 'bundler/audit/version'
20
+ require 'bundler/audit/cli/formats'
20
21
 
21
22
  require 'thor'
22
23
  require 'bundler'
23
- require 'bundler/vendored_thor'
24
24
 
25
25
  module Bundler
26
26
  module Audit
@@ -29,44 +29,102 @@ module Bundler
29
29
  default_task :check
30
30
  map '--version' => :version
31
31
 
32
- desc 'check', 'Checks the Gemfile.lock for insecure dependencies'
32
+ desc 'check [DIR]', 'Checks the Gemfile.lock for insecure dependencies'
33
33
  method_option :quiet, :type => :boolean, :aliases => '-q'
34
34
  method_option :verbose, :type => :boolean, :aliases => '-v'
35
35
  method_option :ignore, :type => :array, :aliases => '-i'
36
36
  method_option :update, :type => :boolean, :aliases => '-u'
37
+ method_option :database, :type => :string, :aliases => '-D', :default => Database::USER_PATH
38
+ method_option :format, :type => :string, :default => 'text',
39
+ :aliases => '-F'
40
+ method_option :gemfile_lock, :type => :string, :aliases => '-G', :default => 'Gemfile.lock'
41
+ method_option :output, :type => :string, :aliases => '-o'
42
+
43
+ def check(dir=Dir.pwd)
44
+ unless File.directory?(dir)
45
+ say "No such file or directory: #{dir}", :red
46
+ exit 1
47
+ end
37
48
 
38
- def check
39
- update if options[:update]
49
+ begin
50
+ extend Formats.load(options[:format])
51
+ rescue Formats::FormatNotFound
52
+ say "Unknown format: #{options[:format]}", :red
53
+ exit 1
54
+ end
40
55
 
41
- scanner = Scanner.new
42
- vulnerable = false
56
+ if !Database.exists?
57
+ download(options[:database])
58
+ elsif options[:update]
59
+ update(options[:database])
60
+ end
43
61
 
44
- scanner.scan(:ignore => options.ignore) do |result|
45
- vulnerable = true
62
+ database = Database.new(options[:database])
63
+ scanner = begin
64
+ Scanner.new(dir,options[:gemfile_lock],database)
65
+ rescue Bundler::GemfileLockNotFound => exception
66
+ say exception.message, :red
67
+ exit 1
68
+ end
69
+ report = scanner.report(:ignore => options.ignore)
46
70
 
47
- case result
48
- when Scanner::InsecureSource
49
- print_warning "Insecure Source URI found: #{result.source}"
50
- when Scanner::UnpatchedGem
51
- print_advisory result.gem, result.advisory
52
- end
71
+ output = if options[:output] then File.new(options[:output],'w')
72
+ else $stdout
73
+ end
74
+
75
+ print_report(report,output)
76
+
77
+ output.close if options[:output]
78
+
79
+ exit(1) if report.vulnerable?
80
+ end
81
+
82
+ desc 'stats', 'Prints ruby-advisory-db stats'
83
+ method_option :quiet, :type => :boolean, :aliases => '-q'
84
+
85
+ def stats(path=Database.path)
86
+ database = Database.new(path)
87
+
88
+ puts "ruby-advisory-db:"
89
+ puts " advisories:\t#{database.size} advisories"
90
+ puts " last updated:\t#{database.last_updated_at}"
91
+ end
92
+
93
+ desc 'download', 'Downloads ruby-advisory-db'
94
+ method_option :quiet, :type => :boolean, :aliases => '-q'
95
+
96
+ def download(path=Database.path)
97
+ if Database.exists?(path)
98
+ say "Database already exists", :yellow
99
+ return
53
100
  end
54
101
 
55
- if vulnerable
56
- say "Vulnerabilities found!", :red
102
+ say("Download ruby-advisory-db ...") unless options.quiet?
103
+
104
+ begin
105
+ Database.download(path: path, quiet: options.quiet?)
106
+ rescue Database::DownloadFailed => error
107
+ say error.message, :red
57
108
  exit 1
58
- else
59
- say("No vulnerabilities found", :green) unless options.quiet?
60
109
  end
110
+
111
+ stats(path) unless options.quiet?
61
112
  end
62
113
 
63
114
  desc 'update', 'Updates the ruby-advisory-db'
64
115
  method_option :quiet, :type => :boolean, :aliases => '-q'
65
116
 
66
- def update
117
+ def update(path=Database.path)
118
+ unless Database.exists?(path)
119
+ download(path)
120
+ return
121
+ end
122
+
67
123
  say("Updating ruby-advisory-db ...") unless options.quiet?
68
124
 
69
- case Database.update!(quiet: options.quiet?)
125
+ database = Database.new(path)
126
+
127
+ case database.update!(quiet: options.quiet?)
70
128
  when true
71
129
  say("Updated ruby-advisory-db", :green) unless options.quiet?
72
130
  when false
@@ -80,9 +138,7 @@ module Bundler
80
138
  say "Skipping update", :yellow
81
139
  end
82
140
 
83
- unless options.quiet?
84
- puts("ruby-advisory-db: #{Database.new.size} advisories")
85
- end
141
+ stats(path) unless options.quiet?
86
142
  end
87
143
 
88
144
  desc 'version', 'Prints the bundler-audit version'
@@ -94,68 +150,18 @@ module Bundler
94
150
 
95
151
  protected
96
152
 
153
+ #
154
+ # @abstract
155
+ #
156
+ def print_report(report)
157
+ raise(NotImplementedError,"#{self.class}##{__method__} not defined")
158
+ end
159
+
97
160
  def say(message="", color=nil)
98
161
  color = nil unless $stdout.tty?
99
162
  super(message.to_s, color)
100
163
  end
101
164
 
102
- def print_warning(message)
103
- say message, :yellow
104
- end
105
-
106
- def print_advisory(gem, advisory)
107
- say "Name: ", :red
108
- say gem.name
109
-
110
- say "Version: ", :red
111
- say gem.version
112
-
113
- say "Advisory: ", :red
114
-
115
- if advisory.cve
116
- say advisory.cve_id
117
- elsif advisory.osvdb
118
- say advisory.osvdb_id
119
- elsif advisory.ghsa
120
- say advisory.ghsa_id
121
- end
122
-
123
- say "Criticality: ", :red
124
- case advisory.criticality
125
- when :none then say "None"
126
- when :low then say "Low"
127
- when :medium then say "Medium", :yellow
128
- when :high then say "High", [:red, :bold]
129
- when :critical then say "Critical", [:red, :bold]
130
- else say "Unknown"
131
- end
132
-
133
- say "URL: ", :red
134
- say advisory.url
135
-
136
- if options.verbose?
137
- say "Description:", :red
138
- say
139
-
140
- print_wrapped advisory.description, :indent => 2
141
- say
142
- else
143
-
144
- say "Title: ", :red
145
- say advisory.title
146
- end
147
-
148
- unless advisory.patched_versions.empty?
149
- say "Solution: upgrade to ", :red
150
- say advisory.patched_versions.join(', ')
151
- else
152
- say "Solution: ", :red
153
- say "remove or disable this gem until a patch is available!", [:red, :bold]
154
- end
155
-
156
- say
157
- end
158
-
159
165
  end
160
166
  end
161
167
  end