Closed ebdavison closed 9 years ago
Do you have a line number? I will take a look at it.
Looks like line 117 of the file executive_summary_detailed.rb. Specifically is is using {Item.risks.count}, {Item.high_risks.count}, {Item.medium_risks.count}, etc.
Actually, got that wrong. It is lines 120-126. The counts in that paragraph are a calculated number in the pattern of Item.where(:severity=>4).group(:host_id).count.
A short term fix would be to change the lines around 120-126 to this
crit_host_count = Item.where(:severity => 4).group(:host_id).count.count
high_host_count = Item.where(:severity => 3).group(:host_id).count.count
medium_host_count = Item.where(:severity => 2).group(:host_id).count.count
low_host_count = Item.where(:severity => 1).group(:host_id).count.count
info_host_count = Item.where(:severity => 0).group(:host_id).count.count
Ill post a fix to the dev branch 1.7.0 soon.
That does not work.
Strange worked on my test script. I'll look in to it more.
Sent from my iPad
On Apr 7, 2014, at 3:26 PM, ebdavison notifications@github.com wrote:
That does not work.
Reply to this email directly or view it on GitHubhttps://github.com/arxopia/risu/issues/72#issuecomment-39779159 .
What is the path to the file I need to modify? Maybe I did not update the proper file?
rubygems_path/risu/lib/risu/templates/executive_summary_detailed.rb
Fixed in 1.7.0
I am using the included template for the executive summary detailed and instead of counts of vulnerabilities, I am getting an array of IDs (from what I can tell) as you can see here:
There were {} hosts with Critical risk vulnerabilities, {379=>1} hosts with High risk vulnerabilities, {2=>1, 5=>3, 6=>1, 7=>1, 12=>4, 14=>4, 15=>1, 16=>1, 17=>2, 19=>3, 20=>3, 21=>3, 22=>1, 23=>2, 24=>2, 25=>2, 62=>1, 63=>1, 64=>1, 65=>4, 66=>1, 68=>1, 69=>1, 70=>7, 116=>7, 124=>2, 125=>2, 180=>1, 294=>1, 296=>1, 298=>1, 299=>1, 302=>1, 303=>1, 304=>1, 307=>1, 308=>1, 309=>1, 310=>1, 316=>1, 330=>1, 333=>1, 334=>1, 337=>1, 342=>1, 344=>1, 345=>1, 347=>1, 348=>1, 350=>1, 352=>1, 353=>1, 357=>1, 358=>1, 359=>1, 364=>1, 368=>1, 380=>1, 383=>1, 389=>1, 390=>1, 392=>1, 395=>1, 397=>1, 398=>1, 404=>1, 405=>1, 407=>1, 421=>1, 423=>1, 424=>1, 425=>1, 427=>1, 429=>1, 432=>1, 433=>1, 438=>1, 441=>1, 442=>1, 449=>1, 452=>1, 454=>1, 455=>1, 456=>1, 462=>1, 468=>1, 473=>1, 475=>3, 479=>1, 480=>1, 482=>1, 484=>1, 490=>1, 500=>1, 503=>1, 506=>1, 511=>1, 512=>1, 518=>1, 524=>1, 530=>1, 534=>1, 535=>1, 539=>1, 546=>1, 547=>1, 554=>1, 557=>1, 558=>1, 560=>1, 563=>1, 566=>1, 567=>1, 569=>1, 570=>1, 571=>1, 576=>1, 577=>1, 582=>1, 585=>1, 587=>1, 588=>1, 589=>1, 590=>1, 593=>1, 594=>1, 595=>1, 596=>1, 597=>1, 600=>1, 601=>1, 603=>1, 605=>1, 607=>2, 610=>1, 611=>4, 612=>1, 613=>2, 621=>1, 622=>1, 627=>1, 630=>1, 637=>1, 642=>1, 645=>1, 648=>1, 650=>1, 653=>1, 658=>1, 659=>1, 660=>1, 669=>1, 672=>1, 685=>1, 686=>1, 697=>1, 698=>1, 699=>1, 704=>1, 709=>1, 713=>1, 714=>1, 717=>1, 719=>1, 720=>1, 740=>1, 741=>1, 746=>1, 751=>1, 758=>1, 759=>1, 760=>1, 761=>1, 766=>1} hosts with Medium risk vulnerabilities, {2=>1, 3=>2, 4=>2, 5=>3, 6=>3, 7=>3, 8=>2, 9=>2, 10=>2, 11=>2, 12=>3, 13=>2, 14=>3, 18=>2, 19=>2, 20=>2, 21=>2, 22=>1, 23=>1, 24=>1, 25=>2, 61=>1, 62=>3, 63=>3, 64=>1, 65=>1, 66=>1, 67=>2, 68=>1, 69=>4, 70=>5, 85=>1, 116=>4, 119=>1, 121=>1, 124=>1, 125=>5, 126=>1, 127=>2, 180=>1, 293=>1, 294=>1, 295=>1, 296=>1, 297=>1, 298=>1, 299=>1, 300=>1, 301=>1, 302=>1, 303=>1, 304=>1, 305=>1, 306=>1, 307=>1, 308=>1, 309=>1, 310=>1, 311=>1, 312=>1, 313=>1, 314=>1, 315=>1, 316=>1, 317=>1, 318=>1, 319=>1, 320=>1, 321=>1, 322=>1, 323=>1, 324=>1, 325=>1, 326=>1, 327=>1, 328=>1, 329=>1, 330=>1, 331=>1, 332=>1, 333=>1, 334=>1, 335=>1, 336=>1, 337=>1, 338=>1, 339=>1, 340=>1, 341=>1, 342=>1, 343=>1, 344=>1, 345=>1, 346=>1, 347=>1, ...