Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow disabling specific links for specific gems via feature flag #3947

Closed
wants to merge 1 commit into from

Conversation

segiddins
Copy link
Member

Done so that we can disable the gem download link for metasploit, so the metasploit gem payes are not marked as malicious for linking to "malicious" content

Closes #3883

Done so that we can disable the gem download link for metasploit, so the metasploit gem payes are not marked as malicious for linking to "malicious" content
@segiddins segiddins requested a review from indirect July 18, 2023 07:53
@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

Merging #3947 (b0889f6) into master (475c774) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #3947   +/-   ##
=======================================
  Coverage   98.80%   98.80%           
=======================================
  Files         217      217           
  Lines        5417     5421    +4     
=======================================
+ Hits         5352     5356    +4     
  Misses         65       65           
Impacted Files Coverage Δ
app/models/links.rb 100.00% <100.00%> (ø)
app/models/rubygem.rb 98.71% <100.00%> (+0.01%) ⬆️

@simi simi self-requested a review July 18, 2023 08:03
@indirect
Copy link
Member

Good usage of LD IMO for easy updating 👍🏻

Copy link
Member

@simi simi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code-wise it looks ok.

In general, I'm against this change if not implemented in super-transparent (as explained at #3883 (comment)) way. That means to make it clear which pages and why are "soft-blocked". Using LaunchDarkly makes it hidden from users to find out. Storing this info info DB would be more transparent.

Per my understanding, there were no recent reports of this causing any problems to users. Do we really need to address this currently?

On the other side I'm not going to block this, feel free to ship this if there's consensus.

@@ -66,6 +66,7 @@

<h3 class="t-list__heading"><%= t '.links.header' %>:</h3>
<div class="t-list__items">
<code><%= @versioned_links.each.to_a.to_json %></code>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intended?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah debugging code, will delete

@indirect
Copy link
Member

I think adding a flash message or banner to any page where this is taking effect sounds like a good idea. Google Safe Browsing does still block several pages on rubygems.org, as shown in the screenshot below, and that is what we are hoping to resolve.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add per-gem flag to stop linking to .gem files
3 participants