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

Alerts should work as expected along with more clear documentation. #260

Open
sgreen-r7 opened this issue Feb 22, 2017 · 1 comment
Open

Comments

@sgreen-r7
Copy link
Contributor

Expected Behavior

Steps to saving an Alert should be more clear.
Right now the below code will "seem" to be correct, but the site does not save, and throws a generic API error. However once we add a vuln filter everything works as expected.

Should not be able to submit without all of the required attributes of the alert.

Steps to Reproduce (for bugs)

nsc.login

smtpAlert = Nexpose::SMTPAlert.new('Scan Failed', '[email protected]', 'email-server.rapid7.com', ['[email protected]'], 1, 3, 1)
scanFilter = Nexpose::ScanFilter.new(0,0,1,0,0)
smtpAlert.scan_filter = scanFilter

site = Nexpose::Site.load(nsc,1)
site.alerts = [smtpAlert]
site.save(nsc)

Add to fix

  @vuln_filter=
   #<Nexpose::VulnFilter:0x007fe810362428
    @confirmed=true,
    @potential=true,
    @severity=1,
    @unconfirmed=true>>
@gschneider-r7
Copy link
Contributor

For a complete fix we should:

  • Create default filters when creating any alert type that needs them
  • Call the alert validation method when saving a site config with alerts
  • Update documentation to clearly explain how to use alerts

@sgreen-r7 sgreen-r7 removed their assignment Oct 23, 2017
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