From 7388c93688aca3361bc5062c244023cbf76f1819 Mon Sep 17 00:00:00 2001 From: nitin sanghi Date: Fri, 13 Feb 2026 14:28:07 +0530 Subject: [PATCH 1/2] Update clean lint roller script for stackprof false positive Signed-off-by: nitin sanghi --- cleanup_lint_roller.rb | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/cleanup_lint_roller.rb b/cleanup_lint_roller.rb index b29fba50..0211b840 100644 --- a/cleanup_lint_roller.rb +++ b/cleanup_lint_roller.rb @@ -1,12 +1,15 @@ #!/usr/bin/env ruby -# Removes stray Gemfile.lock shipped inside the lint_roller gem to appease scanners. +# Removes stray Gemfile.lock files shipped inside gems to appease security scanners. require "rubygems" -def cleanup_lint_roller_lockfile - puts "Cleaning up lint_roller Gemfile.lock..." - specs = Gem::Specification.find_all_by_name("lint_roller") +# List of gems that ship with Gemfile.lock files that should be removed +GEMS_WITH_LOCKFILES = %w[lint_roller stackprof-webnav].freeze + +def cleanup_gem_lockfile(gem_name) + puts "Cleaning up #{gem_name} Gemfile.lock..." + specs = Gem::Specification.find_all_by_name(gem_name) if specs.empty? - puts " No lint_roller gem installed" + puts " No #{gem_name} gem installed" return end @@ -15,13 +18,13 @@ def cleanup_lint_roller_lockfile if File.exist?(gemfile_lock_path) puts " Removing #{gemfile_lock_path}" File.delete(gemfile_lock_path) - puts " Successfully removed lint_roller Gemfile.lock" + puts " Successfully removed #{gem_name} Gemfile.lock" else puts " No Gemfile.lock found in #{spec.gem_dir}" end end rescue StandardError => e - warn " Warning: Failed to clean up lint_roller Gemfile.lock: #{e.message}" + warn " Warning: Failed to clean up #{gem_name} Gemfile.lock: #{e.message}" end -cleanup_lint_roller_lockfile +GEMS_WITH_LOCKFILES.each { |gem_name| cleanup_gem_lockfile(gem_name) } \ No newline at end of file From e238ba98a2a5c646d892ea2b41630ad96cea8769 Mon Sep 17 00:00:00 2001 From: nitin sanghi Date: Fri, 13 Feb 2026 14:51:04 +0530 Subject: [PATCH 2/2] Fix verify pipeline issue Signed-off-by: nitin sanghi --- cleanup_lint_roller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cleanup_lint_roller.rb b/cleanup_lint_roller.rb index 0211b840..dff36480 100644 --- a/cleanup_lint_roller.rb +++ b/cleanup_lint_roller.rb @@ -3,7 +3,7 @@ require "rubygems" # List of gems that ship with Gemfile.lock files that should be removed -GEMS_WITH_LOCKFILES = %w[lint_roller stackprof-webnav].freeze +GEMS_WITH_LOCKFILES = %w{lint_roller stackprof-webnav}.freeze def cleanup_gem_lockfile(gem_name) puts "Cleaning up #{gem_name} Gemfile.lock..." @@ -27,4 +27,4 @@ def cleanup_gem_lockfile(gem_name) warn " Warning: Failed to clean up #{gem_name} Gemfile.lock: #{e.message}" end -GEMS_WITH_LOCKFILES.each { |gem_name| cleanup_gem_lockfile(gem_name) } \ No newline at end of file +GEMS_WITH_LOCKFILES.each { |gem_name| cleanup_gem_lockfile(gem_name) }