Add pre-push hook for brakeman #413
Conversation
@@ -533,6 +533,7 @@ aborted. | |||
* [ProtectedBranches](lib/overcommit/hook/pre_push/protected_branches.rb) | |||
* [RSpec](lib/overcommit/hook/pre_push/r_spec.rb) | |||
* [TestUnit](lib/overcommit/hook/pre_push/test_unit.rb) | |||
* [Brakeman](lib/overcommit/hook/pre_commit/brakeman.rb) |
sds
Aug 18, 2016
Owner
This should be lib/overcommit/hook/pre_push/brakeman.rb
as it is a pre-push
hook.
This should be lib/overcommit/hook/pre_push/brakeman.rb
as it is a pre-push
hook.
morizyun
Aug 18, 2016
Author
Contributor
Thanks!!
Thanks!!
flags: ['--exit-on-warn', '--quiet', '--summary'] | ||
install_command: 'gem install brakeman' | ||
include: | ||
- '**/*.rb' |
sds
Aug 18, 2016
Owner
Brakeman operates on more than just Ruby files. It also cares about ERB templates and other code.
It might be worth auditing their codebase to find all the file types and include an exhaustive list here, or we can omit the include
option entirely and always run Brakeman
on every push.
Brakeman operates on more than just Ruby files. It also cares about ERB templates and other code.
It might be worth auditing their codebase to find all the file types and include an exhaustive list here, or we can omit the include
option entirely and always run Brakeman
on every push.
morizyun
Aug 18, 2016
Author
Contributor
That's right. I will omit include
option.
That's right. I will omit include
option.
Thanks for the pull request, @morizyun! Too small comments which need addressing and this is good to go! |
@sds Thank you very much for your kind comments. I am going to fix them. |
Merged in b504142. Thanks! |
Hey @sds! I'm really looking forward to use this, but I don't want to point the gem directly to github. When will this be released to rubygems? Thank you. |
0.36.0 has been released. |
I'm not able to make it work :-( I updated overcommit to 0.36.0, added the brakeman gem, configured the .overcommit.yml file, run |
This hook is to run brakeman to check static analysis security vulnerability.
As @ZeroS said in #406, I would like to run the hook to scan all project before git-push.
I am not good at English, but I will always do my best.🍻
If you have any question or advice, please don't hesitate to tell me.