Skip to content
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

Some Qualsys results can be returned without a grade, causing an exception. #15

Open
TheMysteriousX opened this issue Aug 18, 2016 · 2 comments

Comments

@TheMysteriousX
Copy link

TheMysteriousX commented Aug 18, 2016

This can happen when a domain resolves to multiple addresses, but only some of them are responsive.

My initial thought (and my fix on my own system) was just to compact ssl_grades before sorting it.

Some users might not want errors like that to be handled silently though, so I'm not sure what solution you'd want to implement.

The current behaviour though is just to throw an exception:

Check failed to run: comparison of NilClass with 7 failed, [
"/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-ssl-1.0.0/bin/check-ssl-qualys.rb:120:in `sort_by'",
"/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-ssl-1.0.0/bin/check-ssl-qualys.rb:120:in `sort_by!'",
"/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-ssl-1.0.0/bin/check-ssl-qualys.rb:120:in `lowest_grade'",
"/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugins-ssl-1.0.0/bin/check-ssl-qualys.rb:124:in `run'",
"/opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/sensu-plugin-1.3.0/lib/sensu-plugin/cli.rb:57:in `block in <class:CLI>'"
] 
@eheydrick
Copy link
Contributor

Throwing an exception isn't great. Perhaps we should add an option to discard ungraded results.

@majormoses
Copy link
Member

@TheMysteriousX could you put together a pr for this?

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

No branches or pull requests

3 participants