From 8c3a6f1ca1da949c4b205e28da4ebeeb238a2d56 Mon Sep 17 00:00:00 2001 From: bcaller Date: Tue, 31 Jan 2023 14:50:54 +0000 Subject: [PATCH] More brakeman No need for gemfile --- assets/reviewdog/reviewdog.yml | 8 +++----- t3sts/brakeman/Gemfile | 5 ----- t3sts/brakeman/Gemfile.lock | 28 ---------------------------- 3 files changed, 3 insertions(+), 38 deletions(-) delete mode 100644 t3sts/brakeman/Gemfile delete mode 100644 t3sts/brakeman/Gemfile.lock diff --git a/assets/reviewdog/reviewdog.yml b/assets/reviewdog/reviewdog.yml index 9871c515..1c8cb79a 100644 --- a/assets/reviewdog/reviewdog.yml +++ b/assets/reviewdog/reviewdog.yml @@ -46,11 +46,9 @@ runner: cmd: | [ -f "$(find $SCRIPTPATH -type f -size +0 -name all_changed_files.txt)" ] &&\ cat $SCRIPTPATH/all_changed_files.txt | grep -q '\.rb$' &&\ - brakeman --quiet --no-exit-on-warn --no-exit-on-error --force --format text --text-fields file,line,message,link \ - | grep '^\(File\|Line\|Message\|Link\): ' -A1 \ - | tr '\n' '\1' \ - | sed -e 's/\x01\x01/\n/g' -e 's/\x01/~~~/g' -e 's/~~~Link:/

/g' \ + brakeman --quiet --no-exit-on-warn --no-exit-on-error --force --format json \ + | jq -r '.warnings[] | "\(.confidence[0:1]):\(.file):\(.line) \(.message)

Source: \(.link)"' \ | sed "s/$/

Cc @brave\/sec-team $ASSIGNEES/g" \ || true errorformat: - - "File: %f~~~Line: %l~~~Message: %m" \ No newline at end of file + - "%t:%f:%l %m" \ No newline at end of file diff --git a/t3sts/brakeman/Gemfile b/t3sts/brakeman/Gemfile deleted file mode 100644 index f915d8b7..00000000 --- a/t3sts/brakeman/Gemfile +++ /dev/null @@ -1,5 +0,0 @@ -# frozen_string_literal: true - -source "https://rubygems.org" - -gem "activerecord" \ No newline at end of file diff --git a/t3sts/brakeman/Gemfile.lock b/t3sts/brakeman/Gemfile.lock deleted file mode 100644 index b04b1f27..00000000 --- a/t3sts/brakeman/Gemfile.lock +++ /dev/null @@ -1,28 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - activemodel (7.0.4.2) - activesupport (= 7.0.4.2) - activerecord (7.0.4.2) - activemodel (= 7.0.4.2) - activesupport (= 7.0.4.2) - activesupport (7.0.4.2) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 1.6, < 2) - minitest (>= 5.1) - tzinfo (~> 2.0) - concurrent-ruby (1.2.0) - i18n (1.12.0) - concurrent-ruby (~> 1.0) - minitest (5.17.0) - tzinfo (2.0.5) - concurrent-ruby (~> 1.0) - -PLATFORMS - arm64-darwin-22 - -DEPENDENCIES - activerecord - -BUNDLED WITH - 2.4.2