danger-brakeman_scanner 0.1.0.pre.preview → 0.1.0.pre.preview2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +3 -6
- data/.gitignore +4 -0
- data/README.md +1 -1
- data/lib/danger_plugin.rb +19 -3
- data/lib/version.rb +1 -1
- metadata +2 -3
- data/Gemfile.lock +0 -109
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa55127ee135d7ce475aacb7252c07e70cbfa8a42a6a3bc9f90ef2883db26a48
|
4
|
+
data.tar.gz: ff2ff2c3f8ae6e139e85db788edf8abbb95a19956f98ae5f525d98119fe23f27
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 011b9b6c956e3b4001ddcfdc168217c0bde7aeabd1bc76f5d0a95d56c4222c466edf8e87f6f81e05cb4013cf3133e7fc4881b3cf16134a15b9bc29080eb7472d
|
7
|
+
data.tar.gz: bb0fdac41d8ac5c8543e89bf4ae74125ec9cf443bf5782a31107089253312825da84c532df25edfb0967637147809962fdcfd8a6f92a11b55e165289354e58c4
|
data/.circleci/config.yml
CHANGED
@@ -15,13 +15,10 @@ jobs:
|
|
15
15
|
- checkout
|
16
16
|
- run:
|
17
17
|
name: Configuring Bundler
|
18
|
-
command:
|
19
|
-
echo 'export BUNDLER_VERSION=$(tail -1 Gemfile.lock | xargs)' >> $BASH_ENV
|
20
|
-
source $BASH_ENV
|
21
|
-
gem install bundler -v $BUNDLER_VERSION
|
18
|
+
command: gem install bundler
|
22
19
|
- restore_cache:
|
23
20
|
keys:
|
24
|
-
- v1-dependencies-{{ arch }}-{{ checksum "
|
21
|
+
- v1-dependencies-{{ arch }}-{{ checksum "danger-brakeman_scanner.gemspec" }}
|
25
22
|
# fallback to using the latest cache if no exact match is found
|
26
23
|
- v1-dependencies-{{ arch }}-
|
27
24
|
- run:
|
@@ -29,7 +26,7 @@ jobs:
|
|
29
26
|
command: |
|
30
27
|
bundle check || bundle install --jobs=4 --retry=3
|
31
28
|
- save_cache:
|
32
|
-
key: v1-dependencies-{{ arch }}-{{ checksum "
|
29
|
+
key: v1-dependencies-{{ arch }}-{{ checksum "danger-brakeman_scanner.gemspec" }}
|
33
30
|
paths:
|
34
31
|
- vendor/bundle
|
35
32
|
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Danger Brakeman Plugin [![CircleCI](https://circleci.com/gh/klaxit/danger-brakeman_scanner.svg?style=
|
1
|
+
# Danger Brakeman Plugin [![CircleCI](https://circleci.com/gh/klaxit/danger-brakeman_scanner.svg?style=shield)](https://circleci.com/gh/klaxit/danger-brakeman_scanner) [![Gem Version](https://badge.fury.io/rb/danger-brakeman_scanner.svg)](https://badge.fury.io/rb/danger-brakeman_scanner)
|
2
2
|
|
3
3
|
A [Danger] plugin for [Brakeman] security static analysis.
|
4
4
|
|
data/lib/danger_plugin.rb
CHANGED
@@ -4,11 +4,11 @@
|
|
4
4
|
#
|
5
5
|
# @example Run with default configuration in application directory
|
6
6
|
#
|
7
|
-
#
|
7
|
+
# brakeman_scanner.run
|
8
8
|
#
|
9
9
|
# @see https://github.com/presidentbeef/brakeman
|
10
10
|
# @tags brakeman, security, ruby
|
11
|
-
class Danger::
|
11
|
+
class Danger::DangerBrakemanScanner < Danger::Plugin
|
12
12
|
require "brakeman"
|
13
13
|
|
14
14
|
# Run a Brakeman scan over current application.
|
@@ -17,7 +17,15 @@ class Danger::DangerBrakeman < Danger::Plugin
|
|
17
17
|
# @return [void]
|
18
18
|
def run(options = File.dirname(Kernel.caller_locations.first.absolute_path))
|
19
19
|
tracker = Brakeman.run(options)
|
20
|
-
|
20
|
+
|
21
|
+
warnings = if tracker.ignored_filter
|
22
|
+
tracker.warnings.select do |warning|
|
23
|
+
!tracker.ignored_filter.ignored_warnings.include?(warning)
|
24
|
+
end
|
25
|
+
else
|
26
|
+
tracker.warnings
|
27
|
+
end
|
28
|
+
return if warnings.empty? && tracker.errors.empty?
|
21
29
|
|
22
30
|
markdown tracker.report.to_markdown
|
23
31
|
failure "Brakeman static analysis detected issues in the code. " \
|
@@ -25,3 +33,11 @@ class Danger::DangerBrakeman < Danger::Plugin
|
|
25
33
|
"(https://brakemanscanner.org/docs/ignoring_false_positives/)."
|
26
34
|
end
|
27
35
|
end
|
36
|
+
|
37
|
+
# (see Danger::DangerBrakemanScanner)
|
38
|
+
#
|
39
|
+
# @example Use the alias for conveniance
|
40
|
+
#
|
41
|
+
# brakeman.run
|
42
|
+
#
|
43
|
+
class Danger::DangerBrakeman < Danger::DangerBrakemanScanner; end
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-brakeman_scanner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.pre.
|
4
|
+
version: 0.1.0.pre.preview2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ulysse Buonomo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: brakeman
|
@@ -108,7 +108,6 @@ files:
|
|
108
108
|
- CHANGELOG.md
|
109
109
|
- CODE_OF_CONDUCT.md
|
110
110
|
- Gemfile
|
111
|
-
- Gemfile.lock
|
112
111
|
- LICENSE
|
113
112
|
- Makefile
|
114
113
|
- README.md
|
data/Gemfile.lock
DELETED
@@ -1,109 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
danger-brakeman_scanner (0.1.0.pre.preview)
|
5
|
-
brakeman
|
6
|
-
danger
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: https://rubygems.org/
|
10
|
-
specs:
|
11
|
-
addressable (2.7.0)
|
12
|
-
public_suffix (>= 2.0.2, < 5.0)
|
13
|
-
ast (2.4.0)
|
14
|
-
brakeman (4.8.0)
|
15
|
-
claide (1.0.3)
|
16
|
-
claide-plugins (0.9.2)
|
17
|
-
cork
|
18
|
-
nap
|
19
|
-
open4 (~> 1.3)
|
20
|
-
coderay (1.1.2)
|
21
|
-
colored2 (3.1.2)
|
22
|
-
cork (0.3.0)
|
23
|
-
colored2 (~> 3.1)
|
24
|
-
danger (6.3.1)
|
25
|
-
claide (~> 1.0)
|
26
|
-
claide-plugins (>= 0.9.2)
|
27
|
-
colored2 (~> 3.1)
|
28
|
-
cork (~> 0.1)
|
29
|
-
faraday (~> 0.9)
|
30
|
-
faraday-http-cache (~> 2.0)
|
31
|
-
git (~> 1.6)
|
32
|
-
kramdown (~> 2.0)
|
33
|
-
kramdown-parser-gfm (~> 1.0)
|
34
|
-
no_proxy_fix
|
35
|
-
octokit (~> 4.7)
|
36
|
-
terminal-table (~> 1)
|
37
|
-
diff-lcs (1.3)
|
38
|
-
faraday (0.17.3)
|
39
|
-
multipart-post (>= 1.2, < 3)
|
40
|
-
faraday-http-cache (2.0.0)
|
41
|
-
faraday (~> 0.8)
|
42
|
-
git (1.6.0)
|
43
|
-
rchardet (~> 1.8)
|
44
|
-
jaro_winkler (1.5.4)
|
45
|
-
kramdown (2.1.0)
|
46
|
-
kramdown-parser-gfm (1.1.0)
|
47
|
-
kramdown (~> 2.0)
|
48
|
-
method_source (1.0.0)
|
49
|
-
multipart-post (2.1.1)
|
50
|
-
nap (1.1.0)
|
51
|
-
no_proxy_fix (0.1.2)
|
52
|
-
octokit (4.18.0)
|
53
|
-
faraday (>= 0.9)
|
54
|
-
sawyer (~> 0.8.0, >= 0.5.3)
|
55
|
-
open4 (1.3.4)
|
56
|
-
parallel (1.19.1)
|
57
|
-
parser (2.7.0.5)
|
58
|
-
ast (~> 2.4.0)
|
59
|
-
pry (0.13.0)
|
60
|
-
coderay (~> 1.1)
|
61
|
-
method_source (~> 1.0)
|
62
|
-
public_suffix (4.0.3)
|
63
|
-
rainbow (3.0.0)
|
64
|
-
rake (12.3.3)
|
65
|
-
rchardet (1.8.0)
|
66
|
-
rexml (3.2.4)
|
67
|
-
rspec (3.9.0)
|
68
|
-
rspec-core (~> 3.9.0)
|
69
|
-
rspec-expectations (~> 3.9.0)
|
70
|
-
rspec-mocks (~> 3.9.0)
|
71
|
-
rspec-core (3.9.1)
|
72
|
-
rspec-support (~> 3.9.1)
|
73
|
-
rspec-expectations (3.9.1)
|
74
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
75
|
-
rspec-support (~> 3.9.0)
|
76
|
-
rspec-mocks (3.9.1)
|
77
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
78
|
-
rspec-support (~> 3.9.0)
|
79
|
-
rspec-support (3.9.2)
|
80
|
-
rubocop (0.79.0)
|
81
|
-
jaro_winkler (~> 1.5.1)
|
82
|
-
parallel (~> 1.10)
|
83
|
-
parser (>= 2.7.0.1)
|
84
|
-
rainbow (>= 2.2.2, < 4.0)
|
85
|
-
rexml
|
86
|
-
ruby-progressbar (~> 1.7)
|
87
|
-
unicode-display_width (>= 1.4.0, < 1.7)
|
88
|
-
ruby-progressbar (1.10.1)
|
89
|
-
sawyer (0.8.2)
|
90
|
-
addressable (>= 2.3.5)
|
91
|
-
faraday (> 0.8, < 2.0)
|
92
|
-
terminal-table (1.8.0)
|
93
|
-
unicode-display_width (~> 1.1, >= 1.1.1)
|
94
|
-
unicode-display_width (1.6.1)
|
95
|
-
yard (0.9.24)
|
96
|
-
|
97
|
-
PLATFORMS
|
98
|
-
ruby
|
99
|
-
|
100
|
-
DEPENDENCIES
|
101
|
-
danger-brakeman_scanner!
|
102
|
-
pry
|
103
|
-
rake (~> 12.0)
|
104
|
-
rspec (~> 3.0)
|
105
|
-
rubocop
|
106
|
-
yard
|
107
|
-
|
108
|
-
BUNDLED WITH
|
109
|
-
2.1.4
|