From a732eb2a610bade6c0e2c62c52d37f81c9c423ff Mon Sep 17 00:00:00 2001 From: Adam Townsend Date: Sun, 22 Oct 2023 15:48:40 -0700 Subject: [PATCH 1/3] added bundle-audit and ruby_audit gems --- Gemfile | 10 +++++++--- Gemfile.lock | 10 ++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index a4b240a..0e8aeae 100644 --- a/Gemfile +++ b/Gemfile @@ -2,6 +2,10 @@ source 'https://rubygems.org' +gem 'puma', '~> 6.4' + +gem 'rackup', '~> 2.1' + gem 'roda', '~> 3.72' gem 'sequel', '~> 5.72' @@ -24,8 +28,8 @@ group :test do gem 'simplecov' gem 'rubocop', require: false + + gem "ruby_audit", "~> 2.2" end -gem 'puma', '~> 6.4' - -gem 'rackup', '~> 2.1' +gem "bundle-audit", "~> 0.1.0" diff --git a/Gemfile.lock b/Gemfile.lock index 38e9efe..4e3383d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,6 +7,11 @@ GEM base64 (0.1.1) bigdecimal (3.1.4) builder (3.2.4) + bundle-audit (0.1.0) + bundler-audit + bundler-audit (0.9.1) + bundler (>= 1.2.0, < 3) + thor (~> 1.0) capybara (3.39.2) addressable matrix @@ -101,6 +106,8 @@ GEM rubocop-ast (1.29.0) parser (>= 3.2.1.0) ruby-progressbar (1.13.0) + ruby_audit (2.2.0) + bundler-audit (~> 0.9.0) rubyzip (2.3.2) selenium-webdriver (4.13.1) rexml (~> 3.2, >= 3.2.5) @@ -118,6 +125,7 @@ GEM mini_portile2 (~> 2.8.0) sys-uname (1.2.3) ffi (~> 1.1) + thor (1.3.0) tilt (2.3.0) unicode-display_width (2.5.0) webrick (1.8.1) @@ -129,6 +137,7 @@ PLATFORMS x86_64-freebsd-13 DEPENDENCIES + bundle-audit (~> 0.1.0) capybara (~> 3.39) cucumber (~> 9.0) erubi (~> 1.12) @@ -137,6 +146,7 @@ DEPENDENCIES roda (~> 3.72) rspec (~> 3.12) rubocop + ruby_audit (~> 2.2) selenium-webdriver (~> 4.13) sequel (~> 5.72) simplecov -- 2.41.0 From d7c910599555b0909ae4d732774bb390739e6d9f Mon Sep 17 00:00:00 2001 From: Adam Townsend Date: Sun, 22 Oct 2023 15:51:16 -0700 Subject: [PATCH 2/3] added audit checks, this should help keep things secure --- Jenkinsfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 53889bd..465c327 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,6 +23,14 @@ pipeline { sh 'sequel -m db/migrations sqlite://db/${DB_NAME}' } } + stage('Audit Dependencies') { + steps { + catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') { + sh 'bundle exec ruby-audit check' + sh 'bundle exec bundle-audit check' + } + } + } stage('Code Linting') { steps { catchError(buildResult: 'UNSTABLE', stageResult: 'FAILURE') { -- 2.41.0 From 6e30705810c939b03d62c080ba110d748d2aa5d6 Mon Sep 17 00:00:00 2001 From: Adam Townsend Date: Sun, 22 Oct 2023 15:57:57 -0700 Subject: [PATCH 3/3] rubocop autofixed quotes --- Gemfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 0e8aeae..c654450 100644 --- a/Gemfile +++ b/Gemfile @@ -29,7 +29,7 @@ group :test do gem 'rubocop', require: false - gem "ruby_audit", "~> 2.2" + gem 'ruby_audit', '~> 2.2' end -gem "bundle-audit", "~> 0.1.0" +gem 'bundle-audit', '~> 0.1.0' -- 2.41.0