Merge pull request #1367 from MikeMcQuaid/audit-check-master-branch

audit: check for master branch tar/zipballs.
This commit is contained in:
Mike McQuaid 2016-10-30 13:29:47 -04:00 committed by GitHub
commit 20c8c5958e

View File

@ -1290,6 +1290,11 @@ class ResourceAuditor
problem "Please use https:// for #{u}"
end
# Check for master branch GitHub archives.
urls.grep(%r{^https://github\.com/.*archive/master\.(tar\.gz|zip)$}) do
problem "Use versioned rather than branch tarballs for stable checksums."
end
# Use new-style archive downloads
urls.each do |u|
next unless u =~ %r{https://.*github.*/(?:tar|zip)ball/} && u !~ /\.git$/