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

Get asset count and vuln count for Asset Groups #130

Closed
gschneider-r7 opened this issue Mar 10, 2015 · 5 comments
Closed

Get asset count and vuln count for Asset Groups #130

gschneider-r7 opened this issue Mar 10, 2015 · 5 comments

Comments

@gschneider-r7
Copy link
Contributor

Currently the Asset Group functionality in the gem does not pull down the number of assets or vulnerabilities as a field on the object. A customer has requested this functionality to match the display of the Asset Groups table in the Nexpose UI.

The current Nexpose API does not support this in a single request. Without a new API endpoint, this could be accomplished with a data table endpoint - with the caveat that it could change at any time in the future.

@erran-r7
Copy link
Contributor

Should we create an experimental namespace for these types of methods?

# nexpose/experimental.rb
module Nexpose
  module Experimental
    def asset_groups_with_counts(connection)
      # Use the nexpose console connection to make both request and decorate the asset group object
    end
  end
end

Where a gem user would like to have these methods:

# Users could then monkey patch in experimental methods:
require 'nexpose/experimental'

module Nexpose::Connection
  include Nexpose::Experimental
end

@ghost
Copy link

ghost commented Mar 12, 2015

Not sure that helps much. Is the intent to basically imply the API is unstable?

@erran-r7
Copy link
Contributor

@mhuffman-r7 the intent there would be to ship a fix, but not load it by default. Customers could then use these "experimental" changes which we wouldn't support through our regular SLA. Once official Nexpose APIs are released, we could mark these methods as deprecated and point to the new methods.

@gschneider-r7
Copy link
Contributor Author

@mhuffman-r7 implementing this would require one of the following:

  • New API endpoint(s) in Nexpose, since it does not exist in 1.1 or 1.2 currently
  • Multiple requests to the console to "complete" the object data in Ruby
  • Use of dyntable endpoint which may change without notice in the future

The last option is the most straightforward (in fact I've provided a POC to the customer), but is likely to break if/when the dyntable is converted to something else, requiring an update to the gem.

@gschneider-r7
Copy link
Contributor Author

Going to shelve this for now. We should implement new API endpoints in Nexpose first.

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

2 participants