rubygems / rubygems.org

The Ruby community's gem hosting service.
https://rubygems.org
MIT License
2.33k stars 926 forks source link

Being proactive about potential security issues #2101

Closed ioquatix closed 3 years ago

ioquatix commented 5 years ago

I know this is probably a very tricky issue, but watching https://github.com/dominictarr/event-stream/issues/116 unfold makes me realise how damaging such an issue can be.

I know from experience that people who no longer maintain gems are often willing to give up ownership.

I wonder if there is a way to minimise the impact of these issues.

For example:

I know this is an impossible problem, but it would probably make sense to raise the bar as high as possible by default, and people who explicitly opt out are accepting those risks.

One aspect of this which I think could be developed further, is the idea of commercial organisations. Normally open source code has no warranty, but some authors might like to say "I guarantee my organisation and the following dependencies/versions are safe/have been checked" and that could be a paid service or managed in a more commercial way in order to facilitate the effort required for checking/vetting packages. You could basically add this trust to your project (i.e. you pay for the secure token/key, add it to your project, and then bundle update will only update things that are explicitly trusted).

ioquatix commented 5 years ago

I started getting email when I publish gems - super awesome - great work everyone!

image
JonRowe commented 5 years ago

Theres a suggestion for the Elixir equivalent (hex.pm) about having diffs of the packages hosted by hex, would this be possible for rubygems?

mensfeld commented 5 years ago

@JonRowe it's already an issue in rubygems. Rubygems team internally uses my code: https://diff.coditsu.io/ it's not OSS (yet) due to some security concerns.

mensfeld commented 5 years ago

ref: https://github.com/rubygems/rubygems.org/issues/1853

lmansur commented 5 years ago

I created a PR to allow owners to audit their fellow owners regarding MFA. Should be a good start. https://github.com/rubygems/rubygems.org/pull/2129