-
Notifications
You must be signed in to change notification settings - Fork 898
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
Upgrade brakeman to v6 #23124
Upgrade brakeman to v6 #23124
Conversation
Looks like a legit failure with newer brakeman |
ed2de7b
to
5d16aa0
Compare
So, I think the problem is that the file path is part of the brakeman.ignore's fingerprint, and engines could live in different places 😭 - I think I have to open an issue with brakeman. |
|
@kbrock https://github.com/ManageIQ/manageiq/pull/23124/files#diff-62c4b53b7988735188b9b2ac5614a6f7a624451ebdd77f125d35dc6ee013b3d2R23 But also, the problem I'm having isn't that issue. The problem is that the issue exists in a plugin, and the file path is part of the false-positive fingerprint. So, locally that file path is different than when it's in CI, and I can't make it work in both environments. I'm really not sure how to fix it :( |
5d16aa0
to
7d77925
Compare
# Brakeman's fingerprint check does not work properly with engines | ||
require "brakeman/warning" | ||
require Rails.root.join('lib/extensions/brakeman_fingerprint_patch') | ||
Brakeman::Warning.prepend(BrakemanFingerprintPatch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jrafanie For now, I'm just copying the patching pattern we had before. I plan to have a separate PR where I do more of a "safe-patch" approach that checks the various methods, but I didn't want to introduce too much in this PR, especially if I want to backport it.
From Pull Request: ManageIQ/manageiq#23124
7d77925
to
a5ff503
Compare
a5ff503
to
efd6938
Compare
Checked commit Fryguy@efd6938 with ruby 3.1.5, rubocop 1.56.3, haml-lint 0.51.0, and yamllint lib/extensions/brakeman_fingerprint_patch.rb
|
@jrafanie All of the rubocops are tripping on original brakeman code, so I am not going to change those. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Fryguy thoughts on backporting this anytime in the future? Do you want to let it bake on master for a bit?
Yeah I'm going to let it bake a bit - maybe backport in a week or 2 to see how the automated runs go and PRs go. |
Merging. Whitesource can't check it out so not really a PR error. |
Backported to radjabov via merge of master into radjabov |
@jrafanie Please review.