Project

General

Profile

Bug #15384

ssl_certs are duplicated in RubyGems and Bundler

Added by vo.x (Vit Ondruch) 12 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Target version:
-
ruby -v:
ruby 2.6.0dev (2018-11-29 trunk 66092) [x86_64-linux]
[ruby-core:90313]

Description

It is pity that the same ssl_certs are shipped on multiple places, once as part of RubyGems and the other set as part of Bundler. This makes the security review much harder (actually, in Fedora/RHEL packages, we are not supposed to ship any certificates, so it makes it harder to remove them).

Therefore, please ship just one copy of the certificates if really necessary (it should not be necessary on properly maintained systems).


Files

unify-certification-bundler.patch (14.3 KB) unify-certification-bundler.patch hsbt (Hiroshi SHIBATA), 03/14/2019 02:47 AM

Associated revisions

History

Updated by shevegen (Robert A. Heiler) 12 months ago

Agree on the "one rather than two". It is probably redundant after the merge.

I can't answer the second sentence since there may have been (different?)
reasons for adding certificates - but it would make sense to require only
one rather than two either way.

Updated by hsbt (Hiroshi SHIBATA) 12 months ago

  • Assignee set to hsbt (Hiroshi SHIBATA)
  • Status changed from Open to Assigned

Updated by hsbt (Hiroshi SHIBATA) 8 months ago

I made a patch that unifies both certificates. I propose it to bundler upstream.

Updated by vo.x (Vit Ondruch) 8 months ago

Is the patch correct? Will it work when RubyGems are updated via gem update --system? I have not tested it, just wondering ...

Moreover, I don't understand why Bundler does not use RubyGems facilities for such functionality (but I understand the patch would be probably more complex :) ).

Updated by vo.x (Vit Ondruch) 8 months ago

vo.x (Vit Ondruch) wrote:

Is the patch correct? Will it work when RubyGems are updated via gem update --system? I have not tested it, just wondering ...

Gem::RUBYGEMS_DIR should be probably used to initialize the rubygems_certs_dir

https://github.com/rubygems/rubygems/blob/master/lib/rubygems.rb#L116

Updated by vo.x (Vit Ondruch) 8 months ago

There is even Gem::Request.get_cert_files

Updated by hsbt (Hiroshi SHIBATA) 7 months ago

  • Backport changed from 2.4: UNKNOWN, 2.5: UNKNOWN to 2.4: DONTNEED, 2.5: DONTNEED, 2.6: DONTNEED
  • Status changed from Assigned to Closed

I fixed it at r67539

Also available in: Atom PDF