presidentbeef/brakeman — pull request #224 by presidentbeef (2012-12-24 05:54:41+00:00)
Title: Only do one pass of alias processing + Pass instance variables through before_filters

This is a combo change because they need each other.

For a very, very long time, `AliasProcessor` has processed things passed to `format_safely` twice. This caught some edge cases with the data-flow. But it also means _it was processing things twice_ and sometimes that made `Sexp`s balloon outrageously. From what I can tell, doing a single pass (once I got the logic right) breaks very few things, and the things it does break should probably be fixed.

One such thing was that `before_filter` processing was suddenly not _quite_ working right. It turns out that the double `AliasProcessor` processing had been covering up the fact that each `before_filter` was being processing in a vacuum. But only the first `before_filter` in the chain should start off with an empty environment, after that any instance variables set by a previous `before_filter` should be passed along to later `before_filters`. So this pull request changes that, too. The tests for `before_filter` handling could probably use a little more rigor, but in testing on real applications this has either made warning more precise or generated new warnings where instance variables were otherwise unresolved.

On top of all that, this also speeds up the `--interprocedural` option. One scan that was taking ~15 minutes dropped down to ~1.5 minutes. :icecream: