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

No data returned for vulnerability id and asset id in list_vuln_exceptions #315

Open
peterjmcg opened this issue Feb 8, 2018 · 0 comments

Comments

@peterjmcg
Copy link

list_vuln_exceptions returns no data for vulnerability id and asset id. I modified vuln_exceptions.rb to use what I think is the correct field names for these attributes:

ajax_data.each do |vuln_excep|
# Change vulnerabilityID to vulnerability, assetID to id
ve = VulnException.new(vuln_excep.scope.vulnerability, vuln_excep.scope.type, vuln_excep.submit.reason, vuln_excep.state)
ve.id = vuln_excep.id
ve.submitter = vuln_excep.submit.name
ve.submitter_comment = vuln_excep.submit.comment
ve.submit_date = Time.parse(vuln_excep.submit.date) unless vuln_excep.submit.date.nil?
ve.asset_id = vuln_excep.scope.id
ve.site_id = vuln_excep.scope.siteID
ve.asset_group_id = vuln_excep.scope.assetGroupID
ve.port = vuln_excep.scope.port
ve.vuln_key = vuln_excep.scope.key
ve.expiration = Time.parse(vuln_excep.expires) unless vuln_excep.expires.nil?
unless vuln_excep.review.nil?
ve.reviewer = vuln_excep.review.name
ve.reviewer_comment = vuln_excep.review.comment
ve.review_date = Time.parse(vuln_excep.review.date) unless vuln_excep.review.date.nil?
end
results << ve
end

This worked for me. These were the fields I needed for the exceptions in my database but other fields should be checked e.g. siteID, assetGroupID (is there an easy way to see an XML/JSON representation of the data? I just dumped the ajax_data to get what I needed)

Your Environment

  • Nexpose gem version: 7.2.0
  • Ruby version: ruby 2.2.6p396 (2016-11-15 revision 56800) [x64-mingw32]
  • Operating System and version: Windows 10
  • Nexpose product version: 6.5.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant