-
Notifications
You must be signed in to change notification settings - Fork 717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't convert Symbol into Integer (TypeError) on brakeman run #22
Comments
Hi Adam, thanks for reporting this issue! Would you be willing to share your configuration file (privately, if you would like) or at least an example that reproduces this error? If so, if you can run the latest Brakeman source that I just updated, it should indicate which file in particular caused the problem. Thanks again! |
Sure. Do you want to see the application.rb config file? What email can I reach you at? |
It could be application.rb or environments/production.rb. You can send it/them to justin@presidentbeef.com. Thanks! |
So it looks like I only get that error when running as a gem. When I clone the project and specify the path to bin/brakeman it works fine. Could it possibly be a conflict with rvm? I don't think it's anything in our application causing the problem as it works when I specify the path. |
I don't think it's an issue with rvm - I use rvm constantly. Did you see a message like If not, seems like there are two possibilities:
To check (1), build the gem from source, install it, and try again:
To check (2), revert Brakeman source to 1.0.0 and run directly from bin/brakeman:
|
I think I found the problem. RVM was using 1.8 as the default, app was on 1.9. Setting 'rvm system 1.9.3-p0' fixed it. Thanks and sorry for the red herring. |
Are you sure that was the issue? I'm having trouble figuring out how that would cause that problem. If you were using 1.9 syntax, then you should get a parsing error... |
Yeah as far as I can tell. The only thing I've changed was making sure the version of ruby that RVM was using was the same as what the app was using. |
Okay, cool. I will close this for now. Feel free to reopen if the problem returns. |
Haven't been able to successfully run brakeman. Encountered this problem using Rails 3.1.3 with Ruby 1.9.2-p180, 1.9.2-p290 and 1.9.3-p0
$ brakeman -o brakeman.txt
'[Notice] Detected Rails 3 application. Enabling experimental Rails 3 support.
Loading scanner...
[Notice] Using Ruby 1.9.2. Please make sure this matches the one used to run your Rails application.
Processing application in /src/web
Processing configuration...
/.rvm/gems/ruby-1.9.2-p290/gems/brakeman-1.0.0/lib/brakeman/processors/lib/rails3_config_processor.rb:73:in
[]=': can't convert Symbol into Integer (TypeError) from /.rvm/gems/ruby-1.9.2-p290/gems/brakeman-1.0.0/lib/brakeman/processors/lib/rails3_config_processor.rb:73:in
process_attrasgn'from /.rvm/gems/ruby-1.9.2-p290/gems/sexp_processor-3.0.9/lib/sexp_processor.rb:209:in
block (2 levels) in process' from /.rvm/gems/ruby-1.9.2-p290/gems/sexp_processor-3.0.9/lib/sexp_processor.rb:261:in
error_handler'from /.rvm/gems/ruby-1.9.2-p290/gems/sexp_processor-3.0.9/lib/sexp_processor.rb:208:in
block in process' from /.rvm/gems/ruby-1.9.2-p290/gems/sexp_processor-3.0.9/lib/sexp_processor.rb:326:in
in_context'from /.rvm/gems/ruby-1.9.2-p290/gems/sexp_processor-3.0.9/lib/sexp_processor.rb:180:in
process' from /.rvm/gems/ruby-1.9.2-p290/gems/brakeman-1.0.0/lib/brakeman/processors/base_processor.rb:113:in
block in process_block'from /.rvm/gems/ruby-1.9.2-p290/gems/brakeman-1.0.0/lib/brakeman/processors/base_processor.rb:112:in
map!' from /.rvm/gems/ruby-1.9.2-p290/gems/brakeman-1.0.0/lib/brakeman/processors/base_processor.rb:112:in
process_block'from /.rvm/gems/ruby-1.9.2-p290/gems/sexp_processor-3.0.9/lib/sexp_processor.rb:209:in
block (2 levels) in process' from /.rvm/gems/ruby-1.9.2-p290/gems/sexp_processor-3.0.9/lib/sexp_processor.rb:261:in
error_handler'from /.rvm/gems/ruby-1.9.2-p290/gems/sexp_processor-3.0.9/lib/sexp_processor.rb:208:in
block in process' from /.rvm/gems/ruby-1.9.2-p290/gems/sexp_processor-3.0.9/lib/sexp_processor.rb:326:in
in_context'from /.rvm/gems/ruby-1.9.2-p290/gems/sexp_processor-3.0.9/lib/sexp_processor.rb:180:in
process' from /.rvm/gems/ruby-1.9.2-p290/gems/brakeman-1.0.0/lib/brakeman/processors/lib/rails3_config_processor.rb:34:in
process_iter'from /.rvm/gems/ruby-1.9.2-p290/gems/sexp_processor-3.0.9/lib/sexp_processor.rb:209:in
block (2 levels) in process' from /.rvm/gems/ruby-1.9.2-p290/gems/sexp_processor-3.0.9/lib/sexp_processor.rb:261:in
error_handler'from /.rvm/gems/ruby-1.9.2-p290/gems/sexp_processor-3.0.9/lib/sexp_processor.rb:208:in
block in process' from /.rvm/gems/ruby-1.9.2-p290/gems/sexp_processor-3.0.9/lib/sexp_processor.rb:326:in
in_context'from /.rvm/gems/ruby-1.9.2-p290/gems/sexp_processor-3.0.9/lib/sexp_processor.rb:180:in
process' from /.rvm/gems/ruby-1.9.2-p290/gems/brakeman-1.0.0/lib/brakeman/processors/base_processor.rb:113:in
block in process_block'from /.rvm/gems/ruby-1.9.2-p290/gems/brakeman-1.0.0/lib/brakeman/processors/base_processor.rb:112:in
map!' from /.rvm/gems/ruby-1.9.2-p290/gems/brakeman-1.0.0/lib/brakeman/processors/base_processor.rb:112:in
process_block'from /.rvm/gems/ruby-1.9.2-p290/gems/sexp_processor-3.0.9/lib/sexp_processor.rb:209:in
block (2 levels) in process' from /.rvm/gems/ruby-1.9.2-p290/gems/sexp_processor-3.0.9/lib/sexp_processor.rb:261:in
error_handler'from /.rvm/gems/ruby-1.9.2-p290/gems/sexp_processor-3.0.9/lib/sexp_processor.rb:208:in
block in process' from /.rvm/gems/ruby-1.9.2-p290/gems/sexp_processor-3.0.9/lib/sexp_processor.rb:326:in
in_context'from /.rvm/gems/ruby-1.9.2-p290/gems/sexp_processor-3.0.9/lib/sexp_processor.rb:180:in
process' from /.rvm/gems/ruby-1.9.2-p290/gems/brakeman-1.0.0/lib/brakeman/processors/lib/rails3_config_processor.rb:27:in
process_config'from /.rvm/gems/ruby-1.9.2-p290/gems/brakeman-1.0.0/lib/brakeman/processor.rb:23:in
process_config' from /.rvm/gems/ruby-1.9.2-p290/gems/brakeman-1.0.0/lib/brakeman/scanner.rb:80:in
process_config'from /.rvm/gems/ruby-1.9.2-p290/gems/brakeman-1.0.0/lib/brakeman/scanner.rb:54:in
process' from /.rvm/gems/ruby-1.9.2-p290/gems/brakeman-1.0.0/lib/brakeman.rb:207:in
scan'from /.rvm/gems/ruby-1.9.2-p290/gems/brakeman-1.0.0/lib/brakeman.rb:54:in
run' from /.rvm/gems/ruby-1.9.2-p290/gems/brakeman-1.0.0/bin/brakeman:173:in
<top (required)>'from /.rvm/gems/ruby-1.9.2-p290/bin/brakeman:19:in
load' from /.rvm/gems/ruby-1.9.2-p290/bin/brakeman:19:in
The text was updated successfully, but these errors were encountered: