diff --git a/.rubocop.yml b/.rubocop.yml index 23bb0fa8be8..abdda90a33e 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1181,6 +1181,10 @@ GitlabSecurity/DeepMunge: - 'lib/**/*.rake' - 'spec/**/*' +# To be enabled by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/13610 +GitlabSecurity/JsonSerialization: + Enabled: false + GitlabSecurity/PublicSend: Enabled: true Exclude: diff --git a/Gemfile b/Gemfile index dcdaf6cde7b..782bbfab5db 100644 --- a/Gemfile +++ b/Gemfile @@ -337,7 +337,7 @@ group :development, :test do gem 'rubocop', '~> 0.49.1', require: false gem 'rubocop-rspec', '~> 1.15.1', require: false - gem 'rubocop-gitlab-security', '~> 0.0.6', require: false + gem 'rubocop-gitlab-security', '~> 0.1.0', require: false gem 'scss_lint', '~> 0.54.0', require: false gem 'haml_lint', '~> 0.26.0', require: false gem 'simplecov', '~> 0.14.0', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 0fd52337b23..404e1ec2df0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -769,7 +769,7 @@ GEM rainbow (>= 1.99.1, < 3.0) ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) - rubocop-gitlab-security (0.0.6) + rubocop-gitlab-security (0.1.0) rubocop (>= 0.47.1) rubocop-rspec (1.15.1) rubocop (>= 0.42.0) @@ -1125,7 +1125,7 @@ DEPENDENCIES rspec-set (~> 0.1.3) rspec_profiling (~> 0.0.5) rubocop (~> 0.49.1) - rubocop-gitlab-security (~> 0.0.6) + rubocop-gitlab-security (~> 0.1.0) rubocop-rspec (~> 1.15.1) ruby-fogbugz (~> 0.2.1) ruby-prof (~> 0.16.2) @@ -1174,4 +1174,4 @@ DEPENDENCIES wikicloth (= 0.8.1) BUNDLED WITH - 1.15.3 + 1.15.4 diff --git a/lib/after_commit_queue.rb b/lib/after_commit_queue.rb index b67575a3ac2..4750a2c373a 100644 --- a/lib/after_commit_queue.rb +++ b/lib/after_commit_queue.rb @@ -7,7 +7,7 @@ module AfterCommitQueue end def run_after_commit(method = nil, &block) - _after_commit_queue << proc { self.send(method) } if method + _after_commit_queue << proc { self.send(method) } if method # rubocop:disable GitlabSecurity/PublicSend _after_commit_queue << block if block true end