christianhellsten / guard-bundler-audit

guard + bundler-audit = security
MIT License
8 stars 4 forks source link

Guard::BundlerAudit failed to achieve its <start> #7

Closed luismadrigal closed 2 years ago

luismadrigal commented 3 years ago

I was hoping to use this guard but it seems it might not be working anymore. The gem itself works, but I can't get this guard to work, whenever I start guard I guess an error - see stack trace below.

This is in the Guardfile as specified in the README

guard 'bundler_audit', run_on_start: true do
  watch('Gemfile.lock')
end

Guard Start

bundle exec guard start

Stack Trace

00:47:08 - ERROR - Guard::BundlerAudit failed to achieve its <start>, exception was:
> [#b62afb215ca6] NameError: uninitialized constant Bundler::Audit::Scanner::InsecureSource
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-bundler-audit-0.1.4/lib/guard/bundler_audit.rb:38:in `block in audit'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-bundler-audit-0.1.4/lib/guard/bundler_audit.rb:36:in `map'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-bundler-audit-0.1.4/lib/guard/bundler_audit.rb:36:in `audit'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-bundler-audit-0.1.4/lib/guard/bundler_audit.rb:13:in `start'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-2.18.0/lib/guard/runner.rb:83:in `block (2 levels) in _supervise'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-2.18.0/lib/guard/ui/config.rb:62:in `block in with_progname'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/lumberjack-1.2.8/lib/lumberjack/logger.rb:466:in `push_thread_local_value'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/lumberjack-1.2.8/lib/lumberjack/logger.rb:340:in `set_progname'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-2.18.0/lib/guard/ui/config.rb:61:in `with_progname'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-2.18.0/lib/guard/runner.rb:81:in `block in _supervise'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-2.18.0/lib/guard/runner.rb:79:in `catch'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-2.18.0/lib/guard/runner.rb:79:in `_supervise'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-2.18.0/lib/guard/runner.rb:22:in `block (3 levels) in run'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-2.18.0/lib/guard/runner.rb:121:in `block (2 levels) in _run_group_plugins'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-2.18.0/lib/guard/runner.rb:119:in `each'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-2.18.0/lib/guard/runner.rb:119:in `block in _run_group_plugins'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-2.18.0/lib/guard/runner.rb:118:in `catch'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-2.18.0/lib/guard/runner.rb:118:in `_run_group_plugins'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-2.18.0/lib/guard/runner.rb:21:in `block (2 levels) in run'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-2.18.0/lib/guard/runner.rb:20:in `each'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-2.18.0/lib/guard/runner.rb:20:in `block in run'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/lumberjack-1.2.8/lib/lumberjack.rb:39:in `block in unit_of_work'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/lumberjack-1.2.8/lib/lumberjack.rb:70:in `use_context'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/lumberjack-1.2.8/lib/lumberjack.rb:59:in `context'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/lumberjack-1.2.8/lib/lumberjack.rb:37:in `unit_of_work'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-2.18.0/lib/guard/runner.rb:18:in `run'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-2.18.0/lib/guard/commander.rb:34:in `start'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-2.18.0/lib/guard/cli/environments/valid.rb:16:in `start_guard'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-2.18.0/lib/guard/cli.rb:122:in `start'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/base.rb:485:in `start'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-2.18.0/lib/guard/aruba_adapter.rb:32:in `execute'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-2.18.0/lib/guard/aruba_adapter.rb:19:in `execute!'
> [#b62afb215ca6] /usr/local/var/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/guard-2.18.0/bin/_guard-core:11:in `<main>'
00:47:08 - INFO -
> [#5e7a5c885b0b] Guard::BundlerAudit has just been fired

Anyway, I'm hoping for a fix or workaround.

Thanks.

Kulgar commented 2 years ago

@luismadrigal : I fixed it in my fork: https://github.com/Kulgar/guard-bundler-audit/blob/patch-1/lib/guard/bundler_audit.rb You can use that in your Gemfile:

gem "guard-bundler-audit", git: "git@github.com:Kulgar/guard-bundler-audit.git", branch: "patch-1"

I did a pull request, but the project wasn't updated for a long time so... I don't know if there is still someone around ^^'

Kulgar commented 2 years ago

@aktagon : I'd be happy to continue maintaining this project if you don't want to

christianhellsten commented 2 years ago

Sorry, I didn't see the notifications. I have added you as maintainer.

Kulgar commented 2 years ago

@christianhellsten : no worries, thanks, I've just accepted my PR :-) Will you take care of the update on rubygems?

Thanks!

christianhellsten commented 2 years ago

I can add you to the project there as well if you create an account on rubygems.org. I tried to add your ct2c.fr address but got an error "User must exist".

Kulgar commented 2 years ago

@christianhellsten : seems that I was using an old address there. Just changed it to my ct2c.fr address :-) thx!

Kulgar commented 2 years ago

@luismadrigal : There, I pushed new version 0.1.5 on rubygems - it is working fine for me now in my project. You can use the gem :-) - Closing the issue

luismadrigal commented 2 years ago

@Kulgar Thank you! I'm so happy to see this fixed!