hammackj / risu

Risu is Nessus parser, that converts the generated reports into a ActiveRecord database, this allows for easy report generation and vulnerability verification.
http://hammackj.github.io/risu
MIT License
63 stars 20 forks source link

<risk>_risks_by_host #21

Closed ebdavison closed 13 years ago

ebdavison commented 13 years ago

I need to be able to pull critical risks by host or medium risks by host, etc. Right now I can use risks_by_host(x) to get the top x number of risks by host. I need to be able to do this for each of the risk levels.

hammackj commented 13 years ago

For a specific host?

Host.where(:ip => "10.0.0.1").first.items.where(:severity => 3).all

this will return all 3's(criticals) for a host just add a limit for how many you want

ebdavison commented 13 years ago

Good to know. Thanks.

hammackj commented 13 years ago

Nod.