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

Please make engine pool available in ScanData, ScanSummary. #277

Closed
peterjmcg opened this issue May 12, 2017 · 7 comments
Closed

Please make engine pool available in ScanData, ScanSummary. #277

peterjmcg opened this issue May 12, 2017 · 7 comments
Labels

Comments

@peterjmcg
Copy link

ScanData and ScanSummary only have engine ID which shows up as -1 for scans which use an engine pool i.e. all of my scans.

  • Nexpose gem version: 5.3.2
  • Ruby version: ruby 2.2.6p396 (2016-11-15 revision 56800) [x64-mingw32]
  • Operating System and version: Windows 10
  • Nexpose product version: 6.4.37
@sgreen-r7
Copy link
Contributor

sgreen-r7 commented May 15, 2017

Hi @peterjmcg;

Sorry for the delayed response, but just wanted to ask a few questions about what you would want to happen. So I have tested what you're referring to, and yes ScanData/ScanSummary show the engine_id = -1.

While I await some more info from different members of the engineering team, a shortcut is the Nexpose::Site class contains the ID for the engine pool. Now (maybe obviously) that might not help if we're kicking off scans with different engine pools other than the default pool the site was setup with. But if you're just starting scans with the default pool for the site, then that should be a solid point of truth for you.

nsc = Nexpose::Connection.new 'hostname', 'user, 'pass'
site = Nexpose::Site.load nsc, <site_id>
=> #<Nexpose::Site:0x007f827ce286b8
 @engine_id=10
~~omitted other attrs for clarity~~
>

sorry for the extra edits
Let me know if that works for you in the meantime. I will update this ticket with more info once I have it.

@peterjmcg
Copy link
Author

Thanks for the reply. I only see engine_id in Site. Are you saying that will have engine pool ID if pool is used?

@sgreen-r7
Copy link
Contributor

@peterjmcg yeah, engine_id for Nexpose::Site is technically the ID for the EnginePool.

If your normal use case is using your Site's default scan engine (pool in our case); then you should be safely able to assume that everything is going to match up.

However, I've been looking at this since I last replied and there a few things we could do in the gem to help make this less "funky". Can you describe your ideal of what you'd like to have happen? Or if your use case is kinda more complicated, I could add some extra stuff in the gem to help out.

Let me know either way, thanks again!

@peterjmcg
Copy link
Author

I run a weekly script checking for potential Nexpose problems inc. Incomplete scans (failed or paused). One of the fields in the CSV is Engine ID, in case it was a problem with the engine. The scans mostly use the default engine so that's ok. Our Nexpose admin would probably prefer a Pool or Engine name instead of ID. Mostly we use pools rather than individual engines.

@sgreen-r7
Copy link
Contributor

@peterjmcg is that CSV being generated via some script, or is that something that is being done by hand? If it's a script somebody has written I could offer some suggestions to help strengthen with some extra code to correctly determine if single engine or pool.

I only bring that up because .loading an Engine vs. .loading an EnginePool are not 1:1.

Thanks, and let me know if this could possibly help.

@peterjmcg
Copy link
Author

I wrote the script. I can get the engine/pool name from the Connection.engines or Connection.engine_pools. Thanks for your help. The client API would benefit from being able to find which scan template, engine, etc is used in a scan, rather then just the default. I believe I submitted an idea for this. Hopefully it materializes.

@sgreen-r7
Copy link
Contributor

Perfect, thanks @peterjmcg

Sorry for the wacky sorta work around, but hopefully some of the new features we're developing in Nexpose will make this easier in the future (this year?).

Thanks again, and let us know if you run into any snags or have any further questions. For now I'm going to go ahead and close out this issue if that's cool with you. Keep the ideas coming!

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

No branches or pull requests

2 participants