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

Unable to read font error #106

Closed cibermanchego closed 6 years ago

cibermanchego commented 7 years ago

I'm running risu in Archlinux, and getting this error when trying to use templates like graphs or exec_summary:

risu -t exec_summary -o exec.pdf /home/uiav/.rvm/gems/ruby-2.2.3/gems/gruff-0.7.0/lib/gruff/base.rb:1126:in get_type_metrics': unable to read font(null)' @ error/annotate.c/RenderFreetype/1362 (Magick::ImageMagickError) from /home/uiav/.rvm/gems/ruby-2.2.3/gems/gruff-0.7.0/lib/gruff/base.rb:1126:in calculate_caps_height' from /home/uiav/.rvm/gems/ruby-2.2.3/gems/gruff-0.7.0/lib/gruff/base.rb:537:insetup_graph_measurements' from /home/uiav/.rvm/gems/ruby-2.2.3/gems/gruff-0.7.0/lib/gruff/base.rb:499:in setup_drawing' from /home/uiav/.rvm/gems/ruby-2.2.3/gems/gruff-0.7.0/lib/gruff/base.rb:464:indraw' from /home/uiav/.rvm/gems/ruby-2.2.3/gems/gruff-0.7.0/lib/gruff/bar.rb:20:in draw' from /home/uiav/.rvm/gems/ruby-2.2.3/gems/gruff-0.7.0/lib/gruff/base.rb:444:into_blob' from /home/uiav/.rvm/gems/ruby-2.2.3/gems/risu-1.8.0/lib/risu/models/item.rb:300:in risks_by_severity_graph' from /home/uiav/.rvm/gems/ruby-2.2.3/gems/risu-1.8.0/lib/risu/templates/exec_summary.rb:96:inrender' from /home/uiav/.rvm/gems/ruby-2.2.3/gems/risu-1.8.0/lib/risu/base/templater.rb:61:in block in generate' from /home/uiav/.rvm/gems/ruby-2.2.3/gems/prawn-2.1.0/lib/prawn/document.rb:226:in[]' from /home/uiav/.rvm/gems/ruby-2.2.3/gems/prawn-2.1.0/lib/prawn/document.rb:226:in initialize' from /home/uiav/.rvm/gems/ruby-2.2.3/gems/prawn-2.1.0/lib/prawn/document.rb:142:innew' from /home/uiav/.rvm/gems/ruby-2.2.3/gems/prawn-2.1.0/lib/prawn/document.rb:142:in generate' from /home/uiav/.rvm/gems/ruby-2.2.3/gems/risu-1.8.0/lib/risu/base/templater.rb:56:ingenerate' from /home/uiav/.rvm/gems/ruby-2.2.3/gems/risu-1.8.0/lib/risu/cli/application.rb:425:in run' from /home/uiav/.rvm/gems/ruby-2.2.3/gems/risu-1.8.0/bin/risu:32:in<top (required)>' from /home/uiav/.rvm/gems/ruby-2.2.3/bin/risu:22:in load' from /home/uiav/.rvm/gems/ruby-2.2.3/bin/risu:22:in
' from /home/uiav/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in eval' from /home/uiav/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in
'

I've tried reinstalling rmagick, but didnt't fix the issue. Googling the error it seems related to ghostcript, so I updated ghostscript and added ghostscript fonts to the installation directory, but I still get the same error. All the other templates work fine. Any clues about this?

hammackj commented 7 years ago

I think i've seen a issue like this before, trying to remember what was the fix.

hammackj commented 7 years ago

Reference: https://github.com/topfunky/gruff/issues/120

Not sure about Arch linux, you might need that ghostscript fonts package. I don't have a install of ArchLinux around to test at the moment.