Skip to content

Commit 60d070f

Browse files
Merge pull request #204 from sul-dlss/add-brakeman-to-ci
Add bin/brakeman and enable in CI
2 parents d4965dc + 75b72a8 commit 60d070f

3 files changed

Lines changed: 38 additions & 1 deletion

File tree

.circleci/config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: 2.1
22
orbs:
3-
ruby-rails: sul-dlss/ruby-rails@4.11.0
3+
ruby-rails: sul-dlss/ruby-rails@4.12.0
44
workflows:
55
build:
66
jobs:
@@ -14,6 +14,8 @@ workflows:
1414
name: herblint
1515
- ruby-rails/stylelint:
1616
name: stylelint
17+
- ruby-rails/brakeman:
18+
name: brakeman
1719
- ruby-rails/test-rails:
1820
name: test
1921
context: dlss

bin/brakeman

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env ruby
2+
require "rubygems"
3+
require "bundler/setup"
4+
5+
ARGV.unshift("--ensure-latest")
6+
7+
load Gem.bin_path("brakeman", "brakeman")

config/brakeman.ignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"ignored_warnings": [
3+
{
4+
"warning_type": "File Access",
5+
"warning_code": 16,
6+
"fingerprint": "4af423c724d492ff5eecfcb27c67eab8fed42bb3eceefce6e3b08e72a7d1b59a",
7+
"check_name": "SendFile",
8+
"message": "Model attribute used in file name",
9+
"file": "app/controllers/bulk_actions_controller.rb",
10+
"line": 25,
11+
"link": "https://brakemanscanner.org/docs/warning_types/file_access/",
12+
"code": "send_file(BulkAction.find(params[:id]).filepath_for(:filename => params[:filename]))",
13+
"render_path": null,
14+
"location": {
15+
"type": "method",
16+
"class": "BulkActionsController",
17+
"method": "file"
18+
},
19+
"user_input": "BulkAction.find(params[:id]).filepath_for(:filename => params[:filename])",
20+
"confidence": "Medium",
21+
"cwe_id": [
22+
22
23+
],
24+
"note": ""
25+
}
26+
],
27+
"brakeman_version": "8.0.5"
28+
}

0 commit comments

Comments
 (0)