-
Notifications
You must be signed in to change notification settings - Fork 103
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
list_vuln_exceptions returns API error #312
Comments
This is caused by the official release of these endpoints (it is no longer experimental). The URI just needs to change. Patch in the works. |
Thanks. If you can give me the new URI I can try it. |
See #313 |
New error message (with changed URI) : |
I think _links needs to be links. |
Indeed. Thanks. |
Also _resources to resources. Then it works ok. |
Also, you might want to mention in the release notes that the timestamps (expiration date etc) were changed from Date to Time. Could save some broken scripts. |
Released v7.2.0 with the fix. |
Script to list vulnerability exceptions has recently (within last week) started returning API error :
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nexpose-7.1.1/lib/nexpose/ajax.rb:172:in
'request': NexposeAPI: GET request to /api/experimental/vulnerability_exceptions?_size=500&_page=0 failed. request body: (Nexpose::APIError) from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nexpose-7.1.1/lib/nexpose/ajax.rb:35:in
get'from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/nexpose-7.1.1/lib/nexpose/vuln_exception.rb:25:in
list_vuln_exceptions' from Exceptions.rb:59:in
Rapid7 support suggested opening issue in this forum, pointing out that the URI path name contains 'experimental'.
To reproduce:
(Parameters host, user, pass, port passed as input parameters).
@nsc = Nexpose::Connection.new(host, user, pass, port)
@nsc.login
puts("Successful login to #{host} at #{Time.now.strftime('%H:%M')}")
at_exit { @nsc.logout }
#Check for vulnerability exceptions
puts("Checking vulnerability exceptions")
exceptions = @nsc.list_vuln_exceptions || []
Note: failure was first seen 2 days ago with client version 5.3.2 with error message complaining about date format. After upgrade to client 7.1.1 script still fails but with different error message (above).
Your Environment
The text was updated successfully, but these errors were encountered: