presidentbeef/brakeman — Issue #53: nil:NilClass (NoMethodError)
Author: philcox
Created: 2012-03-10 01:15:05+00:00
State: open

Got the same error through Jenkins, ran it by hand and got same problem. Run of other repositories on same system complete with no error. Any thoughts?

[Notice] Using Ruby 1.8.7. Please make sure this matches the one used to run your Rails application.
Processing application in /var/lib/jenkins/jobs/BrakemanScan/workspace
Processing configuration...
Processing gems...
Processing initializers...
Processing libs...
Processing routes...
Processing templates...
Processing data flow in templates...
Processing models...
Processing controllers...
Processing data flow in controllers...
Indexing call sites... ed
Running checks in parallel...
- CheckBasicAuth
- CheckCrossSiteScripting
- CheckDefaultRoutes
- CheckEscapeFunction
- CheckEvaluation
- CheckExecute
- CheckFileAccess
- CheckFilterSkipping
- CheckForgerySetting
- CheckLinkTo
- CheckLinkToHref
- CheckMailTo
- CheckMassAssignment
- CheckModelAttributes
- CheckNestedAttributes
- CheckQuoteTableName
- CheckRedirect
- CheckRender
- CheckResponseSplitting
- CheckSendFile
- CheckSessionSettings
- CheckSQL
- CheckStripTags
- CheckTranslateBug
- CheckValidationRegex
- CheckWithoutProtection
Checks finished, collecting results...
Generating report...
/opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/gems/1.8/gems/brakeman-1.4.0/bin/../lib/brakeman/warning.rb:74:in `format_code': private method `gsub' called for nil:NilClass (NoMethodError)
from /opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/gems/1.8/gems/brakeman-1.4.0/bin/../lib/brakeman/warning.rb:88:in `format_message'
from /opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/gems/1.8/gems/brakeman-1.4.0/bin/../lib/brakeman/warning.rb:98:in `to_row'
from /opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/gems/1.8/gems/brakeman-1.4.0/bin/../lib/brakeman/report.rb:105:in `generate_warnings'
from /opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/gems/1.8/gems/brakeman-1.4.0/bin/../lib/brakeman/report.rb:104:in `each'
from /opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/gems/1.8/gems/brakeman-1.4.0/bin/../lib/brakeman/report.rb:104:in `generate_warnings'
from /opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/gems/1.8/gems/brakeman-1.4.0/bin/../lib/brakeman/report.rb:339:in `to_s'
from /opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/gems/1.8/gems/brakeman-1.4.0/bin/../lib/brakeman.rb:262:in `send'
from /opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/gems/1.8/gems/brakeman-1.4.0/bin/../lib/brakeman.rb:262:in `scan'
from /opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/gems/1.8/gems/brakeman-1.4.0/bin/../lib/brakeman.rb:55:in `run'
from /opt/ruby-enterprise-1.8.7-2012.02/lib/ruby/gems/1.8/gems/brakeman-1.4.0/bin/brakeman:45
from /opt/ruby-enterprise-1.8.7-2012.02/bin/brakeman:19:in `load'
from /opt/ruby-enterprise-1.8.7-2012.02/bin/brakeman:19