Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

current master version (from 2017-02-10) is not working #330

Closed
gerhard-tinned opened this issue Feb 28, 2017 · 13 comments
Closed

current master version (from 2017-02-10) is not working #330

gerhard-tinned opened this issue Feb 28, 2017 · 13 comments

Comments

@gerhard-tinned
Copy link

gerhard-tinned commented Feb 28, 2017

Current master version (last commit e561c14) does not work.

I cloned the repository, run the bundle install and tried to start the scanner which imidiatly showed the following error message.

/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- mongo (LoadError)
	from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /var/lib/gems/2.3.0/gems/backports-3.6.8/lib/backports/std_lib.rb:9:in `require_with_backports'
	from /home/gsteinbeis/security_monitor/3rd_party/ssh_scan/lib/ssh_scan/database/mongo.rb:1:in `'
	from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /var/lib/gems/2.3.0/gems/backports-3.6.8/lib/backports/std_lib.rb:9:in `require_with_backports'
	from /home/gsteinbeis/security_monitor/3rd_party/ssh_scan/lib/ssh_scan/database.rb:1:in `'
	from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /var/lib/gems/2.3.0/gems/backports-3.6.8/lib/backports/std_lib.rb:9:in `require_with_backports'
	from /home/gsteinbeis/security_monitor/3rd_party/ssh_scan/lib/ssh_scan/api.rb:6:in `'
	from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /home/gsteinbeis/security_monitor/3rd_party/ssh_scan/lib/ssh_scan.rb:17:in `'
	from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from ./bin/ssh_scan:9:in `'

I am not familiar enough with ruby to debug this further. Switching to tag 0.0.16 resolved the issue.

@hvardhanx
Copy link
Collaborator

hvardhanx commented Feb 28, 2017

Hi @gerhard-tinned ,

Can you please try this and let me know?

source ~/.rvm/scripts/rvm
rvm use 2.3.1
gem install bundler
bundle install

@gerhard-tinned
Copy link
Author

The issue i reported started with commit 4c70e24 (Add mongodb as default database) but i will try your suggestion...

@gerhard-tinned
Copy link
Author

source ~/.rvm/scripts/rvm

... No such file or directory

rvm use 2.3.1

-bash: rvm: command not found

sudo gem install bundler

Fetching: bundler-1.14.5.gem (100%)
Successfully installed bundler-1.14.5
Parsing documentation for bundler-1.14.5
Installing ri documentation for bundler-1.14.5
Done installing documentation for bundler after 15 seconds
1 gem installed

bundle install

...
Bundle complete! 8 Gemfile dependencies, 49 gems now installed.
Bundled gems are installed into ./vendor/bundle.


Issue is still the same.

@gerhard-tinned
Copy link
Author

gerhard-tinned commented Feb 28, 2017

It seems as well that the following two files get modified as soon as the ssh_scan is executed the first time. So they show up on a git status. This seems to have started as well after the mentioned commit at some point.

M	bin/ssh_scan_api_example_config.yml
M	bin/ssh_scan_worker_example_config.yml

@gerhard-tinned
Copy link
Author

It seems as if whatever causes the ssh_scan to fail was to do with the changes in 4c70e24 "Add mongodb as default database". As the commit before works, but this and later show the error.

Any help or suggestions?

@claudijd
Copy link
Contributor

claudijd commented Mar 1, 2017

@gerhard-tinned sorry about this, this is an artifact of us not really have a good handle on dependency management at the moment. It's something we need to figure out before we release what's in master. The latest release'd gem should be functional, which shouldn't include those changes.

@claudijd
Copy link
Contributor

claudijd commented Mar 1, 2017

The issue should be resolved in master when #308 is fixed in master.

@gerhard-tinned
Copy link
Author

The latest tag is 0.0.16 and this has the issue with the false positive in the compliant result as reported in #281 . That means the latest tag version (0.0.16) is also not an option as the issue #281 was (from what I understand and saw) only fixed in master branch.

Can I help in any way?

@claudijd
Copy link
Contributor

claudijd commented Mar 2, 2017

@gerhard-tinned I spent some time today to break the API dependancies into their own repo. Would you mind trying out the prerelease gem for 0.0.17 and letting me know if that resolves your issue?

https://rubygems.org/gems/ssh_scan/versions/0.0.17.pre

@gerhard-tinned
Copy link
Author

I will checkout the version 0.0.17.pre as soon as I can and I will let you know the result.

@gerhard-tinned
Copy link
Author

I tested the 0.0.17.pre tagged version. As soon as I switched to the 0.017.pre tag, the error message reported above was gone.

I ran it against a few of my hosts with different policies. This version does not throw the error as listed below as well as it does show the expected result. The issue with the wrong compliant result as reported in a different ticket is gone.

From my point of few, ready to deploy!

Great work, thanks a lot!

@claudijd
Copy link
Contributor

claudijd commented Mar 24, 2017

@gerhard-tinned FYI that 0.0.17 and 0.0.18 have been released, so you should be able to pull from latest gem release now :)

@gerhard-tinned
Copy link
Author

Thanks for the update but I use the version directly from git. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants