brakeman 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -17,39 +17,41 @@ From source:
17
17
 
18
18
  # Usage
19
19
 
20
- brakeman app_path
20
+ brakeman [app_path]
21
+
22
+ It is simplest to run brakeman from the root directory of the Rails application. A path may also be supplied.
21
23
 
22
24
  # Options
23
25
 
24
26
  To specify an output file for the results:
25
27
 
26
- brakeman -o output_file app_path
28
+ brakeman -o output_file
27
29
 
28
30
  The output format is determined by the file extension or by using the `-f` option. Current options are: `text`, `html`, `csv`, and `tabs`.
29
31
 
30
32
  To suppress informational warnings and just output the report:
31
33
 
32
- brakeman -q app_path
34
+ brakeman -q
33
35
 
34
36
  To see all kinds of debugging information:
35
37
 
36
- brakeman -d app_path
38
+ brakeman -d
37
39
 
38
40
  Specific checks can be skipped, if desired. The name needs to be the correct case. For example, to skip looking for default routes (`DefaultRoutes`):
39
41
 
40
- brakeman -x DefaultRoutes app_path
42
+ brakeman -x DefaultRoutes
41
43
 
42
44
  Multiple checks should be separated by a comma:
43
45
 
44
- brakeman -x DefaultRoutes,Redirect app_path
46
+ brakeman -x DefaultRoutes,Redirect
45
47
 
46
48
  To do the opposite and only run a certain set of tests:
47
49
 
48
- brakeman -t SQL,ValidationRegex app_path
50
+ brakeman -t SQL,ValidationRegex
49
51
 
50
52
  To indicate certain methods are "safe":
51
53
 
52
- brakeman -s benign_method,totally_safe app_path
54
+ brakeman -s benign_method,totally_safe
53
55
 
54
56
  By default, brakeman will assume that unknown methods involving untrusted data are dangerous. For example, this would cause a warning (Rails 2):
55
57
 
@@ -57,7 +59,7 @@ By default, brakeman will assume that unknown methods involving untrusted data a
57
59
 
58
60
  To only raise warnings only when untrusted data is being directly used:
59
61
 
60
- brakeman -r app_path
62
+ brakeman -r
61
63
 
62
64
  # Warning information
63
65
 
@@ -79,7 +81,7 @@ There are three levels of confidence:
79
81
 
80
82
  To only get warnings above a given confidence level:
81
83
 
82
- brakeman -w3 app_path
84
+ brakeman -w3
83
85
 
84
86
  The `-w` switch takes a number from 1 to 3, with 1 being low (all warnings) and 3 being high (only highest confidence warnings).
85
87
 
@@ -116,7 +116,7 @@ class RoutesProcessor < BaseProcessor
116
116
  process_collection value
117
117
  when :has_one
118
118
  save_controller = current_controller
119
- process_resource value[1..-1]
119
+ process_resource value[1..-1] #Verify this is proper behavior
120
120
  self.current_controller = save_controller
121
121
  when :has_many
122
122
  save_controller = current_controller
@@ -164,7 +164,7 @@ class RoutesProcessor < BaseProcessor
164
164
  process_resource_options exp[-1]
165
165
  else
166
166
  exp.each do |argument|
167
- if argument.node_type == :lit
167
+ if sexp? argument and argument.node_type == :lit
168
168
  self.current_controller = pluralize(exp[0][1].to_s)
169
169
  add_resource_routes
170
170
  process_resource_options exp[-1]
@@ -1 +1 @@
1
- Version = "0.5.0"
1
+ Version = "0.5.1"
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 0
9
- version: 0.5.0
8
+ - 1
9
+ version: 0.5.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Justin Collins
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-06-08 00:00:00 -07:00
17
+ date: 2011-06-17 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency