Namespaced classes that are not fully qualified can cause difference in false positives/negatives (WIP) #1523
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello!
A coworker and I have recently been working on trying to resolve an issue reported into Brakeman a little over a year ago, related to the namespacing of classes causing potential false negatives. There was an issue brought up related to this issue here if a refresher on the topic is needed.
This PR contains a fix that you had been working on yourself, before eventually putting aside, due to the results coming back with a number of false positives and weird results, specifically when analyzing controllers. I've taken your fix and put it on top the latest
4.10.0
version of Brakeman, including fixing a few tests that had been failing.When I and my coworker have been testing this fix, we do still some false positive results when running against some of our repositories (particularly where a number of previously ignored warnings are being re-raised, due to this fix changing the confidence levels on warnings), but overall it looks like the changes made in this PR resolves the greater namespacing issue. I know it's likely been a long time since this problem was looked at, but I was hoping to get some of your insight into what other issues you were experiencing when you initially worked on this PR, particularly around weird results you were finding on controller, and see if I could pick your brain on possible ideas that I could implement to get this problem solved!