ammar / regexp_parser

A regular expression parser library for Ruby
MIT License
144 stars 23 forks source link

Opt-in for MFA requirement explicitly #91

Closed tagliala closed 6 months ago

tagliala commented 6 months ago

As a pupular gem, regexp_parser implicitly requires that all privileged operations by any of the owners require OTP.

However, by explicitly setting rubygems_mfa_required metadata, the gem will show "NEW VERSIONS REQUIRE MFA" and "VERSION PUBLISHED WITH MFA" in the sidebar at https://github.com/ammar/regexp_parser

Ref:

jaynetics commented 6 months ago

Thank you for the PR! However, this change is redundant as MFA has long been required for gems with a high number of downloads, and I'd rather not add code that has no effect.

tagliala commented 6 months ago

Hi,

thanks for your anwser

I know that it is required for gems with "a high number of downloads", however I've submitted the PR the same because it will explicitly add to rubygems "NEW VERSIONS REQUIRE MFA" and "VERSION PUBLISHED WITH MFA" fields.

I usually check all the libraries in our stack when there is an upgrade to confirm that it was pushed by a legit account

Ref: https://rubygems.org/gems/regexp_parser

This library

image

Rails

https://rubygems.org/gems/rails

image

tagliala commented 6 months ago

I can edit the commit message because the first one is a copy & paste.

For this gem, it would more appropriate to add the fact that explicitly enabling mfa will show metadata information on rubygems

tagliala commented 6 months ago

Rebased and reworded, now it should be better

mbj commented 6 months ago

Yeah so this is about making the MFA fact more "machine parsable" not so much about changing the fact MFA is required. I know / run corporate tools that scan for this signal. It makes regexp_parser more easy to integrate into a dependency tree.

All my popular gems are also under that explicit metadata signal BTW.

jaynetics commented 6 months ago

That makes sense, thanks for the explanations. I've released v2.9.2 with this change.