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

Date field for report #53

Closed mlpotgieter closed 12 years ago

mlpotgieter commented 12 years ago

I would like to start combining scan results into a single database to make trend analysis easier, it would be useful to have a date field in the "reports" table. Having a look at a results xml file there is a HOST_START and HOST_END field which seems to be related to when the scan was run, I thought it was a start and end time of the scan but it seems to be a bit short for the entire scan to run (2 minutes for just under 200 hosts). Anyway maybe this can be a feature request, not critical as we can easily put the date in manually for now.

mlpotgieter commented 12 years ago

I just realized there is another challenge with combining scan results into a single database, when drawing a report, one can not select a specific report to use as a dataset.

hammackj commented 12 years ago

The Report model has the following function on it, which will find the first host and use its start time as when the scan started.

def scan_date
  Host.where("start is not null").first[:start]
end

HOST_START and HOST_END are per host scan times, which can be accessed via Host.first.start or Host.first.end, where .first is any host in the scan. First just pulls the first host it finds for the example.

Do you need more than this field?

mlpotgieter commented 12 years ago

Ah that clears things up. Don't need more than that. Thanks

hammackj commented 12 years ago

Going ahead and closing this one.