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

Shell-based solution to deleting duplicate advisories created by github_advisory_sync.rb script (#647) #655

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ desc "Sync GitHub RubyGem Advisories into this project"
task :sync_github_advisories, [:gem_name] do |_, args|
require_relative "lib/github_advisory_sync"
GitHub::GitHubAdvisorySync.sync(gem_name: args[:gem_name])
system('./lib/rmdups')
end

task :lint => ['lint:yaml']
Expand Down
19 changes: 19 additions & 0 deletions lib/rmdups
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# (Mixed case gem name) (GHSA#2312) (GHSA#2310)
rm -f \
./gems/arabic-prawn/CVE-2014-2322.yml \
./gems/redcloth/CVE-2012-6684.yml
rmdir gems/arabic-prawn gems/redcloth 2> /dev/null # empty dirs (rake doesn't like them)

# Under rubies/ruby instead of "gems" (OK AS-IS) (GHSA#2437)
rm -f ./gems/webrick/CVE-2009-4492.yml

# (Used CVE instead of GHSA id) (GHSA#2316) (GHSA#2315) (GHSA#2314) among others
rm -f \
./gems/spree_auth_devise/GHSA-6mqr-q86q-6gwr.yml \
./gems/spree_auth_devise/GHSA-8xfw-5q82-3652.yml \
./gems/spree_auth_devise/GHSA-gpqc-4pp7-5954.yml \
./gems/user_agent_parser/GHSA-pcqq-5962-hvcw.yml \
./gems/nokogiri/GHSA-fq42-c5rg-92c2.yml \
./gems/nokogiri/GHSA-gx8x-g87m-h5q6.yml \
./gems/nokogiri/GHSA-v6gp-9mmm-c6p5.yml \
./gems/nokogiri/GHSA-xxx9-3xcr-gjj3.yml