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

XML::VulnerabilityDetail/Complete API missing an instances value for vulnerabilities #306

Closed
ziggyjosh16 opened this issue Nov 10, 2017 · 2 comments
Labels

Comments

@ziggyjosh16
Copy link

Expected Behavior

I think that the API would be improved if it could return a value for instances based on a vuln_id.
Based on the value shown in the vulnerabilities tab in the UI.

Current Behavior

The current configuration only return instances of vulnerabilities from scan results of individual assets/groups/or sites. These do not focus on the vulnerabilities themselves. It is achievable, but requires much more drill down logic and time-consuming Nexpose::Connection method calls which usually end up in a Timeout Error.

Possible Solution

I'm sure there is an XML value that holds this information that can to be referenced

Just an example of what I'm trying to achieve:

vulns = nsc.all_vulns.select! { |v| v.title.downcase.include?(filter) }
		#total unique vulnerabilities matching the specified filter
		totalvulns = vulns.size
		totalinstances = 0
		#go through each vuln to get instances, sorted by date published
		vulns.each do |a|
			a = nsc.vuln_details(a.id)
			totalinstances += **a.instances** <------ (something like this would be nice)
		end

Am trying to accomplish a date based representation of vulnerability instances without using scan data.

@ziggyjosh16
Copy link
Author

this doesn't have to be within Nexpose::XML. Ideally the instance value should be accessible by referring to an object/XML block using a vuln_id.

I'm not an expert at the API, if there is something out there that I missed or another way to achieve this that would be fine too.

@gschneider-r7
Copy link
Contributor

This can be done with the new API V3 endpoint /api/3/vulnerabilities/{id}/assets where {id} is a vulnerability id string like cifs-smb-signing-disabled. Documentation for the new API is available in the security console's help menu.

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