audit: Raise a problem if the SourceForge download url uses http instead of https
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
parent
c534b1907d
commit
8a014b3221
@ -223,7 +223,7 @@ class FormulaAuditor
|
|||||||
next if p =~ %r[svn\.sourceforge]
|
next if p =~ %r[svn\.sourceforge]
|
||||||
|
|
||||||
# Is it a sourceforge http(s) URL?
|
# Is it a sourceforge http(s) URL?
|
||||||
next unless p =~ %r[^https?://.*\bsourceforge\.com]
|
next unless p =~ %r[^https?://.*\b(sourceforge|sf)\.(com|net)]
|
||||||
|
|
||||||
if p =~ /(\?|&)use_mirror=/
|
if p =~ /(\?|&)use_mirror=/
|
||||||
problem "Don't use #{$1}use_mirror in SourceForge urls (url is #{p})."
|
problem "Don't use #{$1}use_mirror in SourceForge urls (url is #{p})."
|
||||||
@ -245,6 +245,10 @@ class FormulaAuditor
|
|||||||
if p =~ %r[^http://\w+\.dl\.]
|
if p =~ %r[^http://\w+\.dl\.]
|
||||||
problem "Don't use specific dl mirrors in SourceForge urls (url is #{p})."
|
problem "Don't use specific dl mirrors in SourceForge urls (url is #{p})."
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if p.start_with? "http://downloads"
|
||||||
|
problem "Use https:// URLs for downloads from SourceForge (url is #{p})."
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Check for git:// GitHub repo urls, https:// is preferred.
|
# Check for git:// GitHub repo urls, https:// is preferred.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user